News:

Join the Facebook Fan Page.

Main Menu

GeSHiSmf

Started by AzaToth, September 25, 2005, 06:50:16 PM

Previous topic - Next topic

Bigguy

I'm getting loads of this in my error log. Any fix at all:

8: Undefined index: geshi_enable_footer
File: /home/****/public_html/smfhelper/Sources/Subs.php(1192) : runtime-created function
Line: 28

Leo.J90

Why it doesn't work with v1.0.8?

Bigguy

Anyone know about this. ???

Quote from: Bigguy on September 24, 2006, 01:36:20 PM
I'm getting loads of this in my error log. Any fix at all:

8: Undefined index: geshi_enable_footer
File: /home/****/public_html/smfhelper/Sources/Subs.php(1192) : runtime-created function
Line: 28


Mark0

I too get errors every time a page with Geshi code is loaded, slightly different:

8: Undefined offset: 0
File: C:\ .. \forum\Sources\geshi\geshi.php
Line: 2090


Aside from these entries in the errors log, the layout seems to have no problems.
On SMF 1.1 RC3, with default theme and no other mod installed aside from this.

Thanks,
Bye!
"Remember remember the 5th of November"

Bigguy

Bump !!!

Quote from: Bigguy on October 16, 2006, 07:23:52 PM
Anyone know about this. ???

Quote from: Bigguy on September 24, 2006, 01:36:20 PM
I'm getting loads of this in my error log. Any fix at all:

8: Undefined index: geshi_enable_footer
File: /home/****/public_html/smfhelper/Sources/Subs.php(1192) : runtime-created function
Line: 28


AzaToth

Quote from: Bigguy on November 03, 2006, 01:50:43 PM
Bump !!!

Quote from: Bigguy on October 16, 2006, 07:23:52 PM
Anyone know about this. ???

Quote from: Bigguy on September 24, 2006, 01:36:20 PM
I'm getting loads of this in my error log. Any fix at all:

8: Undefined index: geshi_enable_footer
File: /home/****/public_html/smfhelper/Sources/Subs.php(1192) : runtime-created function
Line: 28


That might be able to happen, if you are using a theme that have redefined boarddir/Themes/default/Settings.template.php


Bigguy

Is there a fix for it or do I just let it go.

AzaToth

Quote from: Bigguy on November 05, 2006, 12:54:27 PM
Is there a fix for it or do I just let it go.
There always a fix (tm), but I don't know what exactly your current theme has done.

Bigguy

I am using the "Default_modern" Theme. It has 1 template file and a css file. The rest is called from the default theme.

DerEineDa

I don't know if it was mentioned before, but there is a little typo in
/Sources/geshi/geshi/java.php , line 1374

This is what it looks like:
3 => 'http://www.google.com/search?hl=en&q=allinurl%3A{FNAME}+java.sun.com&bntI=I%27m%20Feeling%20Lucky',


Looks like it is supposed to do a "I'm Feeling Lucky" search on Google, but there is a typo, so it doesn't work. Just change "bntI" to "btnI":
3 => 'http://www.google.com/search?hl=en&q=allinurl%3A{FNAME}+java.sun.com&btnI=I%27m%20Feeling%20Lucky',


It's working then.

RXL

#70
Quote from: AzaToth on November 05, 2006, 12:37:31 PM
Quote from: Bigguy on November 03, 2006, 01:50:43 PM
Bump !!!

Quote from: Bigguy on October 16, 2006, 07:23:52 PM
Anyone know about this. ???

Quote from: Bigguy on September 24, 2006, 01:36:20 PM
I'm getting loads of this in my error log. Any fix at all:

8: Undefined index: geshi_enable_footer
File: /home/****/public_html/smfhelper/Sources/Subs.php(1192) : runtime-created function
Line: 28


That might be able to happen, if you are using a theme that have redefined boarddir/Themes/default/Settings.template.php

I have this problem too.

This found in error log:
Quote
2: opendir(/var/www/virt/forum.host1.local/www/Packages/tempGeSHiSmf//GeSHiSmf/geshi): failed to open dir: No such file or directory
File: /var/www/virt/forum.host1.local/www/Sources/Subs-Package.php
Line: 1253

My fix: manual copying 'geshi' directory from ZIP to 'Source'.

smf_1-1_install
GeSHiSmf-0.1.0

Valodim

#71
awesome mod, thank you :)

