php forum
php mysql forum
php mysql smarty
 
Topic Options
#56217 - 08/25/03 10:40 PM "CODE" ubb code that ubbdev uses?
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
I really like how basic it is, how would I go around making my code uh... code that way?
_________________________
Code monkey like Fritos

Top
#56218 - 09/04/03 12:59 AM Re: "CODE" ubb code that ubbdev uses?
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
not sure what's different, we haven't changed anything tipsy
_________________________
- Allen wavey
- What Drives You?

Top
#56219 - 09/04/03 07:12 AM Re: "CODE" ubb code that ubbdev uses?
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
yeah we have tipsy
ubb_lib_posting.cgi: sub reverse_ubb_code
Code:
		$match++ if $_[0] =~ s/(<pre>)(.+?)(</pre>)/[CODE]$2
/isg;[/code]and sub ProcessCodeTag
Code:
	return qq~<pre>$message</pre>~;
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#56220 - 09/04/03 08:21 AM Re: "CODE" ubb code that ubbdev uses?
PrimeTime Offline
Member

Registered: 11/06/01
Posts: 1046
Fantastic LK. There have been a few members who asked me if I could add the <pre> tag inside the UBB "code" tag. thumbsup

I just tested it on the 6.4 and I had to change the tags to:

Code:
$match++ if $_[0] =~ s/(<blockquote>$vars_wordlets{ubbcode_code}:<hr /><pre />)(.+?)(<pre /><hr /></blockquote>)/[CODE]$2
/isg;[/code]and

Code:
return qq~<blockquote>$vars_wordlets{ubbcode_code}:<hr /><pre />$message<pre /><hr /></blockquote>~;
The focus is not on the other adjacent tags but only the <pre> tags. On my file I had to set the <pre /> tags exactly the same on the <hr /> tags in order for it to work with Edit and Quote. smile
_________________________
Members Spotlight Winner
bac-Clan
--------------------

Top
#56221 - 09/04/03 08:54 AM Re: "CODE" ubb code that ubbdev uses?
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
uh... I have absolutely no idea why you did it tipsy

anyhow in reverse_ubb_code, don't REPLACE the existing [code] thing, just put the code I modified below it...
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#56222 - 09/04/03 09:38 AM Re: "CODE" ubb code that ubbdev uses?
PrimeTime Offline
Member

Registered: 11/06/01
Posts: 1046
Ahh...Now you've specified. wink Anyway, it works just as well. Here is my final edit:

In sub reverse_ubb_code:
Code:
$match++ if $_[0] =~ s/(<blockquote><pre />)(.+?)(<pre /></blockquote>)/[CODE]$2
/isg;[/code]And in sub ProcessCodeTag:
Code:
return qq~<blockquote><pre />$message<pre /></blockquote>~;
Much cleaner now with one line of coding. Thanks again for the mod. smile
_________________________
Members Spotlight Winner
bac-Clan
--------------------

Top
#56223 - 09/04/03 04:03 PM Re: "CODE" ubb code that ubbdev uses?
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
worked great, thanks smile
_________________________
Code monkey like Fritos

Top


Moderator:  Gizmo 
Who's Online
0 registered (), 31 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks