skip to main content

kiesler.at

Clock 0.3 for phpWebSite
updated by rck, 2005-03-26

Have a lot of visitors from different timezones? Always to late because you're playing around with your homepage? Bored to death and want something that changes after a while on your screen?

Or do you simply want to create your very own phpWebSite module? If you answered yes to any of those questions clock is for you.

0.3 now contains the danish language file, translated by Lasse Skov from LiquidArt. Thank you!

The boost-directory

Usually, the boost directory contains three files. In install.php, you can create tables and other stuff you'll need for your application. uninstall.php takes care that you don't leave too much stuff in the phpWebSite installation after the user wants to get rid of it.

You can also create a update.php, it will be called as soon as the user copied a newer version of the module over an older one which has been installed already. As soon as the user decides to update the module, phpWebSite will call update.php.

The conf-directory

Here you can set up all the stuff that makes phpWebSite great.

boost.php contains the current version of your module as well as its short and its long name. Be sure to use a mod_title, that's actually pronounceable. Not something like phpwsbb (you'll have a knot in your tongue after speaking it out repeatedly) but maybe something like clock, forums, users, etc. As general as possible but as specific as necessary.

You should also set up $mod_class_files, $mod_sessions and $init_object, so they would represent your modulename. Have a look in the clock-module for actual examples.

config.php actually isn't touched by phpWebSite. But there are a lot of people, like me, who like to put some runtime configuration in it. In addition to a nice database-driven user interface.

controlpanel.php lets you define the icon that will show up in the controlpanel as well as a description and a target-tab for it.

And the layout.php is very important, too. You allocate actual screen-estate for your modules in here.

Other stuff in conf

Actually, the clock module doesn't use all of the phpWebSite config-files. Peek around in other modules and find out about categories.php, module_rights.txt and search.php.

The lang-directory

This contains -- very hard to guess -- the language files. The file has to be called modulename.language.lng. modulename is your modulename, language the two-letter version of the target language. Popular examples include en for english as well as de for german. Including the english file makes sense, so others can easily translate your module.

Each language file starts with lang:|:modulename. The following lines all contain translations, the format is a:|:original:|:translated. Again: See the clock module for examples, it's really easy. But a lot of writing effort...




RSSComments - Make a comment
The comments are owned by the poster. We are not responsible for its content.
  • Clock Module

    Posted on 2005-05-03 04:34:56 By Anonymous

    I, and probably many others, have a small problem with the time settings on phpws. Not a phpws problem, but a problem because there is no way to change the time settings for phpws.

    I use a hosting company in USA (because it is cheap and reliable), however, I am based in Singapore and phpws obviously takes its time from the server. The problem being that I can never make sense of stats (daily stats are split over 2 days because of time zone mismatch) and calender is always half a day behind.

    Could clock evolve to become a standard module for phpws which controls all time settings for the site and allow time zone offset selection?

    Cheers,

    Brett Shadbolt
    http://www.censere.com

    [Reply ]

    • Re: Clock Module

      Posted on 2005-05-04 22:56:08 By rck[110]

      changed On 2005-05-04 22:57:20 Edited By rck (reason: )

      To be honest: I don't think so. Right now, the time configuration is read out of a config-file during the startup of phpWebSite. Making clock do these kinds of things would require hacking core classes which I don't like to do as phpWebSite is constantly evolving and I'd have to provide patches all the time.

      But: You could do a feature request on SourceForge, maybe in a more abstract form like "I'd like to be able to configure phpWebSite through a webinterface instead of the command line". And give the timezones thing as an example.

      you have a very nice site, btw!

      [Reply ]

  • Clock

    Posted on 2005-08-11 23:13:03 By Anonymous

    Maybe I can't see it for looking at it,
    but I think you should have the clock module visible/running on your page.
    If it is there, sorry to bother you.
    But I'd like to see what it does before I install it.
    Thanks

    [Reply ]

    • Re: Clock

      Posted on 2005-08-12 08:08:05 By rck[110]

      I don't have it running here, sorry. Maybe you can set up a test installation and run it there? If you'd like to do some developing, I'd recommend a dedicated test site for that anyway.

      [Reply ]

RSSAll Articles
2008, 2007, 2006, 2005, 2004

What's Related

Article Manager

Modules

Latest Updates

AdministrativeTexts
updated by freddiemac1993, 2013-06-14
wiki

Re: adventures
created by brittdavis10, 2012-02-23 (1 rply, 3 views)
thread

Re: how to run phpwebsite...
created by alexander, 2011-08-25 (2 rpls, 3607 views)
thread

Re: Forum tags
created by HaroldFaragher, 2011-08-22 (3 rpls, 8488 views)
thread


Zu den KO2100 Foren