minibb®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Master Class miniBB Community Forum / Master Class /

How to hide stuff in template files?

 
MyFairTux
Forums Member
#1 | Posted: 20 Dec 2007 04:15
Reply 
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
Paul
CEO
#2 | Posted: 20 Dec 2007 09:55
Reply 
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 ;-)
MyFairTux
Forums Member
#3 | Posted: 20 Dec 2007 10:42
Reply 
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
Paul
CEO
#4 | Posted: 20 Dec 2007 11:16
Reply 
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.
MyFairTux
Forums Member
#5 | Posted: 20 Dec 2007 15:14 | Edited by: MyFairTux
Reply 
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
Paul
CEO
#6 | Posted: 21 Dec 2007 02:23 | Edited by: Paul
Reply 
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...
 
Your reply
Bold Style  Italic Style  Image Link  URL Link 


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

Before posting, be sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 31
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®