Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Modification Name: [6.4 and 6.5] Signature Preview

Author(s): AllenAyres

Description: Allows you to preview your signature within your profile

Demo: https://ubbdev.com

Requirements: vars_wordlets_mods

Download Link: https://www.ubbdev.com/ubb/upload/00000494/sig_preview.txt

Credits: Mastermind for Original Version

Notes: Tested with 6.5 (here), should work 6.4+ smile

Updates: 5-17-03 - updated with xhtml fixes smile


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Is there any way you could do something like the Preview Post button for the profile, so that you could see the sig while editing, cause it doesn't update while you are editing, it shows you your sig that you are changing, so you still have to click update.

It would be awesome if you could add the button smile

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Good job, looks great smile

Tho Allen not XHTMLing the hacks he ports? (the first step)

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
bug: if you have smilies in your signature it tries to find them in ubbcgi dir instead of noncgi... fix: you have to use base href to noncgi dir, or use: (pretty lame but the only other choice; untested in this case)[code][/code]

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
ARGGHH... missed the xhtml. I was working on 3 different files and missed that tipsy

Your replacement would go in the ubb_profile.cgi section?


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
yes, I think...
btw the XHTML thing is:[code][/code]it should be  - or something

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
danke, updated with your's and my fixes for xhtml tipsy


- Allen wavey
- What Drives You?
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Quote
quote:
Originally posted by Weird Al:
Is there any way you could do something like the Preview Post button for the profile, so that you could see the sig while editing, cause it doesn't update while you are editing, it shows you your sig that you are changing, so you still have to click update.

It would be awesome if you could add the button smile
This reads your profile and shows the signature... you won't see the new one until you update your profile. I don't think your idea is possible, tho it might be with some javascript magic. smile


- Allen wavey
- What Drives You?
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
It basically is possible with javascript, but then you have to add all UBB codes to javascript tipsy

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Quote
quote:
Originally posted by LK:
It basically is possible with javascript, but then you have to add all UBB codes to javascript tipsy
is that possible? **has no clue about anything you're talking about, just likes to use hacks**

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
It's possible, but would be one huge piece of javascript that probably couldn't be guaranteed to work in most, let alone all, browsers tipsy


- Allen wavey
- What Drives You?
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Quote
quote:
Originally posted by AllenAyres:
It's possible, but would be one huge piece of javascript that probably couldn't be guaranteed to work in most, let alone all, browsers tipsy
How does the preview post button work then?

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Ohh, you said you want a preview signature button, I thought you wanted it to be automatically updated when you type something.. then it's possible to do it in perl, like preview post..

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Quote
quote:
Originally posted by LK:
Ohh, you said you want a preview signature button, I thought you wanted it to be automatically updated when you type something.. then it's possible to do it in perl, like preview post..
sorry for the misconception, yes, I would love something like the Preview Post button, I think that would be easier cause when you update your sig, you are routed to the main forum, the you need to go through your Profile page to your edit profile page, which means you need to go through 3 pages to do something a popup could do

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Quote
quote:
Originally posted by LK:
Ohh, you said you want a preview signature button, I thought you wanted it to be automatically updated when you type something.. then it's possible to do it in perl, like preview post..
So can anyone do that?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
anyone?
if(user == Allen){come on Allen, you know you could do it laugh
} else if(user == LK){
come on LK, you know you could do it laugh }

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Code
[/code]shouldn't that be...

[code]

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
anyone? I really think it would add a lot more functionality to this hack

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
hey allen, would this require a port for the Colorforums hack? I can't find where it would but the pictures aren't showing up. I know I did it right cause I've checked teh code and I've gotten it to work before on a non-css board

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
What pictures do you mean?

I'm not skilled enough to write that code from the last page, but I'll update the code here for the color changes you mention above smile


- Allen wavey
- What Drives You?
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
in the sig preview, it will convert all ubbcode, but leave

[code][/code]I don't know why it does that, and since you have it working on css I was wondering if any changes were needed

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Shouldn't need changes for that... the conversion code for that is in ubb_lib_posting and the css stuff shouldn't touch that smile


- Allen wavey
- What Drives You?
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
that's what I thougt, darn *goes off to look at code*

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
ok, now I'm completely confused. It'll convert ubbcode and graemlins, but not the [img] tag.

I checked and my img code stuff hasn't been changed in the reverse_ubb_code or prep_for_edit.

The sig looks right when in posts, and images are enabled in sigs. I have no clue what it could be frown

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
for some reason I missed this old thread...
anyhow, find:
Code
	$user_profile[12] =~ s/(<img border="0" alt=".+?" title="" src=")(graemlins/.+?)(" />)/$1$vars_config{NonCGIURL}/$2$3/isg;
add below:
Code
	$user_profile[12] =~ s/([img])(S+?)([/img])/&imageize($2)/eisg if $vars_display{AllowSignatureImage} ne 'no';
only half-tested, but should work smile

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
*bows to LK*
Worked perfectly smile

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
nm, it was my mistake

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
ok, this is gonna sound weird, but the graemlins are messing up. They show up fine, but then show up as html in the sig textarea and is removed when it's updated. I didn't modify anything pertaining to graemlins, I don't know why it won't work

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
Code
<img border="0" title="" alt="[Wink]" src="http://www.alforadmin.com/ubb/wink.gif" />
that's what shows up in the sig editing box, but it looks fine in the preview cell.

Any help?

ok, I looked and it's a problem with my ubb code itself, somehow calling gramelins has changed

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
ok, after some tinkering I got this.

if I comment out...
Code
	$user_profile[12] =~ s/(<img border="0" title="" alt=".+?" src=")(.+?)(" />)/$1$vars_config{NonCGIURL}/$2$3/isg;
then it doesn't convert to html when being edited, but it shows a red x and the url is noncgiURL/smile.gif etc.

If I comment out
Code
	$user_profile[12] =~ s/(<img border="0" alt=".+?" title="" src=")(graemlins/.+?)(" />)/$1$vars_config{NonCGIURL}/$2$3/isg;
but not the first one, it shows up fine but becomes html when edited.

I have no problems when editing a post, or quoting a post, it's only in the sig, and when I remove the sig preview, it works fine

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
there isn't a graemlinize that I don't know about is there?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
now that Allen and LK are back, can anyone help?

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
hey Allen, any chance of getting this updated? I noticed that UBBDEV's graemlins don't work in sig preview either


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)