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

   "CODE" ubb code that ubbdev uses? to Del.icio.us Add to del.icio.us
  Digg "CODE" ubb code that ubbdev uses? Digg it
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: 25432
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 (), 28 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
pisa666, ghengis317, NitroX, Dogan, EliYah-
13345 Registered Users
Top Posters Last 30 Days
AllenAyres 12
blaaskaak 8
tackaberry 7
FREAK1 5
Mike L_dup1 4
Chris Bale 4
Ian_W 4

 

 

 
fusionbb message board php hacks