| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
- Pages:
- 1
- 2
| Random Affialites | |
|---|---|
| Tweet Topic Started: Jun 16 2005, 01:42 AM (896 Views) | |
| commander-ZNS | Jun 16 2005, 01:42 AM Post #1 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]()
|
Guys I need a script for my site http://www.k-gfx.zerax.net/index.php . So you see where it says BLAH BLAH BLAH. Ok over there I want 6 random affalites to show. 2 affialites will be on the top and 2 will be in the middle and the rest 2 will be on the bottom. Also out of those 6 random affililaites , always want 1 of them to always show. Like the last one. Meanng the affailtie row 3 column 2, there will be 5 affialtes for APPLY NOW in diffrent colors. So the row 3 column 2 affialie will always be the APPLY NOW affiliete and in random colors. So I have 5 diffrent images of APPLY NOW and they must show randomly in row 3 column 2. Random Affilaites to Show in row 3 coloum 2. ![]() ![]() ![]() ![]()
|
![]() |
|
| Jory | Jun 16 2005, 04:54 AM Post #2 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I don't really get the
Looking at the site, I'd say you just want them to be inside the box.
If it always shows, whats random about it? Or do you mean "I always want one so show" ?
All I can make of this is that you have different picts for some them. So In short: Make more sence (of hope somebody other then me comes along, understands it and is willing to help) Oh, and is it me, or is that site showing F-up in FF but good in IE? |
![]() |
|
| commander-ZNS | Jun 16 2005, 11:51 AM Post #3 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]()
|
Random Affilaites to Show in row 3 coloum 2. ![]() ![]() ![]() ![]()
|
![]() |
|
| Jory | Jun 16 2005, 03:09 PM Post #4 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I see they are afflynowblue.gif(ex) in the dir images. Ok, assuming the file is in the rootdir, you could use:
Just put that in the place where you want to have the image. (Of well, just the <img> line, the rest can be anywhere, as long as it is above the <img> line (Like in the <head>, thats where I put stuff like that most of the time.) (This is if you have PHP enabled, what I do assume, looking at the URL you gave (the index.php mart mostly ) )If this gives errors of some sort, please quote them here ![]() I'll see where I went wrong. |
![]() |
|
| FearKiller | Jun 16 2005, 04:29 PM Post #5 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Place all your images that you want to be selected in the array called $imgs. Then select as many images as you want from $imgs by changing the number in the array_rand() function. I used the number "2" in the above example. Finally the foreach loop will print the number of random images you have selected. The above example should print 2 random images that are within the array $imgs. EDIT: EDITED TO ACHIEVE DESIRED AFFECT STATED BELOW. Not makin any guarantees, but that should work I guess. Just input the desired sites and images in the $imgs array seperated by a space. |
![]() |
|
| commander-ZNS | Jun 16 2005, 08:17 PM Post #6 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]()
|
FearKiller- How do I link the images. And what about the last image for the APPLY NOW thing? Qj- I don't understand how your thing works? What do i put the links and the images of the appliest. Where do i put the link and image of the APPLY NOW thing? |
![]() |
|
| Jory | Jun 17 2005, 02:49 AM Post #7 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
The one FearKiller made is proably better. |
![]() |
|
| commander-ZNS | Jun 18 2005, 12:31 AM Post #8 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]()
|
for the one that fear made. Whare do i put the links for the images? |
![]() |
|
| FearKiller | Jun 18 2005, 12:45 AM Post #9 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Put them in the $imgs array. Say you wanted to link to invisionfree. Here's how you would do it.
Make sure you have a space between the link and the path to the image or it won't explode properly in the loop. |
![]() |
|
| Captain Kam | Jun 18 2005, 12:48 AM Post #10 |
|
Custom member title
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Just out of curiosity, may I use the blue "Apply Now" button for my own affiliation box? ^^' Here's one I use for random images: Place this in your <head> tags:
(NOTE: Please edit the following with your Apply Page)
And then place the following where you want the random button at:
If there's something wrong with this code, it's prolly the <script> tags. o_O' You're welcome in advance. o_o' I spent 10 minutes rewriting my code to fit yours. |
![]() |
|
| pingu2k4 | Jun 18 2005, 05:51 AM Post #11 |
|
Member
![]() ![]() ![]() ![]()
|
I would also like to have a random affilliates box, but 1 without pictures for them, where it shows a specified number of the affilliates. Say i had 3000 affilliates to show, but i only had room for 5, i would want it to show a different 5 websites each time. (by the way, the thing about not having pictures might be making it harder, but im serious about that part) so, what language would i use for starters? |
![]() |
|
| Jory | Jun 18 2005, 07:34 AM Post #12 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well, for things like this, I'd say PHP. JS can do it, but I just don't really like it ![]() (And compare the code FearKiller posted to the code Dark Kam posted. 10 lines <> about 30/40 (:unsure: ) And the more you ad, the worse that gets. So PHP can do it much shorter to )The no images is not a big deal.
This would end up looking like:
Just ad lines more lines to it. (For 3000 sites, this will be some work, but that can't be helped (not by me anyway )
|
![]() |
|
| pingu2k4 | Jun 21 2005, 03:46 PM Post #13 |
|
Member
![]() ![]() ![]() ![]()
|
Ok, and do i have to put a <sript type =BLAH> and </script> tag anywhere for tht? and what language is that? |
![]() |
|
| Luke6006 | Jun 21 2005, 03:58 PM Post #14 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Read the pinned topic. |
![]() |
|
| Jory | Jun 21 2005, 04:18 PM Post #15 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
This is PHP. start the code with <?php and end it with ?> (So no <script> tags) Just put the full code where at the place where the box is.
He couldn't use this for his forums, as IF does not allow you to put php in the boardwrappers or in any other place. And all the topic really says is that you shouldn't post things relative to IF and that Seth fears Jeremy.
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Technology Chat · Next Topic » |
- Pages:
- 1
- 2
| Track Topic · E-mail Topic |
4:55 AM Jul 11
|



![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)







) )

4:55 AM Jul 11