random siggies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Graffiti7071
Forum Newbie
Posts: 2
Joined: Fri Mar 19, 2004 2:45 pm

random siggies

Post by Graffiti7071 »

hey,

i know this post has been here quite a bit... but,

i have a couple sigs that i really like an i wanna display them randomly at various forums.... like for my avs adn sigs.... how do you do that??? is there some way to implement PHP code in pics??? that sounds really stupid, but how the hell do you do it?

-brian
Goowe
Forum Commoner
Posts: 94
Joined: Mon Mar 15, 2004 9:51 am
Location: Southeast Alaska

Post by Goowe »

I set up a script that lets a user choose the signatures and avatars so they can mix and match and the forum will automatically change the signature and avatar pictures (in a way...)

Here's the script: http://www.disturbedfrenzy.com/scripts/selector/
Example (view): http://www.eyesondesign.net/board/index ... e_Anderson

It works by showing the signatures, the user selects which one they want, and it copies the image the user chose to a new signature.jpg and the forum shows signature.jpg. So the forum code doesn't have to change, just the image it's linked to... does that make sense?

I hope this gives another option for viewing sigs in forums.

If you're still looking for random sigs, you can check out http://www.microcyb.com/?m=c&c=79 and use the same idea they used to create random image urls.

Code: Select all

<?php
$quote = array(
1  => "<img src='image1.jpg'>",
2  => "<img src='image2.jpg'>",
3  => "<img src='image3.jpg'>",
4  => "<img src='image4.jpg'>",
5  => "<img src='image5.jpg'>",
);
srand ((double) microtime() * 1000000);
  $randnum = rand(1,5);
echo"$quote[$randnum]";
?>
One of the problems with this is you have to show a .php file in your signature area on forums :?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

http://www.devnetwork.net/forums/images ... mages.phps

Stick that in directory with images/

Than point to something like this:

http://www.devnetwork.net/forums/images ... hp/sig.jpg
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

i got a random image generator at my site, if you don't want to code yourself...
register, login and click on RRLS
http://www.vigge.net
for more info on what it is, click the (?) on the RRLS page...
suicide
Forum Newbie
Posts: 19
Joined: Wed Jun 14, 2006 10:32 am

Post by suicide »

Pimptastic wrote:http://www.devnetwork.net/forums/images ... mages.phps

Stick that in directory with images/

Than point to something like this:

http://www.devnetwork.net/forums/images ... hp/sig.jpg

does this stil work, im having issues using this for avatars on boards
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Thread necromancy really isn't cool!!

Please dont do it!
Post Reply