PDA

View Full Version : Random pics in sigs


ULTIMATESSJ
07-22-2002, 02:37 PM
Most of my members moan about not being able to use flash in their sigs so they can display more than 2 in their sig, so i thought of making a hack to help them display a random picture in their signiture, i looked into this and seen this code


$images = array(1 => "image1.gif", 2 => "image2.gif"); // and so on....
$ni = rand(1, 10); // $ni = next image;)
header("Location: $images[$ni]");


how would i be able to integrate this with vBulletin and give the users the ability to do this?

ULTIMATESSJ
07-24-2002, 02:41 PM
bump

Velocd
07-24-2002, 07:36 PM
Hmm, this would be a difficult hack to make, unless you enable HTML in your signatures I suppose.

Here is my suggestion:
Create X amount of new fields (lets say 4) in the usercp profile page under the signature field. Then allow the user to enter up to 4 different URL's of signatures. Then you could probably work your way somehow with one of those banner rotation scripts and integrate it with vBulletin to allow a member to rotate their 4 banners. You could have more than 4 ofcourse, or you could even allow the user to specify how many he wants, ofcourse this adds more coding on your part.

Attached is the simplest banner-rotation script I know of.

ULTIMATESSJ
07-25-2002, 02:09 PM
Originally posted by Velocd
Hmm, this would be a difficult hack to make, unless you enable HTML in your signatures I suppose.

Here is my suggestion:
Create X amount of new fields (lets say 4) in the usercp profile page under the signature field. Then allow the user to enter up to 4 different URL's of signatures. Then you could probably work your way somehow with one of those banner rotation scripts and integrate it with vBulletin to allow a member to rotate their 4 banners. You could have more than 4 ofcourse, or you could even allow the user to specify how many he wants, ofcourse this adds more coding on your part.

Attached is the simplest banner-rotation script I know of.

i had attempted it using that method, by adding a new part to the usercp telling them where to put it, it sorta worked, but i am still looking into how i could make them specify how many they want, and looking for another way other than profile fields

DrkFusion
07-25-2002, 06:17 PM
Anyone know if replacements might work?

I am guessing they won't, I am thinking of a way to do this...why don't you just allow flash? with the [swf] replacement...I think I saw some addon about flash somewhere.

Drk

Velocd
07-26-2002, 03:43 AM
I can't see how this would work without having some type of profile field...the user has to somehow enter the URL's of the images that need to be rotated, the method you had thought of and that I suggested is the only way I could see it being done. That way the info can be stored in the database via a query.

As for the quantity of signatures, to get this you just have a field that allows the user to type in a number, and upon hitting the "go" button, it generates X amount of new siggie fields.

There is one way easier for users, the only other way I could see it being done. Have the user make a animated gif with all the signatures inside, set at slow frame speed ;)

...now that I think of it though, there might be another way, but a probably very hard to code way--and this is probably the way that would best suit you and your members.

Somehow create a new tag, that possibly looks like:


http://www.mysite.com/images/sig.1jpg
http://www.mysite.com/images/sig.2jpg
http://www.mysite.com/images/sig.2jpg



This code could be placed in the signature field, and would output, after integration somehow in the randombanner script, as one signature that changes upon refresh.

Now how all this is done, I have no clue :)

ULTIMATESSJ
07-26-2002, 11:08 PM
Originally posted by Velocd

...now that I think of it though, there might be another way, but a probably very hard to code way--and this is probably the way that would best suit you and your members.

Somehow create a new tag, that possibly looks like:


http://www.mysite.com/images/sig.1jpg
http://www.mysite.com/images/sig.2jpg
http://www.mysite.com/images/sig.2jpg



This code could be placed in the signature field, and would output, after integration somehow in the randombanner script, as one signature that changes upon refresh.

Now how all this is done, I have no clue :)

hmmm, not a bad idea, only problem is with having limited lines in your signiture, if you want to have around 10 sigs rotating randomly it's gonna take up around 12 lines, which with most forums, you won't be allowed to do so

corsacrazy
12-26-2002, 03:42 PM
HELP this is a great idea i would also like to have a random sig !

PSI|Dr-X
01-03-2003, 07:20 AM
Thats very easy you can do that with GD library

ULTIMATESSJ
01-03-2003, 10:12 AM
perhaps you could get this hack made then, i have a small idea on what you could do, but i'm a php n00b still

Chris M
01-03-2003, 10:21 AM
Its fairly simple...

Just add a certain number of Fields to the user table, then get a MySQL Query in admin/functions.php to pull all signature images from the user table, and make it order them randomnly in the query and set a Limit of 1...:)

Satan

corsacrazy
01-03-2003, 10:27 AM
Originally posted by hellsatan
Its fairly simple...

does this mean there is a chance of you releaing it ?

ULTIMATESSJ
01-03-2003, 10:42 AM
well it sounds simple enough, but how would you add it into vBcode