create new tag
, view all tags

PhotonSkinDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on PhotonSkin 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

PhotonSkin Dev discussion

Moved from PhotonSkin

-- EstebanManchado - 20 Nov 2002

I installed PhotonSkin and applied PhotonTWikiMods. Some observations....

  • I had to change the file data/Photonskin to data/Photonskin.txt
  • In the normal view mode, the second link on the bottom displays as %VIMEDITTOPIC%, apparently an undefined variable. This variable should be documented.
  • When going into edit mode, the popup link opens up a new window but runs into the following error
Can't locate URI/Escape.pm in @INC (@INC contains: [...deleted...]) at /c/cygwin/usr/local/lib/photontwiki/bin/photonsearch line 27.
BEGIN failed--compilation aborted at /c/cygwin/usr/local/lib/photontwiki/bin/photonsearch line 27.
  • Selecting any button (preview, save, checkpoint, cancel) from the edit mode runs into the following error
Can't locate Mail/Send.pm in @INC (@INC contains: [...deleted...]) at ../lib/TWiki/Notifications.pm line 19.
BEGIN failed--compilation aborted at ../lib/TWiki/Notifications.pm line 19.
Compilation failed in require at /c/cygwin/usr/local/lib/photontwiki/bin/savemulti line 34.
BEGIN failed--compilation aborted at /c/cygwin/usr/local/lib/photontwiki/bin/savemulti line 34.
  • There is no explanation above what "Checkpoint" or "Popup" do.

It appears to me that there are some perl dependencies that have not been documented. Also, the other errors seem to be due to missing configuations that could be rectified by additional documentation. Further, it is not clear why a Mail script would be called at every action in the edit mode.

-- ThomasWeigert - 07 Nov 2002

Yes, you're right in everything :-) Sorry, this is my first skin and I packaged it in a hurry, so to speak.

I've documented the Perl dependencies (the two you said plus Text::Soundex) and I uploaded an updated version (I thought I had uploaded the latest one). The rest is hopefully fixed now.

The reason why Mail::Send is required is notifications. Although usually no mail is sent, you need the module in case you use the special notification syntax (see PhotonSkin#Notifications, above).

-- EstebanManchado - 07 Nov 2002

This sounds interesting. How about some screenshots to illustrate and "sell" your skin? Compare with TigerSkin: you get an idea what you're dealing with from a screenshot. Admittedly not the whole thing, but it's better than nothing.

(Yipes! In preview mode there's a lot of "stuff" after the topic text, but before the Save button. Can somebody figure out what went wrong?)

-- TorbenGB - 07 Nov 2002

What do you mean with "a lot of stuff"? Do you mean text? Uninterpolated variables? I haven't seen any of that myself.

-- EstebanManchado - 07 Nov 2002

Sorry for being grossly inaccurate. I'll quote it or attach a screendump or similar. Don't see it here at work, but at home I did. Might be related to the fact I'm running Mozilla 1.1 at home? Let me get back to you.

-- TorbenGB - 08 Nov 2002

I don't think it can be browser-related, but who knows? :-) Hmmm.... wait, do you mean you see different things in exactly the same TWiki installation? That would be very strange indeed. I personally use Mozilla 1.0.1 and Opera 6.1, and never have seen that kind of stuff. I will try to tell you when I see the screenshot.

-- EstebanManchado - 08 Nov 2002

Screenshot is now attached. Esteban, please remember to release the edit lock on the preview page when you're done with your edits. That screenshot is with Mozilla 1.1 on Windows XP (US).

-- TorbenGB - 08 Nov 2002

Sorry for the lock, Torben. I'm used to my local TWiki (it has "Release edit lock" set by default). With regard to the screenshot, I have no idea what can be the problem. It's the same TWiki installation, accessed from two different browsers, which produces two different results?

In any case, can you also post the generated HTML? Are there any messages in the webserver logs? Does it happen at home, but with another browser (eg. Opera)?

-- EstebanManchado - 08 Nov 2002

Page source (in preview mode) is now attached as .htm. As for TWiki installations, webserver logs, etc. - beats me. We're talking about this installation here at twiki.org which I'm just a simple user of. As for browsers, this only happens on Mozilla1.1/WinXP, not on IE6/WinXP. This is my home pc I'm working from. Also from work (IE6/NT4) there's no problem. Haven't tried other browser/OS combinations. I only got this one pc.

The edit lock, it's a familiar thing. Check out the %RELEASEEDITLOCKCHECKBOX% variable over at TWikiVariables. You can set it on your EstebanManchado page to your preference. Neat!

-- TorbenGB - 08 Nov 2002

I've been reading the source you attached, and it's really weird. It seems that "someone" insists in repeating some random chunk of source several times (exactly the same every time; and please note that the page you have attached scrolls to the right). At first I thought you were talking about your home or work installation, with PhotonSkin installed, but it seems a general problem in twiki.org, right? I mean, unrelated to the skin.

The problem is probably on the client side. Have you tried a Mozilla stable version (i.e. 1.0.1 or the latest 1.2 beta)?

And thanks for the release edit lock tip ;-)

-- EstebanManchado - 13 Nov 2002

This looks very interesting, particularly the searching and specific notification feature - worth adding this page under EmailNotificationEnhancements and putting it into TWikiPatches as well (have a look at the PatchGuidelines too).

Do you really need Mail::Send, by the way? TWiki sends its notifications via Net::SMTP, which is already installed on many Perl setups, and there is also some infrastructure code in CVS:lib/TWiki/Net.pm to use this.

I think your notification code will also have some overlap with OmittingEmailInWebNotify, which is now in BeijingRelease - I assume you require the 'Main.' prefix on the WikiNames?

-- RichardDonkin - 13 Nov 2002

With regard to Mail::Send, sorry, I didn't look at the other notifications before implementing this one. Right now I'm refactoring the notifications module, and changing the use of Mail::Send for TWiki::Net (among other things).

I will look at the patches thing and make one when I finish the refactoring. Right now the code is not ready for a public patch ;-).

