PDA

View Full Version : [RE-RELEASE vB2.0] signature-editor with preview


Fryzid
Sun 25th Mar '01, 11:53am
This is just a re-release of a hack by AA. He made this hack for vB 1.x and I made some small changes to make it work with vb 2.x

It adds a signature-editor with preview ability to your vB.

It's very simple. You just have to create a new template (_editsignature) and copy sedit.php to your vB directory. Then add a link to sedit.php in the modifyprofile template. Done.

Install instructions are included.

Fryzid

JamesUS
Sun 25th Mar '01, 4:00pm
Sounds great, thanks :)

mrlister
Sun 25th Mar '01, 5:54pm
not bad. good job

express
Sun 1st Jul '01, 1:57pm
Does this work for vb2.0.1?

Joey

Fryzid
Sun 1st Jul '01, 2:10pm
It should.

express
Sun 1st Jul '01, 4:41pm
Here goes. I never had been using my signature before. I added it to my profile earlier today. After I did that I installed your hack. Program came up loaded when I clickd on it but it did not show the signature that I had in my profile I even tried tp preview it, Everything worked fine except it would not show me the signature.

Joey

express
Sun 1st Jul '01, 10:34pm
Working! I had to change the number of lines from 4 to 10 in the sedit.php file.

Thanks For A Great Hack

First-Man
Mon 2nd Jul '01, 5:43am
Hi Ho
Fryzid Echt Spitze Hack... der von AA (für 1.**) hatte bei mir nie richtig geklappt :) Der jetzt schon. Super.
Danke

express
Mon 2nd Jul '01, 2:07pm
Fryzid

One question and it works great. This morning I tried something. I registered as a new user on my board. When setting up options for the new user your signature editor does not show up. Afterwards though when you sign into the board and look at your profile you can use the editor. So somehow I think it needs to be added to the register.php file.
any idea's

Fryzid
Mon 2nd Jul '01, 3:28pm
You need to put the link to the editor into the registeradult and registercoppa templates.

But the problem so far is that there is no user entry in the database where the signature can be stored. So the editor will not work in these templates.

The signature editor was intended to help building and viewing the signature. You want something like controlling the signature.
This needs far more hacking and should be integrated into the vB php files.

I would suggest controlling the signature exclusive via the editor. Delete the signature input fields from all templates and just offer the link to the editor. In the above mentioned register templates you can say that the signature is definable later in the user cp.

express
Mon 2nd Jul '01, 3:33pm
I agree so you are saying leave what I have just add a comment in the register template that entitles the new user to edit his signature in the their profile after they register.

That will work

Joey

Thanks For Time and For the hack

Bad_Madman
Fri 27th Jul '01, 5:53pm
Also erstmal @Fryzid: ein grosses super-cool-*freu*-genial wegen
Deiner deutschen Style-Datei inkl. deutsche Grafiken :) :)

Changes for vB Code Editor in Signature Editor:

change content of template _editsignature.txt:
replace with content of attached file

edit sedit.php
find:
$signatureform=$signature;
$signature="";
replace with:
$signatureform=$message;
$message="";

finished :D

Madman

JenniferS
Sat 28th Jul '01, 3:12pm
thank you very much!

VirtueTech
Sun 29th Jul '01, 2:44am
See Post Below This one for better update

FIX: For all of those using Bad_Madman's addition.

At the top of sedit.php after

require("global.php");
$noheader=1;


Add this:


if ($bbuserinfo[showvbcode])
$vbcode_buttons = getcodebuttons();


You might also need to change reference to the 'sedit' script in Bad_Madman's new template to .php from .php3

This is just a heads up :)

VirtueTech
Sun 29th Jul '01, 4:07am
HACK UPDATE:
I have updated this hack a bit with my fix above and some other additions as you'll see below. Credit goes to AA and Fryzid.

Additions Adds new 'navbar' to header
Adds Control Panel navbar to header
Adds smilies window to signature editor
Centralized Signature Limit Variable at top of script as an option.
Ability to allow "Administrators" to have different siganture length.
Fixes Bad_Madman's vbcode additon
Cleans up HTML a bit
Screenshot
http://images.paintballcity.com/sig_hack.gif

