PDA

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


03-24-2001, 10:00 PM
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

03-25-2001, 07:00 PM
Sounds great, thanks :)

03-25-2001, 08:54 PM
not bad. good job

webhost
07-01-2001, 04:57 PM
Does this work for vb2.0.1?

Joey

Fryzid
07-01-2001, 05:10 PM
It should.

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

webhost
07-02-2001, 05:07 PM
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
07-02-2001, 06:28 PM
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
07-02-2001, 06:33 PM
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
07-27-2001, 08:53 PM
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
07-28-2001, 06:12 PM
thank you very much!

VirtueTech
07-29-2001, 05:44 AM
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
07-29-2001, 07:07 AM
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://vborg.vbsupport.ru/

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
07-29-2001, 09:11 AM
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
07-29-2001, 09:32 AM
DOH! :eek:

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

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

ozone2000
07-29-2001, 10:08 AM
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
07-29-2001, 03:33 PM
@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
08-02-2001, 06:49 AM
Pretty cool! My girls are going to love this, thank you!

Afterburner
08-24-2001, 11:26 AM
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
08-25-2001, 02:53 PM
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
08-26-2001, 06:45 AM
Hi,

i must change in my members.php the following:

find:
-------------------------------------------------------------------------------
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',cust omtitle='$customtitle',usertitle='".addslashes($customtext)."',email='".addslash es(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($pare ntemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($hom epage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlsp ecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupi d='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");

and replace with:
-------------------------------------------------------------------------------
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',customtitle='$customtitle',usertitle='".add slashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parente mail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',hom epage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecia lchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashe s(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
08-26-2001, 12:03 PM
so the code does?? sorry if you explained it in your text, but im not so good at english!

SirSteve
08-26-2001, 04:04 PM
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
08-26-2001, 04:06 PM
worked fine for me with 2.0.3

What parse error are you getting what line number

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

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

error_reporting(7);

SirSteve
09-07-2001, 04:12 PM
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
09-14-2001, 07:23 PM
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
09-15-2001, 03:47 PM
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;

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

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

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

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

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

Neo
09-28-2001, 08:38 AM
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
09-29-2001, 01:59 AM
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
10-06-2001, 10:24 PM
sounds kewl :)

Justice
10-11-2001, 05:13 AM
:eek: installed in less than 5 minutes and it seems to work great

thanks

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

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

MrLister
10-31-2001, 01:48 PM
this hack is great.... i better click install now :)

Martyjp
11-04-2001, 08:46 AM
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
01-21-2002, 10:26 PM
quick question:

how do I allow the [img] code

thanks

Dimava

BladesM3
09-25-2002, 04:06 PM
does this work for 2.2.7

Prince
12-01-2002, 04:22 PM
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
12-01-2002, 05:32 PM
X-cellent hack! Works perfect on 2.2.9

Prince
12-02-2002, 03:42 AM
to fix the initial preview issue with vB code do this:

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

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

cityofangelus
03-10-2003, 09:38 AM
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
04-16-2003, 05:16 PM
Is there any support for this hack at all??????

:disappointed: