Tags:
create new tag
, view all tags

PhantomPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on PhantomPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

PhantomPlugin Development

Plugin Features

  • Support setting plugin only for selected webs [Planned]

Text Proccessing Features

  • Custom user variables [Complete]
  • Custom user text replacers and RE transformers [Complete]
  • Highligthing support [Complete]
    • Java [Complete]
    • Perl [Inprogress]
    • XML [Inprogress]
  • Support for JavaDoc [Planned]
  • Support for PerlDoc [Planned]
  • Support for common text formatting tags [Inprogress]
  • Support for user custom documentation tags [Inprogress]

Clipart Features

  • Support for browsing clipart storage [Planned]
  • Support for common clipart tags [Planned]

Discussion

  • The primary function of this package is a skin even though it includes a Plugin module. I suggest to repackage it as PhantomSkin. I will rename the topic once I get your OK and you did the repackaging. A screenshot would be helpful so that users can see what it looks like before installing the skin. -- PeterThoeny - 29 Aug 2002
  • Yes, screen shot of default skin I will propose. But about moving - I misslead you becose put too less information about this plugin. I try fix this mistake and describe a plugin more. Please take a look now a this. -- AlexeyEfimov - 29 Aug 2002
  • I believe that we are really dealing with two things here: a plugin as described in PhantomPlugin, and a skin. There is no obvious relationship between the two. It would be best to separate into the two components and move the skin part to the skin section as PhantomSkin. If these two somehow do belong together, this should be clarified in the documentation. -- ThomasWeigert - 03 Nov 2002
  • Thanks, i will separate soon! smile -- AlexeyEfimov - 15 Nov 2002
  • [Complete] - Now skin and plugin is two diferent packages. Please see PhantomPlugin and PhantomSkin topics.

Surveys

I have opinion that language highlighting is not simplicity realized by highlighters. So i ask for help to make right desision about highlighters support, please take a part of discussion:

  • Custom user variables is significant for someone? I guess that is unusefull feature.
  • Replacers and Highliters is needed to be impoved? The most troubles in this area - is recursive highlighting, i must disable this. For example, is i hightlight a comment, then in this commeted text i must do not perform hightlighting. It's stop my work for month now, i can't solve this problem correctly. Maybe someone have any expertise for this?
  • That documentation must be proposed in first time?

Thank You For any suggessions! smile

Bugs and Issues

I am trying to install the plugin.
The idea behind PhantomPlugin is nice, but I am unable to make it work: evey time I install it the whole Twiki site won't start, and I get
Software error:
Undefined subroutine CGI::charset
I couldn't find much documentation on the error anywhere, and I am not that fluent with Perl to debug the error, though I guess the line
$query->charset($1);
is the only likely candidate as the cause of my troubles.
Just to add some info on what I did, I just installed PhantomPlugin (no additions) and no additional Perl module.
Any suggestion would be appreciated, as the features of this plugin look interesting.

I try fix it soon, thank your for report! smile -- AlexeyEfimov - 15 Nov 2002

  • [Fixed] - This method now not using. Instead it used content type setting. Please checkout new version in PhantomPlugin topic. -- AlexeyEfimov - 20 Nov 2002

-- AndreaBacchetta - 01 Nov 2002

Let me first thank AlexeyEfimov for this very interesting plugin. It seems that what this plugin is trying to accomplish is very useful. But unfortunately, there seem to be some problems still, as described above. Additional comments below:

In my installation, TWiki just hangs after I install PhantomPlugin. If I disable line 89 of PhantomPlugin.pm, I get TWiki to come up and see some of the features described in the documentation for PhantomPlugin, but there are still problems:

  • If the REPLACE and VAR constructs are defined in a topic, they work as advertised. However, I could not get them to work when refering to the topic where they are defined via =

Warning: Can't find topic ""."" =.

  • It is very unclear from the documentation whether the highlighters have to be defined in the TWiki web or whether they can be defined in the local web. Anyway, I did not get highlighters to work when defining them in the local web. Actually, I did not get them to work even when putting them into PhantomHighlighters.
  • Another thing that is somewhat confusing is the claim in the documentation that these features are on a per web basis. But it appears from what follows in the documentation, that definitions need to be included in a topic for them to take effect. However, other features are on a per-TWiki basis, such as the regular expression replacers and the highlighters. It would be good to get this consistent or at least described consistently. My preference would be to have these features on a per-web basis, rather than per-topic or per-TWiki.
  • I also noticed a dramatic slowdown of TWiki after installation of this plugin, but not all the time.

-- ThomasWeigert - 03 Nov 2002

Thanks you for reporting, it will be fixed in next version. I try fix it very quickly. smile -- AlexeyEfimov - 15 Nov 2002

  • [Fixed] - Process of text parsing is improved for speed. I has refactor conseptual idea of replacers - now you can use formatters. Please see PhantomPlugin topic for more information. Actualy i fix the troubles with color overlapping, now highliters will works ok, ... i hope smile . -- AlexeyEfimov - 20 Nov 2002

FYI: there is an article at http://alistapart.com/ about using Inline XML to display things like code snippets with syntax highlighting while maintaining the semantic meaning and without requiring an application on the server to do the colouring. E.g. using

<s:comment># this is a comment </s:comment>
instead of
<font color=green># this is a comment</font>

-- MattWilkie - 04 Nov 2002

Thanks for information, but i thing that client HTML must be already colored, cos some browser may do not get ActiveX component and coloring will ignoring. I take a look at this soon, thanks! smile

  • You have got me an start point of formatters idea with <s:comment>. Thank you, now i get stability code for highliters, that can be use coloring overlapping and an new idea of "formatters" (see PhantomPluginFormatters). smile -- AlexeyEfimov - 20 Nov 2002

-- AlexeyEfimov - 15 Nov 2002

Wonderful plugin. THANKS. This is just I was looking for especially the custom text formatting bit. Installed just fine and started working right out of box but am still haveing one problem. mailnotify script fails with folloing message

Can't call method "param" on an undefined value at ../lib/TWiki/Plugins/PhantomPlugin.pm line 232.
code around line 232 reads
    $WEBCONTENTTYPE = &TWiki::Prefs::getPreferencesValue( "PHANTOMPLUGIN_WEBCONTENTTYPE" ) || "text/html";
    # Follow parameter used in bin/view script
    $query->param("contenttype", $WEBCONTENTTYPE); //line 232.
Message makes sense since mail notification is running in console mode through crontab and at that time it won't have $query defined. To get it to work I just had to wrap line 232 with an if statment as below
    $WEBCONTENTTYPE = &TWiki::Prefs::getPreferencesValue( "PHANTOMPLUGIN_WEBCONTENTTYPE" ) || "text/html";
    # Follow parameter used in bin/view script
    # set content type only when in cgi mode. 
    if($query){
       $query->param("contenttype", $WEBCONTENTTYPE); //line 232.
    }
Other one is a minor bug in Java highligher. (Although there are more complete highlighters like BeautifierPlugin I think this one is much simpler.) In following code it would treat MyParam as a wiki word and it would showup as an undefined wiki work with a ? at the end.
    public void myMothod(MyParam param)
    {
        // blah
    }

-- HaritNanavati - 19 Apr 2004

checked .zip into CVS

-- WillNorris - 19 Jul 2005

Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r16 - 2005-07-19 - WillNorris
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.