Directions
The attached file contains the following new items:
- '_editsignature' template
- sedit.php

Upgrading: Just replace the old template and php script with the new ones
First Time Install: Read the modified install.txt

07/29/01 6:19AM EST - First attachment had bad files. Please re-download.

ozone2000
Sun 29th Jul '01, 6:11am
please help me!!!!!!!!!

ive done as the install.txt tells me, but i still dont get it as on the screenshot, here is a screenshot of how it looks at my friends board:

please help

VirtueTech
Sun 29th Jul '01, 6:32am
DOH! :eek:

Sorry....I zipped the wrong file. Please re-download the zip file.

ozone2000
Sun 29th Jul '01, 6:36am
THANKS YOU VERY MUCH!!!!!!!!!!!!!!!!!!!!!!
now it all works, thanks for re-uploading the file!

ozone2000
Sun 29th Jul '01, 7:08am
can u tell me the code for a standard buttn called "Signature Editor" that links to "sedit.php?action=show" because i have tryed different codes, and most of them doesnt work, or screw up the whole code... can u help me?

Bad_Madman
Sun 29th Jul '01, 12:33pm
@VirtueTech > ohhhh, I forgot this ($vbcode_buttons = getcodebuttons(); ) in my reply - I am soooo forgetful - Sorry :(

but the smiles-hack in signature editor is nice :) :)

Madman

Me2Be
Thu 2nd Aug '01, 3:49am
Pretty cool! My girls are going to love this, thank you!

Afterburner
Fri 24th Aug '01, 8:26am
If you go to the usercp click on edit profile than on Signatur editor it shows the bug in the attachment, if you click on prewiew (also without changes) it seems OK

Hondastyle
Sat 25th Aug '01, 11:53am
This is a very nice hack...
Also, the instructions were very simple and it was extremely easy to install (even for the Urkels of hacks like myself..)

Thanks very much. :)

Hoffi
Sun 26th Aug '01, 3:45am
Hi,

i must change in my members.php the following:

find:
-------------------------------------------------------------------------------
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='$customtitle',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");


and replace with:
-------------------------------------------------------------------------------
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',customtitle='$customtitle',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");

In the old SQL-Statement was the Signature Field in the Database updated with a non-existing Form-Field of the Site. So i removed the Signature-Filed from the SQL-Statement.
Before this, the Signature was deleted when saving the Profile, because the Filed was missing.

ozone2000
Sun 26th Aug '01, 9:03am
so the code does?? sorry if you explained it in your text, but im not so good at english!

Steve_C
Sun 26th Aug '01, 1:04pm
Originally posted by Hoffi
Hi,

i must change in my members.php the following:

find:
-------------------------------------------------------------------------------
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='$customtitle',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");


and replace with:
-------------------------------------------------------------------------------
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',customtitle='$customtitle',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");

In the old SQL-Statement was the Signature Field in the Database updated with a non-existing Form-Field of the Site. So i removed the Signature-Filed from the SQL-Statement.
Before this, the Signature was deleted when saving the Profile, because the Filed was missing.

This didn't work in 2.0.3. I got a parse error.

express
Sun 26th Aug '01, 1:06pm
worked fine for me with 2.0.3

What parse error are you getting what line number

Steve_C
Sun 26th Aug '01, 2:15pm
I did it again (as I changed it back to the original) and it worked fine! Sorry for the false alarm!

Blue[GummiBear]
Thu 6th Sep '01, 12:01pm
I am getting this error after I install the hack and try to edit my sig:


Warning: Undefined variable: REQUEST_URI in D:\Inetpub\gummibears\www\forum\global.php on line 39

Warning: Undefined index: HTTP_POST_VARS in D:\Inetpub\gummibears\www\forum\global.php on line 64

Warning: Undefined index: action in D:\Inetpub\gummibears\www\forum\global.php on line 64

Warning: Undefined index: action in D:\Inetpub\gummibears\www\forum\global.php on line 67


I am using version 2.0.3 with only the Change User Name hack installed. Any suggestions?

Blue[GummiBear]
Thu 6th Sep '01, 12:56pm
I fixed the error/warning message, by adding the following line right under the first line ( <$php ) in sedit.php:

error_reporting(7);

