PDA

View Full Version : no sig image


hypedave
10-25-2002, 08:21 PM
Im look for a hack similiar to the no avatar image hack, but this one will work for users with no signature txt or image, this should be an easy one, can any one tackle this down.

If the user doesnt have an sig image , the admin can specify a default sig image to like advertise a product etc.

If the user doesnt have any txt the admin can specify a default sig text

thanks

Chris M
10-25-2002, 08:28 PM
The txt would be hard, because if they have a Sig Image, the [IMG] code would be counted as text;)

Satan

hypedave
10-25-2002, 08:33 PM
:classic: ok fair enough, lets scratch the text part then :bandit:

Chris M
10-25-2002, 08:36 PM
The sig image part...

I was having a think of a way to do this, but it doesnt seem that easy to achieve...

It depends what type of image you would want inserted - Would it be just a random image url, or one standard url, which grabs a random image?

Satan

hypedave
10-25-2002, 08:38 PM
Random image would be nice, but I rather just stick with a standard image :classic:

Chris M
10-25-2002, 08:43 PM
Hmmm...

Lemme see now...

I need to find a Query that can search the User table, and detect if there is any content in the signature row...

Hmmm...

Satan

Chris M
10-25-2002, 08:50 PM
<i>Edit: Doesnt work...:cry:</i>

Satan

Chris M
10-25-2002, 08:55 PM
Damn that doesnt work:(

Satan

hypedave
10-28-2002, 06:57 PM
hey I know you are pretty busy, hows it coming along, talk ta ya on Friday

Chris M
10-28-2002, 07:23 PM
Its ok dave...Im here this week;)

Not next week though...

Im still experimenting with it:)

Satan

NTLDR
10-28-2002, 07:23 PM
Should be pretty easy IMO, just a smal edit to functions.php should be required. When I have access to my laptop I will take a look ;)

Chris M
10-28-2002, 07:47 PM
I thought that...

It didnt work:(

Satan

NTLDR
10-28-2002, 07:59 PM
Open admin/functions.php find:

} else {
$post[signature] = "";

Replace with:

} else {
$post[signature]="ABC";
$post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
eval("\$post[signature] = \"".gettemplate("postbit_signature")."\";");
$sigcache["$post[userid]"] = $post[signature];

Change ABC to what you want to use as the sig, vBcode is allowed.

hypedave
10-29-2002, 12:30 AM
works like a charm on this end

Chris M
10-29-2002, 12:01 PM
Hmmm...Thats exactly what I tried on my machine, and it caused a Parse error:confused:

Ah well - :)

Satan

hypedave
10-29-2002, 12:29 PM
what did you put in place for abc

Chris M
10-29-2002, 01:01 PM
<img src=\"$sigimgurl\">

Then I added a setting in the vBulletin Options to define "$sigimgurl" as a default Sig Image url:)

Satan

NTLDR
10-29-2002, 01:05 PM
Originally posted by hypedave
what did you put in place for abc

Put whatever you want to appear in the users sig like you would in the User CP. Make sure you put \" in the string so you don't get parse errors like hellsatan posted above.

Chris M
10-29-2002, 01:07 PM
I take it we can use HTML?

Satan

NTLDR
10-29-2002, 01:09 PM
It uses the standard rules for sigs, so if HTML is on you can use if, if not it shouldn't work.

Chris M
10-29-2002, 01:11 PM
Right I see...

Anyone know how to do a line break in vBcode?

Satan

NTLDR
10-29-2002, 01:12 PM
Use a textarea in the options so you get multiple lines, I think that should work ;)

Chris M
10-29-2002, 01:15 PM
Cool...I'll let you know;)

Satan

Chris M
10-29-2002, 01:20 PM
It didnt work:(

Satan

hypedave
10-29-2002, 07:42 PM
[*IMG*]http://www.path.to.im/com/image.gif[*/IMG*]

thats what I used :rolleyes:

take out the * of course

Chris M
10-29-2002, 07:47 PM
I tried to do it via the Admin Cp;)

Satan

hypedave
10-29-2002, 07:51 PM
you mean you making an acp side of this hack :cross-eyed:

Chris M
10-29-2002, 08:08 PM
Yeh...

I changed it via admin/functions.php:)

Now It has advertisement info in it:D

Why shouldn't I spam my advertising? It may get me more referrals;)

Satan

hypedave
10-29-2002, 08:51 PM
Originally posted by hellsatan
Why shouldn't I spam my advertising? It may get me more referrals;)

Satan


See you reading my mind now :bunny:

Chris M
10-29-2002, 08:56 PM
Lol...

It works, and its on my site, so I dont care what others think:D

Satan

DrkFusion
10-29-2002, 08:57 PM
Thanks for this little mod, works great NTLDR.

-Arunan

Chris M
10-29-2002, 09:14 PM
Have you seen it in action @ DarkBlazes?

Search for one of Teapot's posts;)

Satan

DrkFusion
10-29-2002, 09:20 PM
Hehe, jup I saw it :)

Seems really nice, though I am have doubts, cuz I don't know what to put lol
-Arunan

Chris M
10-29-2002, 09:23 PM
Well...You could put a Sponsor's banner, or a Banner to another site of yours/a friend's...

Satan

DrkFusion
10-29-2002, 09:27 PM
Thanks for the suggestions, maybe I will put "No sig selected" :)

-Arunan

Chris M
10-29-2002, 09:35 PM
Lol...

Why not signup at Commission Junction and get advertising out of it?

Satan

hypedave
10-29-2002, 09:50 PM
Originally posted by DrkFusion
Thanks for the suggestions, maybe I will put "No sig selected" :)

-Arunan


my users didnt like the no sig image i made, lol

Chris M
10-29-2002, 09:54 PM
Lol...

I havent got the gfx skills to:(

Satan

NTLDR
10-29-2002, 10:20 PM
I'll look into some nice CP integration and posiblbly random sigs so hellstatan can have random CJ banners displayed :p (not sure on the query side of that though)

hypedave
10-29-2002, 10:41 PM
Originally posted by NTLDR
I'll look into some nice CP integration and posiblbly random sigs so hellstatan can have random CJ banners displayed :p (not sure on the query side of that though)


that would be very nice, let us know how that goes

Chris M
10-30-2002, 09:28 AM
Yes please!:)

Satan