[2.0.6] PHP Syntax Highlighter BBCode

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
30
60%
Very Good
5
10%
Good
3
6%
Fair
1
2%
Poor
11
22%
 
Total votes: 50

User avatar
-=ET=-
Registered User
Posts: 799
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

The link works :)
It should have been a temporary issue of my host.
FYI you'll download the 3.0.7 (have a look above) :wink:
Eternal newbie
who_cares
Registered User
Posts: 5106
Joined: Fri Jan 14, 2005 11:04 pm
Location: ATL
Contact:

Post by who_cares »

StalkR wrote: am I an idiot or what?
I can't find these lines in posting.php !!!

Code: Select all

# 
#-----[ FIND ]---------------------------------
#
$EMBB_keys = array(''
$EMBB_widths = array(''
$EMBB_values = array(''

I can't find find these either, I have multi-bbcode MOD installed and I've checked it's install.txt file, that code isn't in posting.php
User avatar
James78
Registered User
Posts: 811
Joined: Sat Jul 30, 2005 4:54 pm
Location: Washington, USA
Contact:

Post by James78 »

Nice mod, but i got a few questions... Can you post Php coding with this mod? If so, then is this function only available to the main board Admin (user_id: 2)? If not, then can someone add this function in the MOD? Thanks
User avatar
-=ET=-
Registered User
Posts: 799
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

No, it's a BBCode so it's available for every users!
And the result is this... (forget about the rest of the post in French - just look at the PHP frame) :wink:
http://www.golfexpert.net/phpbb/forums/ ... c.php?t=39
Eternal newbie
tekky
Registered User
Posts: 30
Joined: Tue Jul 19, 2005 12:13 am

Post by tekky »

just a recommendation ET

Code: Select all

<!-- BEGIN php_open -->
</span>
<table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr> 
	  <td><span class="genmed"><b>{L_PHP}:</b></span></td>
	</tr>
	<tr>
	  <td class="code" style="background-color:#FFFFFF;">
		<!-- END php_open -->
		<!-- BEGIN php_close -->
		</td>
	</tr>
</table>
<span class="postbody">
<!-- END php_close -->
I have found that on ~8 different themes the default colors are almost impossible to read (atleast 1 of them on any given of the themes) I started looking at making an update that allowed color selection/font selection via the admin panel, storing it in the DB etc, and then thought about making that one little change in the bbcode.tpl file... much simpler and now the code is easy to read on any theme due to it always being in a white box, and the white bg makes more sense to me... plain, simple and easy to read now :D
nh2
Registered User
Posts: 1
Joined: Wed Sep 21, 2005 6:57 pm

Post by nh2 »

Hi @ all,

great MOD, but

what can I do that the line numbers are displayed in the highlighted PHP-code?
Podunk_1233
Registered User
Posts: 4
Joined: Wed Sep 28, 2005 1:44 am

Post by Podunk_1233 »

#
#-----[ OPEN ]------------------------------------------
#
posting.php


#
#-----[ FIND ]---------------------------------
#
$EMBB_keys = array(''
$EMBB_widths = array(''
$EMBB_values = array(''


i totally cant find that code within posting.php, I am using phpbb version 2.0.17
User avatar
-=ET=-
Registered User
Posts: 799
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

tekky> Thanks. I'll check for a future version :wink:

nh2> I don't know and unfortunatly I have no time these days to add this feature

Podunk_1233> Have you installed Multiple BBCode 1.4.0c :roll:
http://www.phpbb.com/phpBB/viewtopic.php?t=145513
Eternal newbie
Podunk_1233
Registered User
Posts: 4
Joined: Wed Sep 28, 2005 1:44 am

Post by Podunk_1233 »

thanks for the heads up ET.

im a complete newb at working with phpbb mods, but I think that the code i posted above will still not be found in that file, because in the multi-bbc mod, the only modifications to posting.php:

Code: Select all

# 
#-----[ OPEN ]---------------------------------
# 
posting.php


# 
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
# make_jumpbox('viewforum.'.$phpEx);
#
make_jumpbox(


# 
#-----[ AFTER, ADD ]---------------------------------
#
Multi_BBCode();
in fact, $EMBB_keys = array doesent appear in multi-bbc-1-4-0.mod anywhere.

I must be missing something else?

edit:

the instructions for installing PHPBBCode303.mod are extremeley outdated, is there a newer version around somewhere?
javascriptman221
Registered User
Posts: 95
Joined: Thu Oct 21, 2004 12:49 am
Contact:

Post by javascriptman221 »

who_cares wrote:
StalkR wrote:am I an idiot or what?
I can't find these lines in posting.php !!!

Code: Select all

# 
#-----[ FIND ]---------------------------------
#
$EMBB_keys = array(''
$EMBB_widths = array(''
$EMBB_values = array(''

I can't find find these either, I have multi-bbcode MOD installed and I've checked it's install.txt file, that code isn't in posting.php


Yea, same here. :(

Please help.
javascriptman221
Registered User
Posts: 95
Joined: Thu Oct 21, 2004 12:49 am
Contact:

Post by javascriptman221 »

Bump...anyone?
User avatar
annihilate
Registered User
Posts: 209
Joined: Thu Feb 19, 2004 11:44 pm
Location: England
Contact:

Post by annihilate »

Great mod. One question though. Is there a way to word wrap the php code like it does for code blocks. I have changed all my old

Code: Select all

 blocks to [php] and now the table cell does not wrap at all, so some of my pages are stretching in width by a hugh amount which doesn't look pretty.  

Thanks 
Colin
georgecrawford
Registered User
Posts: 27
Joined: Mon Oct 20, 2003 12:36 am

Post by georgecrawford »

Bump on all the questions above!
User avatar
annihilate
Registered User
Posts: 209
Joined: Thu Feb 19, 2004 11:44 pm
Location: England
Contact:

Post by annihilate »

My fix for the word wrapping issue that seems to work so far:

OPEN: /includes/bbcode.php

FIND:

Code: Select all

// Now, do all the non-first-level matches. These are simple.
	$text = str_replace("[php:$uid]", $code_start_html, $text);
	$text = str_replace("[/php:$uid]", $code_end_html, $text);
ADD AFTER:

Code: Select all

$text = str_replace("&nbsp;", " ", $text); // Replace &nbsp; with a space so that lines will wrap
$text = str_replace("  "," &nbsp;", $text); // Replace double spaces with 1 space and &nbsp; to preserve indenting
In case you want to see it in action, here it is.
halofreak345
Registered User
Posts: 21
Joined: Sun May 15, 2005 10:58 pm

Post by halofreak345 »

i need the other mod that is needed to use this 1. the link doesnt work. could some1 please help?
Post Reply

Return to “[2.0.x] MOD Database Cleanup”