PDA

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


Fryzid
25 Mar 2001, 15:53
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

25 Mar 2001, 20:00
Sounds great, thanks :)

25 Mar 2001, 21:54
not bad. good job

webhost
01 Jul 2001, 17:57
Does this work for vb2.0.1?

Joey

Fryzid
01 Jul 2001, 18:10
It should.

webhost
01 Jul 2001, 20:41
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

webhost
02 Jul 2001, 02:34
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
02 Jul 2001, 09:43
Hi Ho
Fryzid Echt Spitze Hack... der von AA (für 1.**) hatte bei mir nie richtig geklappt :) Der jetzt schon. Super.
Danke

webhost
02 Jul 2001, 18:07
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
02 Jul 2001, 19:28
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.

webhost
02 Jul 2001, 19:33
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
27 Jul 2001, 21:53
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
28 Jul 2001, 19:12
thank you very much!

VirtueTech
29 Jul 2001, 06:44
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
29 Jul 2001, 08:07
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
https://www.vbulletin.org/forum/

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
29 Jul 2001, 10:11
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
29 Jul 2001, 10:32
DOH! :eek:

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

ozone2000
29 Jul 2001, 10:36
THANKS YOU VERY MUCH!!!!!!!!!!!!!!!!!!!!!!
now it all works, thanks for re-uploading the file!

ozone2000
29 Jul 2001, 11:08
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
29 Jul 2001, 16:33
@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
02 Aug 2001, 07:49
Pretty cool! My girls are going to love this, thank you!

Afterburner
24 Aug 2001, 12:26
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
25 Aug 2001, 15:53
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
26 Aug 2001, 07:45
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
26 Aug 2001, 13:03
so the code does?? sorry if you explained it in your text, but im not so good at english!

SirSteve
26 Aug 2001, 17:04
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.

webhost
26 Aug 2001, 17:06
worked fine for me with 2.0.3

What parse error are you getting what line number

SirSteve
26 Aug 2001, 18:15
I did it again (as I changed it back to the original) and it worked fine! Sorry for the false alarm!

Blue[GummiBear]
06 Sep 2001, 16:01
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]
06 Sep 2001, 16:56
I fixed the error/warning message, by adding the following line right under the first line ( <$php ) in sedit.php:

error_reporting(7);

SirSteve
07 Sep 2001, 17:12
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
14 Sep 2001, 20:23
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
15 Sep 2001, 16:47
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($userinfo[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;

SirSteve
15 Sep 2001, 19:50
Is no one else having the problem I am having with the Location, Bio, etc NOT SAVING after adding this hack??

DarkReaper
15 Sep 2001, 19:59
Nope. Works fine for me. What version of vB are you using? Make sure you modified the files correctly.

NYI Fan
20 Sep 2001, 01:11
What a great addition! Thank you to all who put effort into this easy-to-install hack!

LovePhpNuke
28 Sep 2001, 08:27
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
28 Sep 2001, 08:42
Just add _editsignature|||[templatedata]|||to the end of your style file where [templatedata] is replaced by the _editsignature content.

Neo
28 Sep 2001, 09:25
how would i limit smilies/images to 4 per sig?

Neo
28 Sep 2001, 09:38
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
29 Sep 2001, 02:59
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
06 Oct 2001, 23:24
sounds kewl :)

Justice
11 Oct 2001, 06:13
:eek: installed in less than 5 minutes and it seems to work great

thanks

AutoBildOnline
11 Oct 2001, 16:52
@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
16 Oct 2001, 20:27
Love this hack! Thanks alot, was an absolute breeze to install on 2.0.3 and everything is working great :)

ckevin
31 Oct 2001, 13:23
I've installed and most of the members work, but some members got this error (see the image). Please help!

MrLister
31 Oct 2001, 14:48
this hack is great.... i better click install now :)

Martyjp
04 Nov 2001, 09:46
I have the same problem as ckevin :confused:

I know its installed right as I have installed it fine on my test board and it worked, now for some reason it doesnt :confused:

dimava
21 Jan 2002, 23:26
quick question:

how do I allow the [img] code

thanks

Dimava

BladesM3
25 Sep 2002, 17:06
does this work for 2.2.7

Prince
01 Dec 2002, 17:22
works fine on 2.2.9, exept when you first go into the editor the 2 previews of your current sig do not reflect bb code until you click the preview button.

Big J
01 Dec 2002, 18:32
X-cellent hack! Works perfect on 2.2.9

Prince
02 Dec 2002, 04:42
to fix the initial preview issue with vB code do this:

on line 116 of the sedit.php file change:
$signaturepreview=bbcodeparse($signature,0,$allowsmilies); // preview

to this:
$signaturepreview=bbcodeparse($previewsignature,0,$allowsmilies); // preview

cityofangelus
10 Mar 2003, 10:38
Hi

I seem to be having a problem with this hack, I have added it to my usercpnav with the link < a href="sedit.php?s= $session[sessionhash] &action=show " > and it works great for Mods, Supers and admin but it will not work for normal members..

See the screenshot supplied..

Please someone help as I have lots of templates to add this hack to and want to make sure it works for everyone before I finish

Thanks

cityofangelus
16 Apr 2003, 18:16
Is there any support for this hack at all??????

:disappointed: