TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,234
  • Total Topics: 21,353
  • Online today: 739
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 262
  • Total: 263
  • lurkalot

How do I refresh the Home Page only when using a script I have?

Started by joyboy2001, May 08, 2007, 07:35:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

joyboy2001

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.

Zetan

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?

IchBin

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';
}

joyboy2001


IchBin

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.

joyboy2001

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 !!

IchBin

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.