Topic: [Release] GeSHi highlight

GeSHi highlight v1.0.4
Highlights code tags in posts using GeSHi highlighter.
Download

http://img516.imageshack.us/img516/4845/geshigx3.th.jpg

Last edited by daris (2009-08-24 08:44:12)

Re: [Release] GeSHi highlight

they should add this ext on this sie. nice!

Re: [Release] GeSHi highlight

I installed the extension but it isn't working for me for some reason. I tried some html within the code tag but it didn't color highlight it.

Programming Designs - Tech, programming, and web design blog
PD Forums - Using the latest and greatest PunBB 1.3 =)

Re: [Release] GeSHi highlight

Programming-Designs wrote:

I installed the extension but it isn't working for me for some reason. I tried some html within the code tag but it didn't color highlight it.

You should specify which language should be used, for example

[ code=html]<b>dfsf</b>[/ code]

(without spaces)

edit: fixed small mistake and released version 1.0.1 (same link)

Last edited by daris (2009-02-09 12:59:40)

Re: [Release] GeSHi highlight

Oh ok thanks for clearing that up. Will update to the new version and give it a try.

Edit: Tested it. Great mod I love it. Great for my programming forums smile

Last edited by Programming-Designs (2009-02-09 20:15:02)

Programming Designs - Tech, programming, and web design blog
PD Forums - Using the latest and greatest PunBB 1.3 =)

Re: [Release] GeSHi highlight

I get the following error when I try this ext.

Fatal error: Call to undefined function: htmlspecialchars_decode() in c:\punbb\include\parser.php(19) : eval()'d code on line 17
Mega Pun creator - Mega Pun

Re: [Release] GeSHi highlight

Thanks for reporting, fixed (added workaround for php4)

New release: 1.0.2 | Download

Re: [Release] GeSHi highlight

File does not exist

Daris could you repair this link? wink

Re: [Release] GeSHi highlight

Fixed

Re: [Release] GeSHi highlight

I get this error with your latest version. The error below is repeated thousands of times.

Notice: Uninitialized string offset: 1 in c:\punbb\extensions\geshi_highlight\geshi.php on line 1838

Mega Pun creator - Mega Pun

Re: [Release] GeSHi highlight

Can you show code, which you want to highlight? I'm not sure, but rather it's bug in geshi script than in my extension.

Re: [Release] GeSHi highlight

Below is the code I was trying to use:

if (isset($_GET['get_host']))
{
    if (!$forum_user['is_admmod'])
        message($lang_common['No permission']);

    ($hook = get_hook('mr_view_ip_selected')) ? eval($hook) : null;

    // Is get_host an IP address or a post ID?
    if (preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $_GET['get_host']) || preg_match('/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/', $_GET['get_host']))
        $ip = $_GET['get_host'];
    else
    {
        $get_host = intval($_GET['get_host']);
        if ($get_host < 1)
            message($lang_common['Bad request']);

        $query = array(
            'SELECT'    => 'p.poster_ip',
            'FROM'        => 'posts AS p',
            'WHERE'        => 'p.id='.$get_host
        );
Mega Pun creator - Mega Pun

Re: [Release] GeSHi highlight

I've got problem.

Geshi replace ' with &#039 entities.

Re: [Release] GeSHi highlight

bingiman wrote:

I get this error with your latest version. The error below is repeated thousands of times.

Notice: Uninitialized string offset: 1 in c:\punbb\extensions\geshi_highlight\geshi.php on line 1838

It's only notice, but I don't know how to fix (hide tongue ) it.

Reactor wrote:

Geshi replace ' with &#039 entities.

Fixed

New release 1.0.3
Download

Re: [Release] GeSHi highlight

I just found out that in the first post there's a 1.0.4 (I thought 1.0.3 was latest, like said in previous post). But the download link (and the whole site around it, as well as the user from here) is gone. Does anybody still have the 1.0.4?

Re: [Release] GeSHi highlight

http://my-trac.assembla.com/punbb-exten … r/branches