miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | 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
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