GeSHi Syntax Highlighter [Deleted]

Any chance you could upgrade your version of PHP? The regular expression library that PHP uses (PCRE) has been updated a few times since that version of PHP. Ultimately this plugin isn't doing anything fancy besides calling the GeSHi highlighting library, and the error you are getting is within that file. I checked, and there's no newer version of GeSHi, but there is newer versions of the regular expression library (which is causing the error) in the newer versions of PHP.
 
For a 'quick & dirty' method while debug mode is turned on and logged in as an admin to the ACP, go into...

ACP => Appearance => Template Modifications => {Digital Point Syntax Highlighter} editor_dialog_code

In the "Replace" text box add your new selections to the list of options. For example, for a new project I am working on I added ColdFusion to the list of choices.
Code:
<script src="{$javaScriptSource}/digitalpoint/syntax_highlighter.js?_v={$xenOptions.jsVersion}"></script>
$1
<option value="code=CFM">ColdFusion</option>
<option value="code=JavaScript">JavaScript</option>
<option value="code=CSS">CSS</option>
The value to use for the "code=" part has to match the name of file in your {xf}/library/DigitalPointSyntaxHighlighter/geshi folder. My new entry for ColdFusion, for example, would use "cfm.php" so "cfm" is the value to use for the code in the option while the "ColdFusion" text could be anything you want it to be.
That doesn't work for me. Even if I manually modify the original template, that doesn't work. Any help?
 
Good day, How can I change the colors?

@digitalpoint I do not get an activation email with you in the Forum
Geshi doesn't really have an (easy) mechanism to change the colors. The colors are defined within the individual files for each language (within the geshi folder).

I got the following error
Callback DigitalPointSyntaxHighlighter_Listener_LoadClassBbCode_Formatter_Base::loadClassListener is invalid (Invalid Class).

I am using Xen foro latetst version 1.5.4.
Can you please let me know the issue

Many Thanks
Did you upload the files? If so, did you upload them to the right place? That error is going to be from XenForo not being able to find the PHP files that come with it.
 
Geshi doesn't really have an (easy) mechanism to change the colors. The colors are defined within the individual files for each language (within the geshi folder).

Did you upload the files? If so, did you upload them to the right place? That error is going to be from XenForo not being able to find the PHP files that come with it.
I followed the following steps.
1. I created a zip files of upload folder "upload.zip" containing "js" and "library" folder.
2. upload the zip file on public_html/library/
3. Extract the Zip file there
4. now at public_html/library/ i have folder named "upload" having the two sub folder "js" and "library"

5. And when i tried to upload Xml in Xen foro, i got the error.

Did i miss something here?.

Thanks
 
The CONTENTS of the upload folder get uploaded, not the upload folder itself. You end up with a new folder in your normal XenForo js folder and a new folder in your normal XenForo library folder.
 
The CONTENTS of the upload folder get uploaded, not the upload folder itself. You end up with a new folder in your normal XenForo js folder and a new folder in your normal XenForo library folder.
Many Thanks, it got fixed and now addon is installed.
but still i don't saw the code icon in my Xenforo. is something else to be done
Can you please help me with this.
Thanks
 
I'm not sure what you are asking... there are no options for the addon in the admin area of XenForo.

Thanks for your reply. See the image below.
Dropdown.webp

I mean how to add language in the dropdown, after installing the addon it still have only General code, PHP and HTML.

How to add other langauges like C/C++, C# etc in the above dropdown.

Thanks,
Vikram
 
It doesn't apply its own CSS... It's just using the colors geshi uses. If you want to apply your own CSS, you'd just want to add your own CSS rules.
problem is...the text like function() etc and webGLRenderer they dont have anything to "differentiate" them it's all under the same "class"


basically I can do this
Code:
.code span {
 color: white !important;
}
but it turns all the "span" stuff white within that code block it's readable for now but there really needs to be a class or somesuch present on the actual things so I can manipulate them otehrwise, I'd need access to the JS
 
Been getting a lot of these errors lately

ErrorException: Undefined index: LANG_NAME - library/DigitalPointSyntaxHighlighter/geshi.php:651
Generated By: Unknown Account, 56 minutes ago
 
I am getting this error on PHP 7: Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor in /library/DigitalPointSyntaxHighlighter/geshi.php on line 259
 
Looks like from one particular forum's rss

I've been getting the same error recently (pages of them, actually).

Here's the error I see:

Code:
ErrorException: Undefined index: LANG_NAME - library/DigitalPointSyntaxHighlighter/geshi.php:651
Generated By: Unknown Account, Today at 4:22 AM

And here's the request state:

Code:
array(3) {
  ["url"] => string(44) "http://www.tonymacx86.com/forums/-/index.rss"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Top Bottom