OTOH, I don't see overlap between the PhotonSkin notifications and OmittingEmailInWebNotify. Perhaps I don't understand the latter. PhotonSkin's notification allows you to send a one-time notification, explicitly, to anyone in the same TWiki. One marks the important text somehow, and writes the htpasswd entries (usually the TWiki usernames) of the users he want to notify (so, no Main prefix is required). Is a push approach rather than a pull one, like WebNotify.

Also, it only works for an intranet, where the email addresses are the usernames plus some common domain. Of course, someone could easily modify it to get the addresses from the user preferences and all of that...

-- EstebanManchado - 20 Nov 2002

I was assuming that WikiNames were how you specified recipients. You could just use the code from OmittingEmailInWebNotify that lets you get the email address from a user or group WikiName in TWiki. This would work for non-intranet users as well.

-- RichardDonkin - 20 Nov 2002

The initial idea of using usernames had sense because that way, we could figure out easily the email addresses and Jabber IDs (and they are easier to type). One problem with WikiNames is that they are oh so long, so boring to type ;-). I don't know if many people would use it anyway if they had to write something like:

##This is an important message##(EstebanManchado GonzaloAller)

Writing the current alternative, namely:

##This is an important message##(zoso gonzalo)

is just faster and makes it usable. Leave alone having to remember surnames :-). I agree perhaps it's not the best solution in the general case, but inside a small techie intranet, I think it definitely is.

But, the notification system supports aliases, so it shouldn't be difficult to use WikiNames and make some aliases for the login names. I don't know if my employer will let me implement the general case (after all, we already have all we need, and as a small IT company, we haven't got much time to waste), but contributions are definitely welcome.

-- EstebanManchado - 20 Nov 2002

Probably what should happen is that aliases of some sort should go into the core notification code, e.g. the name part of the email address (with a TWikiPreferences setting for 'intranet email domain' such as @example.com. This would need to go into a single page for efficiency, I think, e.g. a Main.WebAliases page that lists user's WikiNames and aliases, one entry per line, like WebNotify. Or WebNotify could be used for this purpose, though that would require retyping the user's aliases on every WebNotify page.

Ideally the WebAliases page would be built automatically every time someone updated their user page, by scanning the '* Alias:' entry on their page - would require a hook into save and would slow down all saves of user pages, but I suspect such pages don't change very often anyway. This approach would make it easy to pick up usernames for various forms of InstantNotification, using InstantMessaging as well as mobile phone numbers for SMS notification, by having entries for Jabber, IRC, SMS, etc ... Needs some thought.

One question about your notification - in the following, is the 'important message' stuff used as a subject line or in the body of the email, or in some other way?

##This is an important message##(zoso gonzalo)

Convincing your employer to let you get your patches into the core TWiki code is in your and his interests, of course - once the features are in the core the maintenance effort on your part is much less when you upgrade TWiki, and of course the TWiki community benefits smile

-- RichardDonkin - 21 Nov 2002

On WebAliases and such: I don't know if it's the best option, because I still do not know well enough TWiki, but the first idea that came to my mind was storing the information on each userpage. I mean, each user should have her own contact information in her userpage, as well as her defined aliases. I'm not sure, but I think that it's trivial (from Perl) fetching the current user settings, and thus the current user aliases, right? That way we wouldn't have problems with page updating and we would be able to define both global aliases and "personal" aliases. With respect to efficiency, I don't think a notification from time to time can have a direct impact on it.

  • Wasn't aware that aliases were defined by each user in their home page. Seems like quite an overhead for everyone to have to come up with these, but maybe that is reasonable. I was thinking of using global aliases only and for other types of notification as well, e.g. the mailnotify run. But even in the single-notification-on-change case, it's not very efficient to have to grep hundreds of user pages for each alias - hence the idea of a WebAliases page. Perhaps this could be maintained on demand by checking the modification times of user topics against the WebAliases file. Or it could be a hidden data file, like the remote users file. -- RD

On the notification message: There is a simple template you can use for the email message, so you can put the marked text inside the body (as does the default template), in the subject, or whatever.

On the patches: Perhaps I didn't express myself correctly (sorry, obviously English is not my mother tongue), but the problem is finding time to implement a general solution so it can go to the TWiki core, rather than he letting me release them. In fact, he wants me to release them, and wants to collaborate with the TWiki (and free software, in general) community. He's also a techie and a big Perl fan, you know. And of course I (we) agree with you that it would be a GoodThing for everyone :-). We'll make our best to implement the general solution, but we can't warrant anything.

  • I see - still, my argument was that it's good for your employer (longer term) for you to work on the general case, not just on getting your patches into the core. In fact, even if your general-case work is the same in features as your current work, that's a benefit in terms of maintainability. -- RD

-- EstebanManchado - 21 Nov 2002

Is there any "standard" way to get user information? I don't know how to get the user email for the notifications, and, if possible, I don't want to parse the user topic by hand.

  • There are some subroutines in the TWiki.pm file with 'notify' and 'mail' in their names - they are fairly generic and could be adapted to parse other types of alias or IM usernames. -- RD

-- EstebanManchado - 27 Nov 2002

I've put in some comments above as bullets.

-- RichardDonkin - 27 Nov 2002

This and related topics should probably be moved to the Plugins web now since it has evolved from a discussion on how things could be done to an actual implementation. : )

-- MattWilkie - 27 Feb 2003

Sorry, you're right. I'm moving PhotonSkin{,Dev} to the Plugins web.

Oooppss.... It seems I can't :-(.

-- EstebanManchado - 28 Feb 2003

Moved skin package and dev topic from Codev web to Plugins web. Let me know if there are other related topics.

-- PeterThoeny - 28 Feb 2003

I suppose PhotonTWikiMods should be moved, too. Thanks, Peter.

-- EstebanManchado - 06 Mar 2003

I've been adding security to PhotonSearch, so it doesn't show in the results pages you can't see anyway. In the process, I think I found a little bug in TWiki::Prefs. The bug is (I think) that in some circumstances the final preferences in alternate webs aren't returned correctly. Here is a patch:

--- Prefs.pm-old        Tue Apr  8 11:50:58 2003
+++ Prefs.pm    Tue Apr  8 11:09:34 2003
@@ -199,6 +199,8 @@
             @finalPrefsKeys = ();
             my @saveKeys    = @prefsKeys; # quick hack, this stinks
             my @saveValues  = @prefsValues; # ditto
+            @prefsKeys = ();
+            @prefsValues = ();
             getPrefsFromTopic( $TWiki::twikiWebname, $TWiki::wikiPrefsTopicname );
             getPrefsFromTopic( $altWebName, $TWiki::webPrefsTopicname );
             @altPrefsKeys   = @prefsKeys; # quick hack, this stinks
Any comments? Is it really a bug?

-- EstebanManchado - 08 Apr 2003

It seems it's indeed a bug, and according to Peter, the fix is right. See AlternateWebPrefsBug.

-- EstebanManchado - 19 May 2003

I attempted to install PhotonSkin today and now I get this error message when I attempt to view a page:

Can't locate TWiki/Colorize.pm in @INC (@INC contains: ../lib . /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl) at ../lib/TWiki.pm line 161.
BEGIN failed--compilation aborted at ../lib/TWiki.pm line 161.
Compilation failed in require at view.pl line 28.
BEGIN failed--compilation aborted at view.pl line 28.

I looked through the installation packages for both PhotonSkin and PhotonTWikiMods and can not find Colorize.pm. Perhaps it was left out of the latest update? As long as you might review the installation package, I would strongly recommend including all the relevant files and topics in a single PhotonSkin installation package since they are all of a set. PhotonSearch provides essential documentation and yet it does not get installed on my local web. Consequently all your references to PhotonSearch within the PhotonSkin topic show up as refering to non-existant topics.

Thanks! I think that this is a great usability enhancement to TWiki and I look forward to getting it up and running.

-- LynnwoodBrown - 10 Jun 2003

Hi Lynnwood,

Yes, sorry, you're right: Colorize.pm was left accidentally out of the distribution (it should be in PhotonSkin). I will upload a new revised version with the added file in a minute.

And you're right too with the PhotonSearch topic :-). I will include it in the next revision, or perhaps move all that information to the PhotonSkin topic (I think the latter will be better).

Thanks a lot for your suggestions.

-- EstebanManchado - 11 Jun 2003

Thanks for this skin.

The change log says that version 1.0 added "added "lurker" script." Could you please tell us something about that?

When I install version 1.0 at http://luddite.cst.usyd.edu.au/cgi-bin/twiki/view/Jason/WebHome, I see a button called "Lurker", but it calls a script that I haven't got. Advice welcome.

-- JasonGrossman - 10 Dec 2003

Edit | Attach | Watch | Print version | History: r15 < r14 < r13 < r12 < r11 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r15 - 2004-11-20 - MartinCleaver
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.