Page 1 of 1

Individual start page vs. adduser plugin

Posted: Fri May 22, 2009 3:34 pm
by yellowled
I'm trying to combine a template using an individual start page with the adduser event plugin, i.e. not the sidebar, but the event plugin which generates a seperate page for user registration.

This is (roughly) the code from the index.tpl which creates the content:

Code: Select all

{if $currpage == $serendipityBaseURL or $currpage2 == $serendipityBaseURL or ($view == "start" && $staticpage_pagetitle == '')}
<!-- code for individual start page -->
{elseif $view == '404'}
<!-- 404 page -->
{else}
{$CONTENT}
{/if}
Now, the registration page is supposed to be at index.php?serendipity[subpage]=adduser -- which doesn't work with the code above. I'm assuming I need another if statement, but I can't figure out which one.

Help, please :)

YL

Re: Individual start page vs. adduser plugin

Posted: Fri May 22, 2009 4:43 pm
by yellowled
Hohum. If I do what Don suggested via IM and replace
yellowled wrote:

Code: Select all

{if $currpage == $serendipityBaseURL or $currpage2 == $serendipityBaseURL or ($view == "start" && $staticpage_pagetitle == '')}
<!-- code for individual start page -->
{elseif $view == '404'}
<!-- 404 page -->
{else}
{$CONTENT}
{/if}
with

Code: Select all

{if $startpage == 'true'}
<!-- code for individual start page -->
{elseif $view == '404'}
<!-- 404 page -->
{else}
{$CONTENT}
{/if}
it works perfectly fine. Any disadvantages to this code? If not: Why the hell have I been using the other stuff for, like, ages? :lol:

YL

Re: Individual start page vs. adduser plugin

Posted: Fri May 22, 2009 5:01 pm
by Don Chambers
yellowled wrote:Any disadvantages to this code? If not: Why the hell have I been using the other stuff for, like, ages? :lol:

YL
Because old habits die hard??!! :mrgreen:

I have yet to encounter any disadvantage, but I can tell you one definite Advantage: you can trigger a normal blog type view with yoursite/index.php?frontpage (such as on the 'recent' archives sidebar) using this method. Using your view/staticpage title version, that link would point back to your coded start page. I like the ability to get to the most recent blog entries, in normal blog format, even when I am using a coded front page.

Re: Individual start page vs. adduser plugin

Posted: Fri May 22, 2009 9:02 pm
by yellowled
Don Chambers wrote:Advantage: you can trigger a normal blog type view with yoursite/index.php?frontpage (such as on the 'recent' archives sidebar) using this method. Using your view/staticpage title version, that link would point back to your coded start page.
Erm ... you can do that with the "old habit" as well. I'm using it on a client's site.

YL

Re: Individual start page vs. adduser plugin

Posted: Fri May 22, 2009 9:30 pm
by Don Chambers
I must be thinking of something else then.... whatever, at least it solved your problem. :wink:

Re: Individual start page vs. adduser plugin

Posted: Fri May 22, 2009 10:11 pm
by yellowled
Well, it kind of solved my problem ... apparently, the adduser plugin is no longer in the picture here since it doesn't fit the client's needs. Too bad.

YL