miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

How to hide stuff in template files?

 
Author MyFairTux
Partaker
#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
Partaker
#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
Partaker
#5 | Posted: 20 Dec 2007 15:14 
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 
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?
 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
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