This question about Developing extensions (plugins skins etc.): Needs followup in Tasks

How to contribute change?

I have modified the file to allow for specifying the default element (textarea vs. pre) at the site preferences level, rather than having to specify it on every single code snippet. We wanted to use textareas everywhere and this seemed the way to accomplish that.

How do I contribute this change back in to the plugin?

-- JamesFrank - 08 Mar 2013

I have attached the modified file to this question. As I'm not a perl developer, someone should probably have a quick glance to make sure I followed conventions. But everything does seem to work. You can now set "DPSYNTAXHIGHLIGHTERPLUGIN_ELEMENT = textarea" in your SitePreferences.

-- JamesFrank - 08 Mar 2013

Hi James,

You have a couple of options:

This plugin is marked as PleaseFeelFreeToModify so, you could request a developer account ( GettingStarted ). check out a SVN repo, and check in the changes directly.

Another option would be to Open a task and attach your patch there.

We're always looking for new contributors, so small changes to plugins is often a good place to start.

-- GeorgeClark - 09 Mar 2013

I gave your code a quick look. Your changes seem okay to me.

There are probably a few things in the module that I'd do a bit differently, but they are mostly unrelated to your change. (The "use vars qw(...);" perl statement is deprecated. It's replaced by the "our xxx" Also it establishes the named variables as globals, which can cause issues in mod_perl and fastcgi environments, and are best avoided. But none of this is your problem at all.

You followed the module convention of adding $defaultEl as a global. It would probably be sufficient to just declare it as "my $defaultEl;" below all the our declarations.

-- GeorgeClark - 09 Mar 2013

QuestionForm edit

Subject Developing extensions (plugins skins etc.)
Extension DpSyntaxHighlighterPlugin
Version Foswiki 1.1.6
Status Needs followup in Tasks
Related Topics
Topic revision: r3 - 07 Apr 2013, GeorgeClark - This page was cached on 23 May 2019 - 13:03.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy