#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
How-to and Troubles...
wpForo and SyntaxHi...
 
Share:
Share
Tweet
Share
Notifications
Clear all

wpForo and SyntaxHighlighter Evolved

Page 1 / 3 Next
    Last Post
RSS

labradorman
Posts: 11
 labradorman
Topic starter
November 19, 2018 6:37 am
(@labradorman)
Active Member
Joined: 4 years ago

Hi,

I would love to make my webboard as a community for programmers; therefore, I would love to make the SyntaxHighlighter Plugin (or other similar plugins) be usable in wp-foro.

I have followed the previous 2 suggestions without sucess:

1. https://wpforo.com/community/how-to-and-troubleshooting-2/how-to-use-wpforo-with-syntaxhighlighter-evolved/

Here, I successfully copied the layouts folder to the destination /wpforo/layouts/1/post.php , but there is no line containing the following code as suggested. (is it due to wpforo update?)

<?php echo wpforo_content_filter( wpforo_kses($post['body'], 'post') ) ?>

2. this suggestion : 
https://wpforo.com/community/general-discussions/quick-comparison-to-smf-and-mybb/#post-16371

However, in Dashboard > Forums > Settings > Features admin page , there is no option to enable the highlighter plugins.

Could you please kindly suggest ?

Best Regards,

This topic was modified 4 years ago 2 times by labradorman
Topic Tags
syntax highlighter
20 Replies
Sofy
Posts: 4057
Sofy - Facebook Sofy - Twitter
 Sofy
Admin
November 20, 2018 1:07 pm
(@sofy)
Support Team
Joined: 4 years ago

Hi @labradorman,

Please follow these steps:

  1. Install and activate the SyntaxHighlighter Evolved plugin
  2. Navigate to Dashboard > Forums > Settings > Features admin page, make sure the "Enable WordPress Shortcodes in Post Content" is disabled. 
  3.  Add the following CSS code in your current active theme functions.php file:
    function SyntaxHighlighter_fix_breaklines($content){
        return preg_replace('#<br[^<>]*?>#isu', "\r\n", $content);
    }
    
    function SyntaxHighlighter_for_wpforo(){
    	global $SyntaxHighlighter;
    	add_filter('wpforo_content_after', 'SyntaxHighlighter_fix_breaklines', 19);
    	add_filter('wpforo_content_after', array($SyntaxHighlighter, 'parse_shortcodes'), 20);
    }
    add_action('wp', 'SyntaxHighlighter_for_wpforo');
    
    

However, please note you need to use the source ( {:} ) button when you're adding a code. 

 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
labradorman liked
labradorman
Posts: 11
 labradorman
Topic starter
November 21, 2018 4:04 am
(@labradorman)
Active Member
Joined: 4 years ago

Dear Sofy,

Thank you so much for your kind and great help! It now works almost perfectly. Except with the same issue as mentioned in 

https://wpforo.com/community/how-to-and-troubleshooting-2/how-to-use-wpforo-with-syntaxhighlighter-evolved/

That is, the sign '&' and '>=' are now rendered incorrectly as '&amp;' and '&gt;'. Is there any way to deal with this wrong renders ? (I try to search for a simple solution, but couldn't find it)

Reply
labradorman
Posts: 11
 labradorman
Topic starter
November 22, 2018 1:13 pm
(@labradorman)
Active Member
Joined: 4 years ago

I understand that the solution may require some of your efforts. Since this function is very important to my website, and wpforo is the best webboard on wordpress, if there is a service cost for this solution, I would be happy to pay for it. 

Reply
Sofy
Posts: 4057
Sofy - Facebook Sofy - Twitter
 Sofy
Admin
November 22, 2018 1:45 pm
(@sofy)
Support Team
Joined: 4 years ago

Hi labradorman,

Thank you for your interest in the wpForo.

The code I've provided just allows the SyntaxHighlighter Evolved plugin to work in wpForo post content. We've checked the code and it works fine on our test websites. 

For further support, we'll need admin accesses. Please send login details to info[at]gvectors.com email address. 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
labradorman liked
Page 1 / 3 Next
  All forum topics
  Previous Topic
Next Topic  
Related Topics
  • Syntax highlighting
    1 year ago
  • How to use wpForo with SyntaxHighlighter Evolved
    1 year ago
Topic Tags:  syntax highlighter (4),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • Suggestion How to make new user to get approve manually before creating post and profile.

    By Adhyansh21, 12 hours ago

  • Posts deleted in database still show up on front-end

    By nylex, 14 hours ago

  • Not all links are automatically added with the "nofollow" attribute

    By st7878, 17 hours ago

  • Editors assign users to groups

    By mike_netinfo, 19 hours ago

  • Set password link opens forum login page instead of set password page

    By JanJan, 19 hours ago

  • User banned for using icons?

    By JanJan, 19 hours ago

Topic Tags

  • css52
  • translation50
  • plugin conflict48
  • seo47
  • new features45
  • buddypress43
  • avatar41
  • moderation40
  • ultimate member40
  • login40
  • forum40
  • registration37
  • threaded layout35
  • cache34
  • editor33
  • menu33
  • spam32
  • shortcode32
  • forum accesses30
  • widget29
View all tags (2190)

Recent Posts

  • RE: recover deleted forum categories

    I didn't delete the categories on the forum, just did s...

    By Asmadi1, 4 hours ago

  • recover deleted forum categories

    hi I need help, I accidentally deleted categories and f...

    By Asmadi1, 5 hours ago

  • RE: Not all links are automatically added with the "nofollow" attribute

    I have no idea, i guess not.

    By dimalifragis, 5 hours ago

  • RE: How to make new user to get approve manually before creating post and profile.

    Thanks again

    By Adhyansh21, 9 hours ago

  • RE: Posts deleted in database still show up on front-end

    Ok then, wait until someone from wpForo support will he...

    By dimalifragis, 12 hours ago

  • RE: Set password link opens forum login page instead of set password page

    Hi @janjan, Go to Dashboard > Forums > Settings...

    By Chris, 16 hours ago

  • RE: Editors assign users to groups

    Hi @mike_netinfo, Only administrators can change user...

    By Chris, 17 hours ago

Share:
Share
Tweet
Share
  Forum Statistics
21 Forums
9,933 Topics
50.2 K Posts
3 Online
48 K Members

Latest Post: recover deleted forum categories Our newest member: Dg1168 DreamGaming Casino Stan... Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation