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?

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

I type Like navaho

Registered: 03/10/00
Posts: 25580
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

Top



Moderator:  Gizmo 
Latest Posts
Shout Box

(Views)Popular Topics
Known public proxy servers 1636135
Integrated Index Page (IIP) 5.3.1 528187
Finished-[6.5.2] Games Arcade Deluxe v1.9 486016
Integrated Index Page (IIP) 5.1.1 401388
TLD Bv2.1 Released - Threads Links Directory 382774
[6.0x] Who's Online 4.0.0 [Finished] 374847
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 318709
Q & A 264276
[6.3.x] [beta] Hit Hack 2.0 225221
[7.x] Gizmo's Embedding BBCode (Pre UBB.T7.3) 202973
Forum Stats
13620 Members
59 Forums
37189 Topics
295701 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks