Welcome to Geeklog, Anonymous Tuesday, December 24 2024 @ 11:45 pm EST

Development

Rating plugin 1.0b

  • Sunday, January 29 2006 @ 08:40 am EST
  • Contributed by:
  • Views: 7,467
Plugins

The Rating plugin 1.0b (beta) release is on my site and in the downloads section on this site. If you have any problems, post them in the forums here or on my site. Please also post any feedback/suggestions.

This plugin allows you to add a rating system to any item. You can add them with autotags, or with a slight modification to the core files. Full details will be posted on my site soon.

I would also like to ask Dirk and the guys: please would you think of some way that a plugin can contribute code to stories and other items, so that it is not necessary to modify core files to add a rating.

Cheers, Euan.

Staticpage to Access error.log

  • Wednesday, January 18 2006 @ 11:06 am EST
  • Contributed by:
  • Views: 11,786
Geeklog I've often needed access to my error.log from a machine that did not have an SSH client installed. I created this little hack that can live within a static page:
  1. Go to the staticpage admin screen and hit the "Create New" button.
  2. In the PHP drop-down be sure to select "execute PHP"
  3. For the group down-down, be sure to select "Root" and be sure to uncheck teh Read flag for Members and Anonymous (NOTE: this is important for security)
  4. In the "content" textarea add the following:
    global $_CONF;
    require_once $_CONF['path_system'] . 'classes/downloader.class.php';
    $dMgr = new downloader();
    $dMgr->setPath($_CONF['path_log']);
    $dMgr->_setAvailableExtensions(array('log' => 'text/plain'));
    $dMgr->setAllowedExtensions(array('log' => 'text/plain'));
    $dMgr->downloadFile('error.log');
    if ($dMgr->areErrors()) {
        $dMgr->printErrors();
    }
    
  5. Save the page

That's it. Simple, elegant and as secure as Geeklog is.

Flickr plugin

  • Sunday, January 08 2006 @ 05:45 am EST
  • Contributed by:
  • Views: 19,556
Plugins

The Flickr plugin displays thumbnails of Flickr photos on your site and links the thumbnails to their photo pages.

All the plugin does is to implement a [flickr:] autotag. You simply add the photo's id and it does all the rest. What is a photo id? When you view a photo on Flickr, the URL looks something like this:

http://www.flickr.com/photos/dhaun/71877803/

So here "71877803" is the photo's id. Now you simply add that id in the [flickr:] autotag after the colon:

[flickr:71877803]

When the story is displayed, it will show the photo's thumbnail instead of the autotag. Clicking on the thumbnail will take you to the photo page on Flickr (the above URL, in this example).

The plugin will get the photo's title from Flickr and display it as a title attribute when you hover your mouse over the thumbnail. If you'd rather provide your own title, simply enter it after the id:

[flickr:71877803 How to make a penguin fly]

And that's pretty much everything the plugin currently does.

Page navigation