Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Geshi syntax highlight not working ?!
Avatar
dany85 #1
Member for 3 months · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Geshi syntax highlight not working ?!
Hello there

i'm trying to use Ckgedit with the Geshi Syntax Plugin; But

i have some snipped:

<?php
  $gravatar_link = 'http://www.gravatar.com/avatar/' . md5($comment_author_email) . '?s=32';
   echo '<img src="' . $gravatar_link . '" />';
?>

but if i post this in geshi; this happen:

[Image: https://abload.de/img/2019-06-2907_18_02-wie0jdd.png]

[Image: https://abload.de/img/2019-06-2907_18_20-widqjq9.png]

i try to do a fresh installation from dokuwiki with only the Ckgedit Plugin, but this happens still.

do i something wrong?

ps: this will happen with other Languages too, html, java ...

thank you.

regards
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
You have to save it before the highlighting appears.  When you load the page back into the editor a basic level of highlighting will be applied to the snippet.  If you want the complete highlighting effect in the editor, then change the editor's css by using the CKEditor editor CSS tool, which you will find on the Admin page.  It comes with instructions and substitutes your template's css for the base css that is installed by default.  I have not tested with every template but it should work since it is included in Dokuwiki's default settings.

Remember to clear your browser cache when changing these settings.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
dany85 #3
Member for 3 months · 5 posts
Group memberships: Members
Show profile · Link to this post
Hello

thanks for your reply. But this is not the problem :)

i got 2 more screenshots, you can see, the code is broken at the first "<" character.


[Image: https://abload.de/img/2019-06-3009_04_20-saitknc.png]

[Image: https://abload.de/img/2019-06-3009_04_43-sax2j9r.png]


The Source Code looks like this;

<h1>Test php snipped</h1>

<div class="level1">
<pre class="code php">
&lt; ?php
  <span class="re0">$gravatar_link</span> <span class="sy0">=</span> <span class="st_h">&#39;http://www.gravatar.com/avatar/&#39;</span> <span class="sy0">.</span> <a href="http://www.php.net/md5"><span class="kw3">md5</span></a><span class="br0">(</span><span class="re0">$comment_author_email</span><span class="br0">)</span> <span class="sy0">.</span> <span class="st_h">&#39;?s=32&#39;</span><span class="sy0">;</span>
   <span class="kw1">echo</span> <span class="st_h">&#39;{{&#39;</span> <span class="sy0">.</span> <span class="re0">$gravatar_link</span> <span class="sy0">.</span> <span class="st_h">&#39;?nolink&amp;}}

</span>

</pre>

<p>&nbsp;</p>
</div>

for me it looks like the code will be execute ?!
This post was edited on 2019-06-30, 09:15 by dany85.
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
First I don't see first "<" character.  Second, you cannot include images in a code block in Dokuwiki, if that's what you are trying to do. So, your second example is correct.   This is  what I get using your code, and it is what is expected.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
The author has attached one file to this post:
2019-06-30 07_05_20-✎ start [Greebo].png 6.9 kBytes
You have no permission to open this file.
Avatar
dany85 #5
Member for 3 months · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi :)

Thank you for your Reply. I believe we talk past each other :S

I don't want to include an image or something, i want exactly do what you screen looks like; Post some Code examples.

But when i copy & paste this code example not the same is happen like you

yours:
[Image: https://abload.de/img/expectedp2j2u.png]

mine:
[Image: https://abload.de/img/whats_happenqakfz.png]
Avatar
turnermm (Moderator) #6
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
See what happens of you use this method:
https://www.dokuwiki.org/plugin:ckgedit:deprecated
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
dany85 #7
Member for 3 months · 5 posts
Group memberships: Members
Show profile · Link to this post
so if i understand this correctly, i can't use the toolbar button:

[Image: https://abload.de/img/neinksjmf.png]

rather i have to do it manually every time?

[Image: https://abload.de/img/ja06ja4.png]

Because this way it worked...

[Image: https://abload.de/img/workedf9kp0.png]

But it's very time consuming this way :S
Avatar
turnermm (Moderator) #8
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
I think I might have found the problem.  I'll work on a fix.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
turnermm (Moderator) #9
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Done.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
dany85 #10
Member for 3 months · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi :)

Thanks for the Fix!. it worked now.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-09-23, 16:09:49 (UTC +02:00)