TinyPortal
Development => Support => Topic started by: joyboy2001 on May 08, 2007, 07:35:25 PM
Ok, how about this ??
I have a script to refresh pages automatically after a set time. The script runs fine. How do I make sure that it only refreshes the front page and nothing else ? If I let all the options at the bottom show -none- then it refreshes after a set time on any page.
I have split this into a new Topic and have given it a new title as it is totally unrelated to the Topic you posted in.
Where is the script currently located? Inside a block?
if the script is in a php block or article you can add a bit of php to make this happen.
global $context;
if ($context['TPortal']['is_front']){
echo 'your script code goes here';
}
It's Javascript and I have put it in a block ...
Well did my code work for you? Did you try it? Did you get an error? What did you do? How did you do it? Please... for the love of Pete, give us a bone to chew on.
Well it's Javascript, so no use putting it in a php script block ... right ??
Anyways, I have the right blocks enabled on the front page and disabled by default in all other section. I put the script in a right scriptbox ... Works fine but I still don't have an answer in case I have more scripts which I want to run only on the front page and not be limited to using right blocks ... There's got to be a way !!
Well if you want to have this type of feature you'll have to do it the "hacked" way until TP 1.0 comes out with more features.