Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
linenums not displayed
jackmaessen
✭✭✭
I am testing this plugin and there appears highlighted code but only with linenumber 1
In the source i see:
<ol class="linenums"> <li class="L0">...</li>
The L1, L2 and so on is not listed.
I did use this pre tag like in the readme file is told:
<pre class="pretty print linenums">code goes here</pre>
What is going wrong with the line numbers?
I switched to default theme when i tested but still are no line numbers
You can look in the source code here: http://forum.webprofis.nl/discussion/comment/1686#Comment_1686
0
Comments
What input formatter are you using?
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
i am using HTML input formatter with buttonbar; i also tested it with cleditor but the same result
I just tested Google code prettify and that one gives me the line numbers...and as far as i can see these two plugins are almost the same....
I am using now Google Code Prettify with this tag:
<code class="prettyprint linenums">code here</code>
and everything works perfect!With my plugin you only need to use the < pre > tag it automatically adds the class lineums.
Code is not generally to be used with lineums. Code and Pre are not the same thing.
Code is for a single line of code
My plugin is based on the one used here on this forum. the bellow I got from the source here on this forum.
My plugin only need to use < pre > and the rest is added via jquery.
< pre class="linenums prettyprinted" >
It is irritating when people complain about a plugin or theme, then use something else without waiting for me to get on here and help fix things. Instead of getting down to the bottom of things. Now this discussion points to someone saying my plugin does not work and there is no solution besides using something else. That ticks me off.
I would rather you did not bother, saves me the wasted time.
PRE:
The PRE element tells visual user agents that the enclosed text is "preformatted". When handling preformatted text, visual user agents:
CODE:
Designates a fragment of computer code.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder
change the code in prettify.js line 26.
to this
p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<code>"+a+"</code>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
then select your code with mouse and press C (codetag option) in buttonbar it will work with "Markdown"
$Configuration['Garden']['InputFormatter'] = 'Markdown';
Html doesn't seem to work
$Configuration['Garden']['InputFormatter'] = 'Html';
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
That is good , but it sucks that it won't work with html anymore... I do not use markdown..
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I found something interesting: when using the preffity.js from GoogleCodePrettify plugin, Prettyprint plugin also works fine with HTML formatting;. I just tested it and it seems to work: http://forum.webprofis.nl/discussion/296/test-prettyprint-plugin-with-other-javascript
Also Interesting: when downloading the package from google ( https://code.google.com/p/google-code-prettify/)
both the two .tar files in which prettify.js, gives to same problem: No Linenumbers.
As far as i can see is this prettify.js about 14kB and the one in the plugin ( http://vanillaforums.org/addon/googlecodeprettify-plugin) is about 18.7 kB
It seems that this highlight plugin ( with GoogleCodePrettify) is the only one which works fine with Q&A plugin.
I tested GeSHi: when accepting an answer and the comment moves upwards: highlighting is gone!
This one: http://vanillaforums.org/addon/g_syntaxhighlighter-plugin and this one: http://vanillaforums.org/addon/vanillasyntaxizer-plugin give problems with the popup in a topic when choosing: delete, Q&A; the spinner keeps running but the popup never appears
Yes I can confirm it does work ... that script is identical except it does not have the !function in the beginning.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
actually the code is completely different. between prettify.js in one plugin vs the other plugin.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Ok I fixed the plugin now it works again
http://vanillaforums.org/addon/prettyprint-plugin-1.3
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
screenshots?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
This is what I see
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
You need to refresh the page to see the formatting
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
ok
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I used the pre tag
html cleditor
only prettyprint I never used the other one only saw the code.
2.1.6
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Same result with button bar it works the same as with cleditor using html, will now switch to markdown.
Same result with markdown it works as well... cool
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
cool glad it works.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Lets hope it stays that way...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