| This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy. Visit the NEW ZetaBoards Support forum! |
| Ad System v1 | |
|---|---|
| Topic Started: Jan 27 2008, 10:54 PM (6,009 Views) | |
| Spark | Jan 27 2008, 10:54 PM Post #1 |
|
Nukem Corporation
![]() ![]() ![]() ![]()
|
Ad System v1 Authors: Spark. Thanks to GenerationStudio for the add row to board stats code. Preview: http://nukem.sytes.net (look in Board Statistics) Code: Javascript box:
Below the board:
Installation: This code may seem complicated but in fact it's very easy to edit. Place the above codes in the boxes I have specified. For the first part, edit all the links in red. Do NOT add http:// in front of the image links, that has been done for you in the code. For the second part you will need to edit the parts in red as you wish. Now, for the parts in blue. The link in blue is the link you have added first in the first part. In my code, support.zetaboards.com would be my first link. This time you have to add http:// in front of the link. Now, the image link is blue is the the image you have added first in the first part. In this case, http://linkurl.com is my first image link, so I add that. You must get that part right or the ads won't rotate. Any questions, please ask. Edited by Spark, Jan 28 2008, 09:38 PM.
|
![]() |
|
| Dennis | Jan 27 2008, 11:29 PM Post #2 |
|
Member Extraordinaire
![]()
|
Why on earth aren't you using a nested array? Matching entries in two arrays is a horrible way to go about this. array( [0] = array ( link => 'http://support.zetaboards.com' image => 'http://image.com/image.jpg' ) [1] = array ( link => 'http://support.invisionfree.com' image => 'http://image.com/image1.jpg' ) ) |
![]() |
|
| Victrixs | Jan 28 2008, 12:03 AM Post #3 |
|
Website Developer
![]() ![]() ![]() ![]() ![]()
|
sweet code I'm currently using this. |
![]() |
|
| Spark | Jan 28 2008, 12:18 AM Post #4 |
|
Nukem Corporation
![]() ![]() ![]() ![]()
|
Dennis, it will be improved in v2. For now it works, loads fine and won't cause the support team any trouble with members asking them to fix their board.
|
![]() |
|
| Dennis | Jan 28 2008, 12:37 AM Post #5 |
|
Member Extraordinaire
![]()
|
http://support.zetaboards.com/topic/1237/1/ |
![]() |
|
| Spark | Jan 28 2008, 12:50 AM Post #6 |
|
Nukem Corporation
![]() ![]() ![]() ![]()
|
Dennis, I did some research into that type of array and found out that it is for PHP, not Javascript.
Edited by Spark, Jan 28 2008, 01:32 AM.
|
![]() |
|
| Dennis | Jan 28 2008, 01:26 PM Post #7 |
|
Member Extraordinaire
![]()
|
No, they certainly are for javascript as well. http://en.wikibooks.org/wiki/JavaScript/Arrays#Nested_arrays |
![]() |
|
| Viral | Jan 28 2008, 02:05 PM Post #8 |
|
i'm stanley nao
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
That type of nesting is PHP. It's the only coding language I have ever seen it in. Also, that wikibook has a different type of nesting for JS. |
![]() |
|
| Dennis | Jan 28 2008, 02:37 PM Post #9 |
|
Member Extraordinaire
![]()
|
I realize that. The example I posted earlier isn't the code, it's the output. I should have been a bit clearer. When you build a nested array, what I posted is the logical output. While it may not be the exact output of printing an array, it's pretty close. Spark was confused, so I posted a link to how javascript works. I'm a php guy first, so I think and code in a method that's influenced by php, but the logic behind it is sound.
Edited by Dennis, Jan 28 2008, 02:41 PM.
|
![]() |
|
| Eureka | Jan 28 2008, 08:34 PM Post #10 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
Heya Nuke, For the arrays, you can do something like this:
What do you think? Yes? Eureka |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · User Created Codes · Next Topic » |




![]](http://209.85.62.24/static/1/pip_r.png)




12:10 PM Dec 8