View Full Version : how to: ad text on main page
seothatworks
07-09-2005, 06:08 AM
...for people like me (who don't know much about programming)
Place the following into main.tpl, on the appropriate place.
Content visible to registered users only.
Perhaps just under this line:Content visible to registered users only.
MichaelMed
07-09-2005, 09:02 AM
Nice one Seothatworks.
I've yet to sample this little addition. It still works with re-write enabled?
seothatworks
07-09-2005, 09:10 AM
It is independant from url rewrite.
mikerock
08-30-2005, 04:35 AM
Content visible to registered users only.
I tried this as above and it works, but the only problem is this added text also appears when using the search function from the home page.
Is there a variable value that I can use so it does not show up in search? Something like {if $category.ID ==0 and $search=""}
Ap0s7le
08-30-2005, 06:35 AM
Hello Mike, check this out.
http://www.phplinkdirectory.com/kb/Design/page_1/Making_Template_Changes_to_the_Front_Page_Only.htm l
Thanks
-Casey
ksbhati
08-30-2005, 09:03 AM
Thanks Casey,
How does one prevent the text for the index page from appearing on the search results page? I tried to add $q after the $p in your code but that does not seem to work. I was adding the code like this
Content visible to registered users only.
I also tried to put the $p and $q within brackets (suffice to say that I know zilch about php code and syntax :) ) like this.
Content visible to registered users only.
Any ideas...?
Thanks
Mike77
08-30-2005, 09:20 AM
ksbhati,I am not familiar with smarty but maybe you could try some of these: & , || , != (and ,or, not equal) .
here I think some more info on the Smarty If Function:
http://www.smarty.net/manual/en/language.function.if.php
That is if this is for smarty :)
ksbhati
08-30-2005, 06:44 PM
Thank you Mike, I will try some of those and post back if I am successfull. That is a good resource page...Thanks again !!
mikerock
08-31-2005, 04:11 PM
Any one have any luck getting it to stop displaying on search result pages?
johnner
06-08-2006, 10:42 PM
for anyone who actually wants the answer to this, this works for me:
{if $category.ID eq 0 and $category.ID neq $p or $q}
you can also write it
{if $category.ID eq 0 and $category.ID neq $p and $category.ID neq $q}
Cheers
John
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.