miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Master Class miniBB Support Forums / Master Class /   

How to hide stuff in template files?

Author MyFairTux
Registered
#1 | Posted: 20 Dec 2007 04:15 
Hi,

what is the save way to uncomment parts of a template file and do *not* show these later in the generated HTML code?

Can I use "{" and "}" without inner variable for this?

Best regards,
Christoph

Author Paul
Lead Developer
#2 | Posted: 20 Dec 2007 09:55 
So far as I understand correctly... yes you can generate some $variable in the code then paste the {$variable} in any template and for some conditions its value could be empty... but it's up to your code.

I am confused a bit and I'm afraid I did not get the question in whole ;-)

Author MyFairTux
Registered
#3 | Posted: 20 Dec 2007 10:42 
Right, you're wrong ;-)

I only want a simple thing:

To comment out previously written HTML in a manner that the comment is *not* visible later in the finally generated HTML code.

So I want some kind of "<!--" and "-->" but *not* visible later.

So a template tester/creator has the option to comment out some stuff and - may be - reactivate the code in future ... but nobody out there needs to know internals about the template variables (which also would be visible within normal HTML comments).

I hope it get's more clear now :-)

Best Regards,
Christoph

Author Paul
Lead Developer
#4 | Posted: 20 Dec 2007 11:16 
I hope it get's more clear now

- not sure :-) It seems for me it's not possible overall. Whatever you put in HTML is always visible in the source.

Author MyFairTux
Registered
#5 | Posted: 20 Dec 2007 15:14 | Edited by: MyFairTux 
I believe in you ;-)

What you put in HTML is always visible - I know :-)

I thought about a kind of special minibb tag which is replaced (like {$xxx}).
So grouping template code in "{" and "}" without a variable at beginning ("{$") should be replaced by the parser with ... well: nothing :-)

Or: Is there a simple possibility to check for "{*" and "*}" (like /* */ in C, PHP) when processing the templates and hide the code between those tags?

Best regards,
Christoph

Author Paul
Lead Developer
#6 | Posted: 21 Dec 2007 02:23 | Edited by: Paul 
There is no such possibility, miniBB parses only variables like {$var} and nothing else. As I already wrote you may try to use some $var and later generate or not generate the code for it...

Master Class miniBB Support Forums / Master Class / How to hide stuff in template files? Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


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
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB