Former Member
inherit
guest@proboards.com
155913
0
Nov 23, 2024 21:36:22 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Sept 19, 2014 16:56:06 GMT -8
Seeing that the "Guest must login" page is not customizable, I have decide to try to create a Splash Page plugin. My basic idea is to create a custom page, set it to be my "home page", strip the custom page of everything, add an image inside the forum wrapper which when clicked, (based on whether the user is a guest or logged in member) directs the logged user to either the forum, or unlogged user to the register/login page. The problem I have came across so far is targeting the "home page". I have no problem targeting the custom page, but it seems that when a custom page is set to be the "home page", it borrows the actual home pages URL. For example: If I named my custom page "Splash", and set it to be my homepage, it's URL would be mysite.proboards.com/page/splash. But at the same time, my sites landing page is still simply: mysite.proboards.com. This is very confusing for me. Basically, it's like when I set the custom page to be my sites home page, the custom page itself isn't actually my sites homepage. Instead my actual home page is just borrowing the HTML from my custom page. So technically my custom page (set to be my home page) and actual home page are two separate pages. So now when I use Javascript to target my custom page (which is set to be my homepage), it only targets my custom page at the URL: mysite.proboards/page/splash. if (location.href.match(splash)) { But my custom home page (which is a custom page set to be the homepage) is not effected by the code above as it's URL address is still simply mysite.proboards.comSo I guess my actual question is how to target my custom page when it is set to be my homepage? Wormopolis Chris Todge, somebody please, lol. thanks.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 19, 2014 17:18:17 GMT -8
I haven't used this myself but checking that proboards.data("route").name == "home" and either proboards.data('zone') or proboards.data('widget') is not null should help you to identify a custom page masquerading also as a home page.
|
|
Former Member
inherit
guest@proboards.com
155913
0
Nov 23, 2024 21:36:22 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Sept 20, 2014 22:18:45 GMT -8
Thanks! I think maybe with ^ this method, I could just make the homepage itself the splash page.
|
|