View Full Version : Signature Image System
NTLDR
03-11-2004, 10:00 PM
Signature Image System v1.0
Firstly if you use profile pictures on your forum, this hack isn't for you. Basicly this hack uses the user profile picture option in vB3 to upload an image for users to use in there signature on your site only.
This has been tested on vB3 Gamma, but should work on the RC's too.
Upload signature.php to your forums directory and make the following changes:
in includes/functions_showthread.php find:
$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
Add after:
// EDIT ################################################## ######################
// replace sig img code
if ($vboptions['profilepicenabled'] AND ($checkperms['genericpermissions'] & CANPROFILEPIC)) {
$post['signature'] = preg_replace('/\[signatureimage\]/i', fetch_signature_url($post['userid']), $post['signature']);
}
In profile.php find:
$previewmessage = parse_bbcode2($signature, $vboptions['allowhtml'], $vboptions['allowbbimagecode'], $vboptions['allowsmilies'], $vboptions['allowbbcode']);
Add after:
// EDIT ################################################## ######################
// do sig image
if ($vboptions['profilepicenabled'] AND ($permissions['genericpermissions'] & CANPROFILEPIC)) {
$previewmessage = preg_replace('/\[signatureimage\]/i', fetch_signature_url($bbuserinfo['userid']), $previewmessage);
}
In member.php find:
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 0, 0);
Add after:
$previewmessage = preg_replace('/\[signatureimage\]/i', fetch_signature_url($userinfo['userid']), $previewmessage);
In includes/functions.php add the end somewhere above the comment (note the comment varies for everyone:
/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded: 03:57, Fri Dec 5th 2003
|| # CVS: $RCSfile: functions.php,v $ - $Revision: 1.901 $
|| ################################################## ##################
\*================================================ ======================*/
?>
Add:
function fetch_signature_url($userid) {
global $_SERVER;
return '<img src="signature.php?userid='.$userid.'&sig='.(TIMENOW + 30).'&req='.md5('http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']).'" border="0" />';
}
In the MEMBERINFO template find:
<if condition="$show['profilepic']">
Replace with:
<if condition="$show['profilepic'] AND $never_show_this">
Now you will need to visit the edit profile picture page in the User CP (profile.php?do=editprofilepic) and edit the phrases in the phrase manager to suit your needs. Searching for the text is easy so I'm not going to list all the phrases.
Now users can use [signatureimage] in there signature where they want the uploaded image to appear. Note you'll need to edit the usergroups permissions for Profile Pictures in the Usergroup Manager, where you can specify image size and file size restrictions.
Oblivion Knight
03-12-2004, 12:45 PM
Very nice idea.. :)
Would be nice to have a separate upload area from the custom profile pic (I use the custom profile pics), but a great mod all the same.
VeoMorphine
03-12-2004, 12:54 PM
ya, this would be very very good if you could make a seporate place for the sig to upload because i use profile pictures.
msimplay
03-12-2004, 01:08 PM
not working on rc4
NTLDR
03-12-2004, 01:09 PM
Can you expand? Not working doesn't exactly help ;)
gmarik
03-12-2004, 03:28 PM
If only I could use several signatures. ..
colicab-d
03-12-2004, 04:46 PM
nice was expecting a port of the vb2 sig system.. but still good work, if we didnt like / use our profile pics as much as me and the other staff do then this would be excellent
sabret00the
03-12-2004, 06:16 PM
nice was expecting a port of the vb2 sig system.. but still good work, if we didnt like / use our profile pics as much as me and the other staff do then this would be excellent
aye i like the profile pics too :)
eXtremeTim
03-12-2004, 06:59 PM
So any chance we can get a version not dependant on the profile pictures stuff?
NTLDR
03-12-2004, 07:02 PM
Not in the near future, at least not by me. I only released this version because people wanted it.
Fi_InCogNiTo
03-12-2004, 09:50 PM
I'm using RC4 and did everything step-by-step, but all I see is a red X in my sig. Maybe RC4 is different?
NTLDR
03-12-2004, 09:57 PM
It should work, but as said I've not tested on the RC's as I use Gamma and I don't see much point when gold is out next week.
Whats the URL for the image? Note signature.php must be called within ~60 seconds of the page load and your browser must pass on the referer of the page and this must match the page that your trying to use the image on.
Fi_InCogNiTo
03-12-2004, 10:20 PM
The url comes up as this if I click properties in my sig on the red X:
http://www.pc-nerd.com/signature.php?userid=1&sig=1079137304&req=24cf6c7dceb6b235aab34b66c922e904
If I click properties on the image that shows in my usercp under "Your Current Signature Image" I get this:
http://www.pc-nerd.com/image.php?u=1&type=profile&dateline=1079137226
Was I supposed to UL signature.php to forum root?
Fi_InCogNiTo
03-12-2004, 10:55 PM
Also, in member.php mine is a lil different:
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 0, 1);
And not like what was in your instructions:
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 0, 0);
Could that maybe be why I'm getting the red X?
lasto
03-13-2004, 11:46 PM
so this dont work on rc 4 ???
Nice hack NTLDR but wont install till someone confirms it works on RC4
Vb-Hispano
03-30-2004, 11:16 AM
working in Gold?
NTLDR
03-30-2004, 12:32 PM
Should work fine with every version after 3.0.0 Gamma, however I've not personally tested it with any other version.
GamerzWorld
03-30-2004, 01:07 PM
"Now you will need to visit the edit profile picture page in the User CP (profile.php?do=editprofilepic) and edit the phrases in the phrase manager to suit your needs. Searching for the text is easy so I'm not going to list all the phrases.
Now users can use [signatureimage] in there signature where they want the uploaded image to appear. Note you'll need to edit the usergroups permissions for Profile Pictures in the Usergroup Manager, where you can specify image size and file size restrictions."
Can somneone explain this to me. I did the rest of the templates but when i go to user cp and click picture it stillc omes up with old page. I know i have to change it to the signature .php which it tells you how to do inm that bit up above but i dont undertsna dwhat exactly i do
NTLDR
03-30-2004, 01:30 PM
The edit profile picture page becomes the edit signature image page, you need to edit the text shown on that page via the phrase manager to suit your needs.
Bad Bunny
03-31-2004, 04:19 PM
The edit profile picture page becomes the edit signature image page, you need to edit the text shown on that page via the phrase manager to suit your needs.
My users are pretty novice (had to show one how to check his email...), so this would probably be best if it could automatically be called in the postbit. That should be possible, right? Do an if statement, and call it. Then when they post, it will appear automatially, and they can also have a signature (even though most are not even aware what a signature even is).
lasto
03-31-2004, 04:32 PM
no one tired this on vb3 gold as yet
is hard to believe vb3 does`nt have a decent sig uploader already built into it
lasto
03-31-2004, 04:45 PM
Dont work on Gold
I also get the red X when i use the [signatureimage] in me sig box
msimplay
03-31-2004, 05:32 PM
i would try it but i like the idea of profile pictures :o
lasto
04-08-2004, 01:30 PM
just re-tried this on another copy of vb3 gold and im still getting the red x where the sig should be
NTLDR
04-08-2004, 01:41 PM
Whats the URL for the image? Note that the URL changes every request and that your browser must send the HTTP_REFERER variable and the referrer in the URL must match this and that it must be within ~60 of the URL being generated.
If you comment out lines 43-46 in signature.php and the image shows then thats the problem.
Works flawlessly for me on both 3.0.0 Gamma and 3.0.0.
lasto
04-08-2004, 02:55 PM
still red x even if i comment out the lines in signature php
not sure why cause all i do is load the pic up using the profile page link - i can see it but it dont appear in my posts.
/forums/signature.php?userid=1&sig=1081439840&req=afe5abd7e1bbc945ccb8c852b528df1c
Yapluka
04-12-2004, 04:14 PM
Exactly the same problem as lasto :
/image.php?u=1&type=profile&dateline=1081789262
/signature.php?userid=1&sig=1081789909&req=a7274137a1de6ef2e61114224ea68c0e
Still have the red X... what to do ?
Nice hack... when it works ! Thanks anyway.
JKeats
05-18-2004, 05:17 PM
i've created a .txt for this hack that includes the phrase edits (there's 6 of them) and a USERCP_SHELL edit as well (to move the signature image link up to just under the signature edit link).
hope it helps some ppl.
as for me, i'm on 3.0.1, and i get the dreaded redX with this. i do feel, however, that it's a great hack for ppl not interested in profile pics. hopefully someone will be able to correct the redX problem for those of us currently experiancing it.
additionally, if somehow the [signatureimage] could be auto added to the signature, so that it was a one step deal (i.e. you upload a sig image, it's placed in your signature automatically) that would be awesome.
hope this one gets ironed out!
NTLDR
05-18-2004, 10:11 PM
Try removing the following if block from signature.php:
// check the request is from a valid referer, if not send a 404 header
if (TIMENOW > $_REQUEST['sig'] || ($_REQUEST['sig'] > (TIMENOW + 30)) || $_REQUEST['req'] !== md5($_SERVER['HTTP_REFERER'])) {
header('HTTP/1.1 404 Not Found');
exit;
}
Thats the part that checks if the image is allowed to be shown or not. Note that this will enable hotlinking etc unless you add other measures to protect against it.
Yapluka
05-20-2004, 06:20 AM
I still commented this part but always get the redX...
tHe Rk
06-13-2004, 12:37 AM
Will this work with 3.0.1?
dutchbb
06-19-2004, 09:20 AM
Doesn't work, also red X. Did everything like the instructions. This hack needs work.
error_22
02-21-2005, 09:14 AM
will this work on any vB 3 version? I would love to use this!!!:)
Kruppa
03-03-2005, 05:08 PM
It just doesn't go fetch the image. It uploads fine and I can see it in the userCP and admin CP but:
1) If I look up my profile from the forum page, only the text part of my signature is displayed
2) In the threads, only the text part appears under my posts
I'm running version 3.0.6
Can anyone help?
Scerina
03-09-2005, 09:01 PM
how do we edit the Phrases part? What do we do? Am new to all this and I need some help in this area
CHIngs
03-14-2005, 04:24 AM
It just doesn't go fetch the image. It uploads fine and I can see it in the userCP and admin CP but:
1) If I look up my profile from the forum page, only the text part of my signature is displayed
2) In the threads, only the text part appears under my posts
I'm running version 3.0.6
Can anyone help?
I am having the SAME problem :(
error_22
03-29-2005, 07:02 PM
anyone who can make this work? thanks
lasto
03-29-2005, 07:54 PM
none of the sig hacks work for vb3 - have tried quite a few on here and they all have one problem or another with them.Im really quite amazed that no one has made one as tbh it should be default in VB.
There is a new hack that does upload your sig to imageshack or something but thats only one i not tried as yet.
Jenta
04-04-2005, 03:03 PM
won't work on a clean 3.0.7
only get [signatureimage] as text in signatures
error_22
04-09-2005, 07:41 AM
too bad... Its a great add-on/hack! I would love to use this!!
boostedsti
04-29-2005, 07:44 PM
You can always just simply do this above the sig in the postbit template..
<img src="image.php?u=$userinfo[userid]&type=profile&dateline=$userinfo[profilepicdateline]" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]" /><br />
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.