MyBB Hacks

Full Version: Cool Codes (Syntax Highlighter)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10
Thank you for the useful plugin!
But I have an issue with it as I am using it on a Dari forum which is a RTL language. As you can see from the shot the code also appears from right to left which I really don't want this to happen.

[Image: 67808286705583334816.png]

Any idea how to fix it, I really appreciate.
How to use this plugin. I didn't found any instructions on how to use, Can somebody help me?
Check the links in the first post.  You can always view the underlying code for any post by quoting it.
Can you add C# to supported languages?

It would be nice Biggrin
That's must too bad!!!!!!!!!!!!!
Fixed issue reported by Midori (who deleted the post).
Apologies for being so late, I forgot to get around and look at it.
This can be fixed by editing inc/highlighter.php, and finding:

PHP Code:
function html_highlight(&$code)

replacing with

PHP Code:
function html_highlight($code)


Thanks to Midori for reporting!


I've also updated the package to v1.25 which fixes the above.
Thanks for your answering  Yipi
another problem for me .
Example:
when i insert below codes in code section

PHP Code:
<div class="wrapper">
<div class="header"></div>
<div class="nav-container">
<div class="nav">
<ul>
<li><a href="#">home</a></li>
<li><a href="#">forum</a></li>
<li><a href="#">upload</a></li>
<li><a href="#">contact</a></li>
</ul>
</div>
</div>


Class code disappear  (class="*****") , same below

PHP Code:
<div>
<div></div>
<div>
<div>
<ul>
<li><a href="#">home</a></li>
<li><a href="#">forum</a></li>
<li><a href="#">upload</a></li>
<li><a href="#">contact</a></li>
</ul>
</div>
</div>


I have ( class="tooltip" ) in my forum. maybe this is problem for me.Unlove
A Solution for me:
If i insert <div class ="wrapper"> (space after class ) Everything will be O.K.

I guess it depends on what parser replacements you have activated?
I don't think this plugin does anything with class="tooltip"



HTML Code
<div class="wrapper">
<div class="header"></div>
<div class="nav-container">
<div class="nav">
<ul>
<li><a href="#">home</a></li>
<li><a href="#">forum</a></li>
<li><a href="#">upload</a></li>
<li><a href="#">contact</a></li>
</ul>
</div>
</div>

PHP Code:
<div class="wrapper">
<div class="header"></div>
<div class="nav-container">
<div class="nav">
<ul>
<li><a href="#">home</a></li>
<li><a href="#">forum</a></li>
<li><a href="#">upload</a></li>
<li><a href="#">contact</a></li>
</ul>
</div>
</div>

XML Code
<div class="wrapper">
<div class="header"></div>
<div class="nav-container">
<div class="nav">
<ul>
<li><a href="#">home</a></li>
<li><a href="#">forum</a></li>
<li><a href="#">upload</a></li>
<li><a href="#">contact</a></li>
</ul>
</div>
</div>

Code:
<div class="wrapper">
<div class="header"></div>
<div class="nav-container">
<div class="nav">
<ul>
<li><a href="#">home</a></li>
<li><a href="#">forum</a></li>
<li><a href="#">upload</a></li>
<li><a href="#">contact</a></li>
</ul>
</div>
</div>

this is still cool plugin ever,
try this demo link with various code
v1.26: MyBB 1.8 compatibility fix
Pages: 1 2 3 4 5 6 7 8 9 10
Reference URL's