about the error mentioned 5 times above: just replace this line

                    $enable_header = $settings[\'geshi_enable_header\'] ? true : false;

with

                    $enable_header = !empty($settings[\'geshi_enable_header\']);

and

                    $enable_footer = $settings[\'geshi_enable_footer\'] ? true : false;

with

                    $enable_footer = !empty($settings[\'geshi_enable_footer\']);

in subs.php


\\ more edit

here's some code to add line highlighting (like here), simply replace the line

                    $geshi = new GeSHi($data[0],$data[1],$sourcedir.\'/geshi/geshi\');

with

                    $data[1] = explode(\',\', $data[1]);

                    $geshi = new GeSHi($data[0],$data[1][0],$sourcedir.\'/geshi/geshi\');

                    if(count($data[1]) > 1) {
                        array_filter($data[1], \'is_numeric\');
                        $geshi->highlight_lines_extra($data[1]);
                    }

in subs.php to extend the code tag syntax to highlight specific lines like
[kode=language,1,2,3,4,5]
to highlight 1,2,3,4 and 5th line. you need to replace kode with code, of course :P

Laibeus Lord

Quote from: DerEineDa on November 12, 2006, 08:47:59 PM
I don't know if it was mentioned before, but there is a little typo in
/Sources/geshi/geshi/java.php , line 1374

This is what it looks like:
3 => 'http://www.google.com/search?hl=en&q=allinurl%3A{FNAME}+java.sun.com&bntI=I%27m%20Feeling%20Lucky',


Looks like it is supposed to do a "I'm Feeling Lucky" search on Google, but there is a typo, so it doesn't work. Just change "bntI" to "btnI":
3 => 'http://www.google.com/search?hl=en&q=allinurl%3A{FNAME}+java.sun.com&btnI=I%27m%20Feeling%20Lucky',


It's working then.

Quote from: Valodim on December 06, 2006, 05:55:25 PM
awesome mod, thank you :)

about the error mentioned 5 times above: just replace this line

                    $enable_header = $settings[\'geshi_enable_header\'] ? true : false;

with

                    $enable_header = !empty($settings[\'geshi_enable_header\']);

and

                    $enable_footer = $settings[\'geshi_enable_footer\'] ? true : false;

with

                    $enable_footer = !empty($settings[\'geshi_enable_footer\']);

in subs.php


\\ more edit

here's some code to add line highlighting (like here), simply replace the line

                    $geshi = new GeSHi($data[0],$data[1],$sourcedir.\'/geshi/geshi\');

with

                    $data[1] = explode(\',\', $data[1]);

                    $geshi = new GeSHi($data[0],$data[1][0],$sourcedir.\'/geshi/geshi\');

                    $geshi->set_overall_class(\'geshi\');
                    if(count($data[1]) > 1) {
                        array_filter($data[1], \'is_numeric\');
                        $geshi->highlight_lines_extra($data[1]);
                    }

in subs.php to extend the code tag syntax to highlight specific lines like
[kode=language,1,2,3,4,5]
to highlight 1,2,3,4 and 5th line. you need to replace kode with code, of course :P

Thanks to the updates and enhancements!!


The mod file in the mods.s...m...f...org needs an update ;)


Laibeus Lord

Yep...
I'm getting same errors now:


8: Undefined offset: 0
File: /home/*****/public_html/boards/Sources/geshi/geshi.php
Line: 2090


tons of it...  all the same... all line 2090 of geshi.php

SMF1.1 Final
Default Theme

liquidlight

Hello, thought this was the right place to post this:
I use SMF 1.1.1 and GeSHiSmf-0.1.0.tar.gz and when i try to "Apply Mod" it I get the following error:
"The package you are trying to download or install is either corrupt or not compatible with this version of SMF."

Is it really compatible with SMF 1.1 but not with 1.1.1 ?

Does anybody have an idea of what could it be?

Bigguy

It is not updated to work with 1.1.1 Thats what it looks like.

Valodim

I suppose there's no update needed, just try calling your package manager like this
index.php?action=packages;version_emulate=1.1.1
and try if it outputs any errors if you try to apply the mod. this should work for most 1.1 mods :)

theshown

it seems to work fine with version 1.1.1 of the board
i've just edited file package-info.xml by replacing the 2 occurrences of "1.1" with "1.1.1" and uploading the archive through smf package installer.
My Projects: SOLDAT Italia

linuxrush

Quote from: theshown on January 05, 2007, 05:28:18 PM
it seems to work fine with version 1.1.1 of the board
i've just edited file package-info.xml by replacing the 2 occurrences of "1.1" with "1.1.1" and uploading the archive through smf package installer.

Hi, I did the exact same thing. but when I try to post a new topic, the drop down list does not appear.

Also, when I do this:

Code ("php") Select

<?php
echo 'test';
?>



and then click on the "Post" button, the forum errors out. Therefore, I guess this is not functional for 1.1.1, which is a very sad thing :(

-LR

linuxrush

#79
this is the error the forum generates:
Fatal error: Cannot instantiate non-existent class: geshi in /html/wp/forums/Sources/Subs.php(1181) : runtime-created function on line 15

Advertisement: