Author |
Message |
horrorcode
Involved


Joined: Jan 17, 2009
Posts: 272
Location: Missouri
|
Posted:
Thu Mar 12, 2009 9:34 am |
|
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? |
|
|
|
 |
trunks
Worker


Joined: Oct 05, 2007
Posts: 152
Location: United Kingdom
|
Posted:
Thu Mar 12, 2009 10:10 am |
|
the index.php in the nuke root? or in the advertisement module?... i would have though all the info would be in the module.. |
|
|
|
 |
horrorcode

|
Posted:
Thu Mar 12, 2009 10:22 am |
|
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

|
Posted:
Thu Mar 12, 2009 6:58 pm |
|
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

|
Posted:
Thu Mar 12, 2009 8:04 pm |
|
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
|
Posted:
Thu Mar 12, 2009 10:02 pm |
|
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! |
|
|
 |
horrorcode

|
Posted:
Thu Mar 12, 2009 11:08 pm |
|
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

|
Posted:
Fri Mar 13, 2009 7:21 pm |
|
Well ide personally like to see this work, and correctly as well as cross browser compatible... |
|
|
|
 |
|