- Moderated by:
- Support Team
-
- rank:
-
Professional
- registered:
- December 2003
- Status:
- online
- Posts:
- 2975
Hey,
Something along the same lines as the PM alert on the horizontal navigation bar here... I was wondering what to call, to check for PMs.
Code
<!--[ if SOMETHING > 0 ]-->
<a href="/index.php?module=Messages&func=view"><img src="<!--[$themepath]-->/images/nav/gotmail.gif" alt="You got Mail" title="You got mail, Yay!!"></a>
<!--[else]-->
<a href="/index.php?module=Messages&func=compose"><img src="<!--[$themepath]-->/images/nav/mail.gif" alt="Mail Box" title="Nobody Loves You!"></a>
<!--[/if]-->
Any hints?
Thanks,
--
David Pahl
Zikula Support Team -
- rank:
-
Professional
- registered:
- December 2003
- Status:
- online
- Posts:
- 2975
pnDev
function.pnmdisplaygreeting.php ??
No.
But along the same lines. I want to change the template visually, not textually. I am not looking for a greeting, but the ability to change the image. I am working on an icon driven navigation bar (web 2.0ish). Much like the way the mailbox changes on this site, but I want it theme level, not block level, so I looking for the plugin that is behind this site.
Thanks anyway, pnDev
, I am pretty aware of the standard (common) template variables
.
edited by: AmmoDump, May 22, 2007 - 12:22 AM
--
David Pahl
Zikula Support Team -
- rank:
-
Professional
- registered:
- December 2003
- Status:
- online
- Posts:
- 2975
My Self
Thanks anyway, pnDev
, I am pretty aware of the standard (common) template variables
.
But that doesn't stop me from being an idiot, and not using them....
This is what I did to make it work for me. Note: this is a Xanthia 2 theme, and use of pnMessages 1.5.
Added this to the header of the template(s).
Code
<!--[pnmodapifunc modname="pnMessages" type="user" func="getmessagecount" assign="messages"]-->
Added this code to the body of the template(s).
Code
// Check to see if user is logged in
<!--[if pnuserloggedin($loggedin) eq 1]-->
// My code for user being logged it...
<!--[if $messages.unread eq 0]-->
// if there are no messages show this image...
<a href="/module-pnMessages-inbox.htm"><img src="<!--[$themepath]-->/images/nav/mail.png" alt="Private Messages" title="You have no uread messages of <!--[$messages.totalin]-->!"></a>
<!--[else]-->
// show this image if you have messages... (Animated gif to grab attention)
<a href="/module-pnMessages-inbox.htm"><img src="<!--[$themepath]-->/images/nav/gotmail.gif" alt="Private Messages" title="You have <!--[$messages.unread]--> uread messages of <!--[$messages.totalin]--> total! "> X <!--[$messages.unread]--></a>
<!--[/if]-->
<!--[else]-->
// My else code for not logged...
<!--[/if]-->
In the end I get a different icon, depending if I have unread mail or not...
edited by: AmmoDump, May 30, 2007 - 04:17 PM
--
David Pahl
Zikula Support Team -
- rank:
-
Professional
- registered:
- September 2002
- Status:
- offline
- last visit:
- 19.11.08
- Posts:
- 879
Xanthia is so great, isn't it?
--
best regards from Kiel, sailing city
Steffen Voss
Member of the PostNuke Steering Committee
Read The Zikulan's Blog -
- rank:
-
Professional
- registered:
- December 2003
- Status:
- online
- Posts:
- 2975
kaffeeringe.de
Xanthia is so great, isn't it?
Xanthia and pnRender are so awesome, something clicked and all of a sudden, I have so many ideas and they are working at a great pace...
Sure I could admin a good PN site before... Sure I could tag myself a up an AT and XTE theme... But now: "Dynamically-Generated-Theme-Integrated-CSS-Syled-Hybrid Psuedo-Blocks" The possibilities of vhanging the whole look and feel of the site to enhance the user experience, based upon individual criteria... is awesome. All with Smarty styled HTML. Huh! Awesome!
Sorry, having too much fun coding up new ideas, and not sleeping..
--
David Pahl
Zikula Support Team
