View Full Version : User signature in getinfo?
dirgotronix
02-06-2002, 11:24 PM
I'd like to be able to display a users signature in the getinfo template. Is it defined in a variable somewhere, or any simple way I could go about that?
Floris
02-08-2002, 08:03 AM
Uhm, this is something i'd like to know too, but so far, no luck with just altering the templates. But I am a bit new to this
Lesane
02-08-2002, 09:09 AM
Its defined as $post[signature] in functions.php, however i know how 2 do it with an extra query. It works great on my board, u have 2 add a piece of code in member.php. If you are interested in the extra query method then let it me know :D
dirgotronix
02-08-2002, 03:38 PM
Well of course I'm interested. I know how to get the sig in, now I just need to parse it for vbcode and line breaks.
Lesane
02-08-2002, 03:50 PM
This is how i did it:
Open member.php, find:
// ############################### start get info ###############################
if ($action=="getinfo") {
$templatesused = "getinfo_sendpm,aol,icq,yahoo,getinfo_birthday,geti nfo_customfields,getinfo";
include("./global.php");
Add below:
global $allowsignatures,$allowsmilies;
then find:
if ($userinfo[yahoo]!="") {
eval("\$userinfo[yahooicon] = \"".gettemplate("yahoo")."\";");
} else {
$userinfo[yahoo]=" ";
}
Add below:
if ($userinfo[signature]!="" AND $allowsignatures) {
$post[signature]=bbcodeparse($userinfo[signature],0,$allowsmilies);
eval("\$userinfo[signature] = \"".gettemplate("postbit_signature")."\";");
} else {
$userinfo[signature]="None";
}
Save & Upload Member.php
Open the template User Info Display Templates -> Getinfo
place $userinfo[signature] whereever you want the signature to be displayed
Done!
eg_92901
04-25-2002, 05:55 PM
I tried this but it does support HTML, just writes out the code
It just shows the VB code, how can I get it to convert to html
Xenon
05-29-2002, 08:16 PM
before
eval("\$userinfo[signature] = \"".gettemplate("postbit_signature")."\";");
add:
$post[signature]=bbcodeparse2($post[signature],0,1,0,1);
perhaps you have to cange one 0 to an 1. it means do parse html, smilies, urls and images, the first is html so i took 0 ;)
Why do this query?
$DB_site->query("SELECT signature from user WHERE userid=$userid");
The signature is already stored in $userinfo[signature]
Lesane
05-30-2002, 09:58 AM
Post #5 Is Updated ;)
Boofo
05-30-2002, 12:04 PM
That second part of the code is in a different location than the one I did from your first post. Do I need to move it to there or is it allright where it is at?
Scrub
05-31-2002, 01:51 PM
https://vborg.vbsupport.ru/showthread.php?s=&threadid=33926&highlight=signature+profile :eek:
Boofo
05-31-2002, 02:23 PM
I meant the code placement in the member.php file. I had already put it in another spot in that file. I went ahead and moved it according to Lesane's updated post just to be safe. Works great!
Originally posted by Billy Cowen
https://vborg.vbsupport.ru/showthread.php?s=&threadid=33926&highlight=signature+profile :eek:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.