New plugin - Unified Sidebar Image Display

Creating and modifying plugins.
Post Reply
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

New plugin - Unified Sidebar Image Display

Post by mgroeninger »

Ok, this is a new plugin, but incorporates two other plugins (which will eventually be removed from CVS to make searching easier).

I just added it to CVS, so it should hit spartacus sometime in the next 24 hours, if sourceforge has everything fixed.

Details:
Offers the ability to display images in the sidebar. The source of the images is configurable. The plugin is able to connect to a Menalto Gallery "random" url, access a Coppermine database directly (MySql only) or access images in the Serendipity Media Library.
The Coppermine display is a slight modification of the "Coppermine Thumbnails" plugin by Matthew Maude.

The Menalto display is a slight modification of the "Gallery Random Photo Block" plugin by Andrew Brown, and Tadashi Jokagi.

The modifications made to each plugin are merely to make them work within the framework of the new plugin, and do not change the general method of displaying images. There is no direct upgrade path. You will have to install the new plugin, configure it, and uninstall the old one (if you choose to upgrade).

The Serendipity Media display is a new method that displays images from directories under the serendipity "uploads" directory. This supports rotation based on time, limitation of directories, four different link methods (pop-up, in page, specified URL, or Usergallery page if installed) and several other features.

While I have tested the plugin to the best of my ability, it should be noted that I have been unable to do extensive testing on the plugin with regards to accessing a Coppermine gallery.

Please feel free to post any bugs, or to contact me directly, and I will attempt to fix them.
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Post by Linus »

Hi!
I get the following error installing through spartacus...

Please report this bug. This error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?)
Backtrace:
Installing plugin: Array ( [0] => serendipity_plugin_imagesidebar [1] => [2] => right [3] => 0 [4] => serendipity_plugin_imagesidebar )
INSERT INTO feudene_plugins (name, sort_order, placement, authorid, path) values ('serendipity_plugin_imagesidebar:3d65efb356bbe7ce60286b5e57b056de', 10, 'right', '0', 'serendipity_plugin_imagesidebar')
No valid path/filename found. Aborting.
Classname serendipity_plugin_imagesidebar still does not exist. Aborting.
Loading plugin failed painfully. File not found?
No valid path/filename found. Aborting.
Classname serendipity_plugin_imagesidebar still does not exist. Aborting.

Fatal error: Call to a member function introspect() on a non-object in /mnt/am1/01/007/00000025/htdocs/include/admin/plugins.inc.php on line 376

Greetings Andi
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Linus: Did you set your spartacus file mirror to netmirror.org?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gansad
Regular
Posts: 6
Joined: Sun Feb 25, 2007 10:53 am

Re: New plugin - Unified Sidebar Image Display

Post by gansad »

hi, i am using this plugin to display images from the media folder. Since all the images are actually in post entries; how do i link them to their individual entry instead of just the image itself; so that when it is clicked, the entry will be called instead of just the image.

thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: New plugin - Unified Sidebar Image Display

Post by garvinhicking »

Hi gansad!

To link to the actual post entries, the plugin would need to be modified to execute that query.

The 'user gallery' event plugin already supports that via the option to show links to entries. If you know some basic PHP, you could upgrade the sidebar plugin to use that query as well? Search for "linked_entries" in serendipity_event_usergallery.php and put similar code into your media_sidebar.php file of the serendipity_plugin_imagesidebar directory?

(BTW: That functionality only works using MySQL with enabled fulltext search methods [those work on MySQL 4.0 and require 'index' privileges - if the simple blog fulltext search works for you, so will this functionality])

(BTW2: If you absoutely don't know what to do, report back and I'll see what I can do...)

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ostfriese2004
Regular
Posts: 76
Joined: Tue Feb 13, 2007 11:12 pm

Post by ostfriese2004 »

Hi...

Is there a way to show just one of all the pictures from the media gallery all the time by using this sidebar plugin?

Regards

Helge
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi ostfriese!

If you simply set the number of images to "1" in the plugins configuration, you only get one image displayed there, yes.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ostfriese2004
Regular
Posts: 76
Joined: Tue Feb 13, 2007 11:12 pm

Post by ostfriese2004 »

Hey Garvin,

yeah, but there is still a rotation, coz you cannot define the picture to be displayed. Probably it works with this hotlink-option. But I have now added an "html klotz".
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

If you always want to show the same image, I definitely would choose a HTML nugget. It makes no sense to open database connections everytime to show the same image again and again. That's what static HTML is meant for *g*

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gansad
Regular
Posts: 6
Joined: Sun Feb 25, 2007 10:53 am

Re: New plugin - Unified Sidebar Image Display

Post by gansad »

garvinhicking wrote: (BTW2: If you absoutely don't know what to do, report back and I'll see what I can do...)

HTH,
Garvin
garvin, thanks for letting me know. the answer to the above is yes. i couldnt see "linked_entries" in that file... well even if i did, my php exp. is about 5 days old, (thanks to serendipity) and i'm not really sure what to do next.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: New plugin - Unified Sidebar Image Display

Post by garvinhicking »

Hi Gansad!

Okay, I'll do that for you, but you'll have to wait a few days, I got myself a flu. :(

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gansad
Regular
Posts: 6
Joined: Sun Feb 25, 2007 10:53 am

linking to entries

Post by gansad »

garvin -- has that flu of urs disappeared? still cant get the linking to entries to work. :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: linking to entries

Post by garvinhicking »

Hi!

I just committed version 0.96 of the imagesidebar plugin. In the select dorpdown on how to format the output you can now choose "Try to link to related entry" if you are using MySQL 4 to try to find links to your s9y entries where you used the image.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply