Start ::
Developers Corner ::
0.8 Theme Design ::
Link in Header Should Change: Login - Logout
Moderated by: Support Team
-
- rank:
-
pnSoftmore
- registered:
- June 2002
- Status:
- offline
- last visit:
- 24.01.08
- Posts:
- 51
Hello PostNukers,
I am using the theme andreas08 in PN 0.8 on a LAMP server.
When a visitor arrives at the site, they should see a link in the theme header named "Login". After the user logs in, the link should change and then read "Logout". We used this in previous PN releases/themes successfully, but now when I use the same code, it's a no-go. This is the code I am trying:
This code leaves me with code displayed in the header where the link "Login" should be. I know you guys are cracks and can help my sorry soul in solving this problem!
Thanks,
Pepe -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 24.04.08
- Posts:
- 7647
You can't embed PHP code into templates directly. There is a theme plugin provided to give you the kind of links your after. The userlinks plugin is closest to your requirements.
For full information on themeing in v0.8 see the theming documenation.
-Mark -
- rank:
-
pnProfessional
- registered:
- March 2003
- Status:
- offline
- last visit:
- 07.05.08
- Posts:
- 806
Lazy me, I use frequently
I guess it's not advised, and certainly not in 0.8.x themes??
- Igor
-----
Have a nice day
PostNuke.be is currently running
PN 0.8.0.0-RC3 -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 24.04.08
- Posts:
- 7647
While PHP tags are available it's not really the recommend method. If you build a plugin you can use it anywhere - in different templates even on different sites.
Turning (almost) any PHP into a plugin is a relatively simple task.
-Mark -
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
...and my way...
Flexible enough for ya... three solutions and styles..
edited by: AmmoDump, Oct 18, 2007 - 07:10 AM
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnProfessional
- registered:
- March 2003
- Status:
- offline
- last visit:
- 07.05.08
- Posts:
- 806
@Mark: ok, noted.
@AmmoDump
I think it's the other way around.... LOL
- Igor
-----
Have a nice day
PostNuke.be is currently running
PN 0.8.0.0-RC3 -
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
Indeed it is, Igor!
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnProfessional
- registered:
- December 2003
- Status:
- offline
- last visit:
- 08.05.08
- Posts:
- 2635
The coolest!
Nothing dazzles people at a party like talking about dynamic theme rendering techniques. My wife thinks I talk about it to 'pick-up chicks'. But she looks hot in her 'Talk < -- $marty -- > to me baby-doll tee... LOL
-----
-- David Pahl -- (PostNuke Support Team)
<div id="me" class="none" style="none" />
-
- rank:
-
pnProfessional
- registered:
- November 2003
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 1530
Maybe it's my geographic location, or my social circles, but all I get is eyes glazing over when I even mention anything beyond windows or internet... although gaming occasionaly gets a good reaction.
-----
viewTopiaryWorks($twWorks, $twRosterMaster)
Start ::
Developers Corner ::
0.8 Theme Design ::
Link in Header Should Change: Login - Logout
