blakelives0312
|
Comment helpI have a problem with the comments. What are these thingy-magigs and how do you use them in editing templates (or tpl files).
also how would you use :
| Code: | | <!-- BEGIN switch_user_logged_in --> | and | Code: | | <!-- BEGIN switch_user_logged_out --> | and all of those comment tag things...
|
CodyT07
|
You mean
| Code: |
<!--Comment here--> |
| Code: |
<!-- BEGIN switch_user_logged_in --> |
Are PhpBB switches and not for hidden text for editing as above code.
So if you want hidden comments use
| Code: |
<!--Start Comment here-->
<!--Stop Comment here--> |
They are useful for hard HTML edits in .tpl files
|
blakelives0312
|
those are what i was talking about, yes, but how would i use them?
i know that switch_user_logged_out && switch_user_logged_in are for whether the user is logged in or not but for some reason when i use them, my forum gets all screwy.. and the tags dont do what i thought they would.
for example, i wrote a portal (but not really...) for admin announcements. when i put one of the tags in before the code, and the end tag after, it just doesnt show up, whether i was logged in or not.(annoying much?)
btw, the portal is written directly into the index_body.tpl file, not as an actual portal.
this is another problem i have been having, how do i make a portal work!?!? i add into the list, i write the code i want it to use but when i put in {MYFF.ADMINNOTES} (the portal name) it doesnt work as inteded .
heres a question: is cms_adminnotes.tpl a file that is called when {MYFF.ADMINNOTES} is put in the code and {MYFF.ADMINNOTES} is replaced by the code in that file when the page is loaded?
anyway... the tags dont work as i thought they would...
|
blakelives0312
|
okay heres an update, i played around with the switch_user_logged_in and i re-made a private message portal that works- it shows when a user is logged in and not when the user is not. i also made a new portal to contain the code for the admin announcements (though i left the old code where it was as well) and i played with user_logged_in with that. but the forum gets screwy when i mess with that portal... im totally lost...i feel like i'm competely new to coding again... (i know several languages, including html, java, c, c++ and php but im LOST!)
also, is there a list of these switches?? i would like to see one if there was...
|
Nick(NR)
|
Re: Comment help | blakelives0312 wrote: | I have a problem with the comments. What are these thingy-magigs and how do you use them in editing templates (or tpl files).
also how would you use :
| Code: | | <!-- BEGIN switch_user_logged_in --> | and | Code: | | <!-- BEGIN switch_user_logged_out --> | and all of those comment tag things... |
those tags will only show content placed between them to users that are logged into your forum, guests will not be able to see it.
| blakelives0312 wrote: |
this is another problem i have been having, how do i make a portal work!?!? i add into the list, i write the code i want it to use but when i put in {MYFF.ADMINNOTES} (the portal name) it doesnt work as inteded .
heres a question: is cms_adminnotes.tpl a file that is called when {MYFF.ADMINNOTES} is put in the code and {MYFF.ADMINNOTES} is replaced by the code in that file when the page is loaded?
anyway... the tags don't work as i thought they would... |
this could be partly because either there is no actual cms_adminnotes.tpl or that there may be no content within said file. Editing portals to custom content can be awkward.
| blakelives0312 wrote: | i played with user_logged_in with that. but the forum gets screwy when i mess with that portal... im totally lost...i feel like I'm completely new to coding again... (i know several languages, including html, java, c, c++ and php but im LOST!)
also, is there a list of these switches?? i would like to see one if there was... |
the logged in switches need to be on their own line or they do play havoc occasionally
|
admin (no pm's please)
|
Bear with me I can compiling a list of switches and will post in the next hour.
|
blakelives0312
|
OOH thank you soooo much. You probably have some idea of how long i have been looking for something like this! (though it isnt actually not that long, it feels like it has been forever! I thought about it all of finals week, THANK YOUUUU....
|
blakelives0312
|
Admin? any luck on that switches list?
|
admin (no pm's please)
|
http://forum.myfreeforum.org/ftopic7129.php&highlight=
it's a sticky and should be in view posts since last visit!
|
blakelives0312
|
YAY! thanks admin, you're the best!
|
|
|