GeSHi Syntax Highlighter [Deleted]

I continued getting more errors, though it was referencing a real forum this time. After checking out recent posts, I think what was causing it was code being included in a quote. I edited the quote to remove the code tags and so far haven't seen any other errors.
 
I got more errors like that so I modified the file in question to give the index [LANG_NAME] a default value. I don't have have the file open but I think I used "Text" since it's what is used for generic code.
 
Hi,
I use this add-on on last XF 1.4 version but I plan to upgrade XF 1.5.
Do you know if this add-on will work with XF 1.5?
Thanks
David
 
Hello,
Unfortunately it seems that it is not compatible with PHP7.
I have this error message when I activate PHP7:
An exception occurred: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor in /home/xxx/public_html/library/DigitalPointSyntaxHighlighter/geshi.php on line 259
Do you have an idea how to make it work with PHP7?
Thanks
David
 
Hi

Only a short question. Is there a way to get the
Code:
[code=delphi][/ code]
as a single Button in the editor? It works perfect as insert/code/delphi but we got the question for a single delphi button on top of the editor.

Thanks for support
 
Hello On my forum used two styles: dark and light. On a dark style code text blend into the background. What and where it is necessary to change the code to change the color of the text?

geshi.webp
 
For dark theme mod you need a couple of change the BBcode Formater Base.php as explained on CyberAsylum.
Basically add enable_classes and set_overall_class lines to each of your formater, CODE, HTML and CSS so that they look like that:

PHP:
        $geshi->set_link_target('_blank" rel="nofollow');
        $geshi->set_header_type(GESHI_HEADER_NONE);
        $geshi->set_tab_width(4);
        $geshi->enable_classes(true);
        $geshi->set_overall_class('geshi');
        $content = $geshi->parse_code();

Then edit your EXTRA.CSS and add something like:
Code:
/* 
 * Geshi stylesheet
 *
 * CyberAsylum.eu
 * dark theme by niekto@niekde.sk (Jaroslav Petras)
 * there is no licence and you can use it, copy it, sell it
 * or burn it
 *
 */

div.bbCodeBlock
{ background: @pageBackground !important; }

/* all            */
.geshi
{ border: none !important; }

/* lines        */
.geshi .li1
{ background: @pageBackground !important; }
.geshi .li2
{ background: @pageBackground !important; }

/* brackets        */
.geshi .br0
{ color: #bfbfbf !important; }


/* comments        */
.geshi .co0,
.geshi .co1,
.geshi .coMULTI
{ color: #7a7a75 !important; }

/* strings        */
.geshi .st0,
.geshi .st_h
{ color: #ff4444 !important; }


/* methods        */
.geshi .me0,
.geshi .me1
{ color: #ffffff !important; }
.geshi .me2
{ color: #ffcc66 !important; }



/* keywords        */
.geshi .kw1
{ color: #99ee00 !important; }
.geshi .kw2
{ color: #eeaa22 !important; }
.geshi .kw3
{ color: #dd88ff !important; }
.geshi .kw4
{ color: #ff7744 !important; }

/* operators        */
.geshi .sy0
{ color: #44ffbb !important; }

/* numbers        */
.geshi .nu0
{ color: #ff2288 !important; }

/* variables        */
.geshi .re0
{ color: #88c0ff !important; }
.geshi .re1
{ color: #88c0ff !important; }
.geshi .re2
{ color: #ccddff !important; }
.geshi .re3
{ color: #88c0ff !important; }
.geshi .re4
{ color: #88c0ff !important; }
.geshi .re5
{ color: #ddddff !important; }

/* EOF            */

Assuming your @pageBackground is dark you should get something like that:
upload_2017-3-22_6-52-12.webp

It would be nice if we could add XenForo admin settings to enable classes and classes names so that one does not need to modify the plugin code to customize the look and feel.
 
FYI, I have replaced the geshi folder content & geshi.php files in your add-on by the ones provided in Geshi 1.0.9.0 release and it seems to work on my website in production with PHP 7.
Great!
David
 
FYI, I have replaced the geshi folder content & geshi.php files in your add-on by the ones provided in Geshi 1.0.9.0 release and it seems to work on my website in production with PHP 7.
Great!
David

I did just that but I'm still getting that create_function warning.
 
Top Bottom