15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Date in Topics

Author Baker
Guest
#1 | Posted: 29 Mar 2012 10:49 
i have in main_topic_cell.html {$whenPosted} and {$lastPostDate}, but i will have only one date :)

If {$lastPostDate} empty, view {$whenPosted} - else {$lastPostDate}

Give it an way via bb_plugins ?

Author Paul
Lead Developer
#2 | Posted: 29 Mar 2012 11:11 
function parseTopic {

if(isset($GLOBALS['lastPostDate']) and $GLOBALS['lastPostDate']!='') $GLOBALS['displayDate']=$GLOBALS['lastPostDate'];
else $GLOBALS['displayDate']=$GLOBALS['whenPosted'];

}

Then paste {$displayDate} in the template.
Note that parseTopic function may be used for other add-ons, if it's already present, you shall extend it, not duplicate.

Author Baker
Guest
#3 | Posted: 29 Mar 2012 16:19 
Thank you Paul, it works perfectly!

Author Paul
Lead Developer
#4 | Posted: 29 Mar 2012 18:04 
great :)

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Date in Topics Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB