Differentiate between PM inbox and outbox
Posted by Nicola
Differentiate between PM inbox and outbox January 30, 2013 10:52AM |
Registered: 18 years ago Posts: 216 |
I am in progress of facelifting my 6 years old site. So I have put hand on the templates and everything is great up to when I got into the pm.tpl
Since I am adding icons, at the index I am a bit confused how to proceed.
More in detail I need to differentiate between the folders and don't know how to operate within the following syntax:
Of course anywhere I place an icon it will appear in both folders simultaneously.
Question: any ways to manage this?
Thanks!
N.
Since I am adding icons, at the index I am a bit confused how to proceed.
More in detail I need to differentiate between the folders and don't know how to operate within the following syntax:
{LOOP PM_FOLDERS} <li><a {IF PM_FOLDERS->id FOLDER_ID}class="current" {/IF}href="{PM_FOLDERS->url}">{PM_FOLDERS->name}</a><small>{IF PM_FOLDERS->total} ({PM_FOLDERS->total}){/IF}{IF PM_FOLDERS->new} (<span class="new-flag">{PM_FOLDERS->new} {LANG->newflag}</span>){/IF}</small></li> {/LOOP PM_FOLDERS}
Of course anywhere I place an icon it will appear in both folders simultaneously.
Question: any ways to manage this?
Thanks!
N.
Re: Differentiate between PM inbox and outbox January 30, 2013 12:19PM |
Registered: 13 years ago Posts: 50 |
You could check PM_FOLDERS->name
if it was equal to "Inbox" you could display icon for that and if it was "Sent Items" you could display the other icon. Customized folders wouldn't be easily categorized (probably not worth bothering about) You would also have more problems if you used multiple languages
if it was equal to "Inbox" you could display icon for that and if it was "Sent Items" you could display the other icon. Customized folders wouldn't be easily categorized (probably not worth bothering about) You would also have more problems if you used multiple languages
Re: Differentiate between PM inbox and outbox January 31, 2013 02:42AM |
Registered: 18 years ago Posts: 216 |
Thanks for your tip. I am not familiar with the IF sytax, maybe you or someone can help. I imagine it's something I need to insert after the HREF and should look similar to the following:
Obviously this doesn't work because I am not acquainted with it.
Any help is highly appreciated. Thanks.
{IF PM_FOLDERS->name}="INBOX"} ICON {/IF}
Obviously this doesn't work because I am not acquainted with it.
Any help is highly appreciated. Thanks.
Re: Differentiate between PM inbox and outbox January 31, 2013 06:19AM |
Admin Registered: 22 years ago Posts: 9,240 |
Re: Differentiate between PM inbox and outbox January 31, 2013 06:31AM |
Registered: 18 years ago Posts: 216 |
Thanks Thomas.
Something is still not right.
Right now my syntax shows as follows:
This one shows just before the folder name a generic mail icon which is of course the same for both inbox and outbox.
I have attempted to insert your suggested IF code into the one above but nothing has happened at all. Tried both INDEX and Index but nothing. Any suggestions of what I'm doing wrong or I am not doing? Thanks!
Something is still not right.
Right now my syntax shows as follows:
<a {IF PM_FOLDERS->id FOLDER_ID} {/IF}href="{PM_FOLDERS->url}"><img src="{URL->TEMPLATE}/images/icons/icon_pm_mail.png" style="padding-left:5px; padding-right:6px">{PM_FOLDERS->name} <span>{IF PM_FOLDERS->total} ({PM_FOLDERS->total}){/IF}{IF PM_FOLDERS->new} <small class="new-flag">({PM_FOLDERS->new} {LANG->newflag})</small>{/IF}</small></a>
This one shows just before the folder name a generic mail icon which is of course the same for both inbox and outbox.
I have attempted to insert your suggested IF code into the one above but nothing has happened at all. Tried both INDEX and Index but nothing. Any suggestions of what I'm doing wrong or I am not doing? Thanks!
Re: Differentiate between PM inbox and outbox January 31, 2013 06:32AM |
Admin Registered: 22 years ago Posts: 9,240 |
Re: Differentiate between PM inbox and outbox January 31, 2013 06:37AM |
Registered: 18 years ago Posts: 216 |
Re: Differentiate between PM inbox and outbox January 31, 2013 06:38AM |
Admin Registered: 22 years ago Posts: 9,240 |
Re: Differentiate between PM inbox and outbox January 31, 2013 06:40AM |
Registered: 18 years ago Posts: 216 |
Re: Differentiate between PM inbox and outbox January 31, 2013 06:52AM |
Registered: 18 years ago Posts: 216 |
Sorry, only registered users may post in this forum.