Steve_C
Fri 7th Sep '01, 1:12pm
HELP! Nothing UNDER the signature line will save! (if you try to edit it)
Biography:
Location:
Interests:
Occupation:

None of these will save any added (edited) data!

Here is my forums: http://www.sirstevesguide.com/forums

DarkReaper
Fri 14th Sep '01, 4:23pm
Hm...on the "Who's online" page in vB 2.0.3 it says " Unknown Location: /forums/sedit.php?&action=show"

How do I fix this?

DarkReaper
Sat 15th Sep '01, 12:47pm
Fixed.

To make it compatible with online.php, open online.php.

Find:

default:
$userinfo[activity] = 'unknown';
}


BEFORE that, add this:

case 'sedit.php':
$userinfo[activity] = 'editsig';
break;


Then find this:

default:
// Let's show the admin the location but put something false up for everyone else..
if ($bbuserinfo[usergroupid] == 6) {
$userinfo[location] = htmlspecialchars(stripslashes(replacesession($user info[location])));
$userinfo[where] = "<b>Unknown Location:</b> <a href=\"$userinfo[location]\">$userinfo[location]</a>";
} else {
// We were unable to parse the location
$userinfo[where] = "$bbtitle <a href='index.php?s=$session[sessionhash]'>Main Index</a>";;
}


BEFORE that, add this:

case 'editsig':
$userinfo[where] = "Changing Forum Signature";
break;

Steve_C
Sat 15th Sep '01, 3:50pm
Is no one else having the problem I am having with the Location, Bio, etc NOT SAVING after adding this hack??

DarkReaper
Sat 15th Sep '01, 3:59pm
Nope. Works fine for me. What version of vB are you using? Make sure you modified the files correctly.

NYI Fan
Wed 19th Sep '01, 9:11pm
What a great addition! Thank you to all who put effort into this easy-to-install hack!

LovePhpNuke
Fri 28th Sep '01, 4:27am
Hi,

Thanks for your hack, i have question:

can we add template name _editsignature in style file. If yes HOW?

bacause every time i upload new template.style file then i lost the _editsignature session.

Thanks.

Pogo
Fri 28th Sep '01, 4:42am
Just add _editsignature|||[templatedata]|||to the end of your style file where [templatedata] is replaced by the _editsignature content.

neogeniseva
Fri 28th Sep '01, 5:25am
how would i limit smilies/images to 4 per sig?

neogeniseva
Fri 28th Sep '01, 5:38am
it also seems like it will not display the limited number of lines per sig. i set it and it still does not show up...

the code:
$adminsiglimit = 20;
$regsiglimit = 12;

but when i save and reload there is not number there it just says

Signature Limits
- lines or less
- 10 pictures/smilies or less

so can someone help

LovePhpNuke
Fri 28th Sep '01, 10:59pm
Originally posted by Pogo
Just add _editsignature|||[templatedata]|||to the end of your style file where [templatedata] is replaced by the _editsignature content.

Thanks Pogo but still not working, the _editsignature template not add in the template files.

It's had otherway or can you give me exacly how i can do, cauz is said create on custom template.

Thanks.

ubje
Sat 6th Oct '01, 7:24pm
sounds kewl :)

Justice
Thu 11th Oct '01, 2:13am
:eek: installed in less than 5 minutes and it seems to work great

thanks

AutoBildOnline
Thu 11th Oct '01, 12:52pm
@neogeniseva: I hacked the following to enable the maximum length settings:

In sedit.php Line 95:

Change



if ($action=="show") {
if (trim($origsignature)!="") {
$splitsig = explode("\n", $origsignature);
if ($bbuserinfo['usergroupid']==6) {
$siglimit = "$adminsiglimit";
} else {
$siglimit = "$regsiglimit";
}

to look like:


if ($action=="show") {
if ($bbuserinfo['usergroupid']==6) {
$siglimit = "$adminsiglimit";
} else {
$siglimit = "$regsiglimit";
}
if (trim($origsignature)!="") {
$splitsig = explode("\n", $origsignature);



Works for me then.

Cheers.

TGO
Tue 16th Oct '01, 4:27pm
Love this hack! Thanks alot, was an absolute breeze to install on 2.0.3 and everything is working great :)