Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues
Author Message
horrorcode
Involved
Involved



Joined: Jan 17, 2009
Posts: 272
Location: Missouri

PostPosted: Thu Mar 12, 2009 9:34 am Reply with quote

Well I've been working on a rotating banner block, and this can be achieved with iframes, but I was wondering how else this could be done.

I'm mostly wondering where all the code is that handles the banners. I've seen the code in the index.php, and thought my method would work there but no luck...

In index.php around line 12 I think, you see this:

Code:
Header('Location: '.$clickurl);


Well I was thinking just add a refresh to that since I'm using header refreshes for the iframe, but adding it there doesnt work. Basically I took a block and just removed the block specifics added the refresh and then used that file as an iframe src, so it refreshes every so often.

So what would be a better approach to this? Is there a way ajax or jquery could be used to load a new ad? Or heres a thought, havent tried it but, could it possibly work using something like the supporters block to scroll the banners, just giving a longer delay?
 
View user's profile Send private message
trunks
Worker
Worker



Joined: Oct 05, 2007
Posts: 152
Location: United Kingdom

PostPosted: Thu Mar 12, 2009 10:10 am Reply with quote

the index.php in the nuke root? or in the advertisement module?... i would have though all the info would be in the module..
 
View user's profile Send private message Visit poster's website MSN Messenger
horrorcode







PostPosted: Thu Mar 12, 2009 10:22 am Reply with quote

The index.php in root, yes. I also see some of the same code in the module, and also in mainfile.php.

It being so spread out is why I ask, Im looking in the module but thinking it has to be the code in mainfile or index that's actually used when displaying banners on pages....
 
trunks







PostPosted: Thu Mar 12, 2009 6:58 pm Reply with quote

could you not just include the mainfile.php within the block? sorry im only throwing ideas out... sorry if im not helping in anyway xD
 
horrorcode







PostPosted: Thu Mar 12, 2009 8:04 pm Reply with quote

Umm...Not too sure what the purpose of that would be, but yeah, that probably wouldnt be possible anyways.
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Mar 12, 2009 10:02 pm Reply with quote

You are the completely wrong section of code

It is the ads() function in mainfile.php - and no, you cannot just "make it rotate" by changing the PHP code. You will need some way to update it on the client's browser.. which means Javascript and IFrames

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
horrorcode







PostPosted: Thu Mar 12, 2009 11:08 pm Reply with quote

After going through it all it does make sense that it's the code in mainfile.

I already got it to work with IFrames, but not with JS.

Code:
header( 'refresh: 30;' );


Was originally trying to see if that would work with the existing header function thats in index, shouldve been more clear about that.

Could work in mainfile, but doesnt make a difference since it already works. Basically just wanted to see if anyone else had attempted this.

Thanks again.
 
trunks







PostPosted: Fri Mar 13, 2009 7:21 pm Reply with quote

Well ide personally like to see this work, and correctly as well as cross browser compatible...
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©