Individual start page vs. adduser plugin

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Individual start page vs. adduser plugin

Post 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
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Individual start page vs. adduser plugin

Post 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
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Individual start page vs. adduser plugin

Post 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.
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Individual start page vs. adduser plugin

Post 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
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Individual start page vs. adduser plugin

Post by Don Chambers »

I must be thinking of something else then.... whatever, at least it solved your problem. :wink:
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Individual start page vs. adduser plugin

Post 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
Post Reply