ZenphotoCMS Forum
ZenGeshi : plugin to use GeSHi on zenpage - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html)
+--- Thread: ZenGeshi : plugin to use GeSHi on zenpage (/thread-8447.html)



ZenGeshi : plugin to use GeSHi on zenpage - hucste - 2011-04-03

Hello,
I've created an new plugin, named 'zenGeshi'.

http://zenphoto.dev.stephane-huc.net/pages/zengeshi-plugin-en




ZenGeshi : plugin to use GeSHi on zenpage - acrylian - 2011-04-04

Welcome as always! We even might use it ourselves sometime.

Btw, I am wondering why you don't use the multilingual feature for your two languages?




ZenGeshi : plugin to use GeSHi on zenpage - hucste - 2011-04-04

Because, i dont be carreful @ this!

(ok, function multilingual on panel admin...)




ZenGeshi : plugin to use GeSHi on zenpage - hucste - 2011-04-04

ok, new url : http://zenphoto.dev.stephane-huc.net/pages/zengeshi-plugin




ZenGeshi : plugin to use GeSHi on zenpage - micheall - 2011-04-04

One suggestion.

The instructions suggest you to edit your pages.php to this:
if(function_exists('printPageContentHighlight')) printPageContentHighlight();

My suggestion would be to instead use something like this:
`

if(function_exists('printPageContentHighlight')) {printPageContentHighlight();} else {printPageContent();}`

That way if for some reason they disabled your plugin temporarily it would still display the page content.




ZenGeshi : plugin to use GeSHi on zenpage - acrylian - 2011-04-04

I have two suggestions as well:

  1. Use a more common archive type than 7zip. I was indeed not able to open the archive and now would have to search for an extra tool.

  2. Make the highlight function printContentHighlight($content) a wrapper to pass content to so one could use it on any content and not just pages.




ZenGeshi : plugin to use GeSHi on zenpage - hucste - 2011-04-04

@micheall: yes, really not stupid! :p (i will change this, tomorrow)

@acrylian: for your 1rst point: no! because, this util exists for differents OSes (Windows, few Linux, few BSD* [MacOs, FreeBSD, Solaris], and others ...) http://7-zip.org/download.html

for the 2d point: i think, i hope to understand your words, but for the moment, just little more tired... as ?!




ZenGeshi : plugin to use GeSHi on zenpage - sbillard - 2011-04-04

@hucste: regards acrylian's point #1. Maybe that utility does exist for multiple platforms, but that is hardly the point. I may be able to find this utility and install it, but why should I? What is the particular advantage of that compression format not provided by a simple zip or tra.gz format that your potential users will most likely already have available?

Why put extra hurdles in the path of someone who might wish to use this feature?




ZenGeshi : plugin to use GeSHi on zenpage - hucste - 2011-04-05

Why not use a better compression format that zip?!
Why use compression tar.gz more than zip?!
Why use compression tar.bz2 more than tar.gz?!
And, why use compression tar.xz (or lzma) more than zip, or others ?!

this permit to gain places, permit to decrease http trafic, etc ... Respectable!

If i want to decrease my http traffic and propose download only by torrent, or P2P... it's my choice. Respectable!

It's my choice, egual for the licence... if i want put on GNU/GPL v3, it's my choice ... or LGPL v3, or BSD (modified or simplified), or Public Domain French, it's mine. (and it's compliant with GPL!) Respectable!

You dont decide for me!
You dont have to be my conscience!
You dont have to be my spirits or my minds!
And, absolutly, you dont have to be my act!




ZenGeshi : plugin to use GeSHi on zenpage - acrylian - 2011-04-05

Hucste, please calm down a little...no need to outburst here. We are making only suggestions.. I that to English not being your first language (well, it is my neither).

Fact is 7zip is not a common compression format. Believe me, I am not one of those "typical" users who does not install stuff if neeeded. But many do not or don't even know. This counts probably not for this more developer targeted plugin but for your others it may. Zenphoto plugins are only KB sizes you hardly get that much advantage.

But as said, we just made some suggestions and it is of course all your choice. So let's stop arguing about this.

We did not even talk about licences...not sure how you come to this. But as you started: No, you only partly free to choose the licence:
http://www.zenphoto.org/2009/11/general-contributor-guidelines/#themes-and-plugins




ZenGeshi : plugin to use GeSHi on zenpage - hucste - 2011-04-05

@acrylian: what others content do you thinks?

i've seeing this function:

  • getCodeBlock
  • getComment
  • getCommentBody
  • getContent
  • getExtraContent
  • getPageContent
  • getPageCustomData
  • getPageExtraContent

others?




ZenGeshi : plugin to use GeSHi on zenpage - acrylian - 2011-04-05

I am not familiar with the internals of Geshi. But I assume it just takes string content and colors any code it finds within that. then you would only need one function where you could pass that content to. Lke this printHightlightCode($somevariable) or for example. Then anyone can choose on what to use the hightlighting himself.




ZenGeshi : plugin to use GeSHi on zenpage - sbillard - 2011-04-05

Well, you certainly will decrease your download traffic if you use a format that people will not try to decipher.




ZenGeshi : plugin to use GeSHi on zenpage - hucste - 2011-04-05

@sbillard: you think what you want ... but stop to "rot" this post. It's not the subject of this! This will be really enjoy for everyone.

Thanks to respect this...

PS : If you want banish-me, because i think differently that your "universal" mind... so, act'up else stop-it!
Thanks to respect me...




ZenGeshi : plugin to use GeSHi on zenpage - sbillard - 2011-04-05

No wish to banish. I am constantly reminded about how uncomon common sense is. Thanks.




ZenGeshi : plugin to use GeSHi on zenpage - acrylian - 2011-04-06

Hucste, please stop feeling being attacked. No one does that. As said we give some tipps we think may help you to spread your plugins. Of course no one gets banished because of an different opinion on this forum.