15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Master Class miniBB Support Forums / Master Class /   

Debugging templates

Author 4days
#1 | Posted: 25 Feb 2004 00:32 | Edited by: 4days 
been meaning to get around to making a list of the templates and exactly which bit of the page they're all for.. but never seem to get around to it, so here's a quick and dirty alternative:

1) make a backup copy of bb_functions.php and put it somewhere safe (so you can put it back when you're done playing with the templates).

2) open up bb_functions.php and replace:

$tpl = fread ($fd, filesize ('./templates/'.$name.'.'.$ext));


# $tpl = fread ($fd, filesize ('./templates/'.$name.'.'.$ext));
$tpl = ''.fread ($fd, filesize ('./templates/'.$name.'.'.$ext)).'';

3 ) upload it to your server, visit your forum and take a look at the page source. each time a template is parsed, the beginning and end will appear commented in the html, e.g:

Logged as: 4days ยป Logout

Author mb
#2 | Posted: 25 Feb 2004 03:37 
Ah, that is really handy! Thanks for sharing, 4days.
- mb

Author Mirsky
#3 | Posted: 28 Feb 2004 21:59 
i have been wonderin' what all the templates were used for...

Author fruitfly
#4 | Posted: 29 Feb 2004 01:50 
YAY!! You have no idea how much headache this has saved me. Thank you very much

Author Team
#5 | Posted: 1 Mar 2004 10:25 
Humm, probably good idea for our next release :)

Author Anonymous
#6 | Posted: 1 Jul 2004 03:11 
i've got v1.7d running, and i can't find the line in the bb_functions.php.

can someone tell me what the new line to edit would be, or somethin?

Author mickeyckm
#7 | Posted: 1 Jul 2004 17:58 
it in the root directory of your forum

Author Anonymous
#8 | Posted: 1 Jul 2004 21:37 
nvm. looked harder, and i found it.

Author _Marco
#9 | Posted: 3 Dec 2005 02:02 
Is there a way to make this work in v2.0 ?
It seems the code has changed and I don't see how to use this.


Author Team
#10 | Posted: 4 Dec 2005 17:10 
The idea for 2.0 is the same - instead of

return $tpl;

you need to paste

return ''.$tpl.'';

Author _Marco
#11 | Posted: 5 Dec 2005 21:20 
Thank you! This works very well :-)


Master Class miniBB Support Forums / Master Class / Debugging templates 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