Archive for the 'wordpress' Category

Schon wieder ist fast ein Monat seit dem letzten Post vergangen… schlimm schlimm!

Nachdem bei uns (.at) heute Nationalfeiertag, auch Tag der Arbeit genannt, ist und jeder zuhause bleiben darf, habe ich von zuhause gearbeitet. Und dieses Blog endlich auf letzten Stand (2.5.1) gebracht, diesmal per SVN, damit updates zukünftig rascher von statten gehen… und weil’s am Tag der Arbeit ist gibts auch gleich ein neues Bild im Kopfbereich dieser Seite. Wurde in der Tau Pan in der Khalari aufgenommen :)

Sonst ist die Welt aber noch in Ordnung, mittags haben 2 Herren telefoniert und übers fotographieren diskutiert während ihre Frauen gekocht haben - was kann da schon passieren? :)

I’ve put together a Plugin for widgetizing cpmfetch functions for wordpress. CPMFetch is short for Copperminefetch, a php-program that helps pulling data from Coppermine gallery.
While building my new theme i made 3 short widgets which i seperated from the theme and put into it’s own plugin.

Right now CPMFetch Widgets Plugin provides 4 Widgets:

  • cpmfbase: provides a simple text-header - this could also be done using a Text-Widget and makes only sense if you use more than one CPMFetch Widget. You can put it above the other CPMFetch Widgets and use it as a common title. Title can be configured using Widget-Administration.
  • cpmfrecent: This Widget shows the recently added pictures to your Coppermine gallery. You can configure Title, Thumbnailwidth, Number of Columns/Rows, Linktype and style from the Widget-Administation.
  • cpmfrandom: This Widget shows randomly selected pictures from your Coppermine gallery. You can configure Title, Thumbnailwidth, Number of Columns/Rows, Linktype and style from the Widget-Administation.
  • cpmfmostviewed: This Widget shows the most viewed pictures to your Coppermine gallery. You can configure Title, Thumbnailwidth, Number of Columns/Rows, Linktype and style from the Widget-Administation.

Feel free to pull CPMFetch Widget and enhance it, i only put the functions inside that i needed for my site. CPMFetch comes with a load of more functions, i think it might be really nice to have a widget that fully supports CoppermineFetch!

Installation:

  • Download from blog.stieglmayer.com/downloads/cpmfetch_widget.zip
  • Unzip into your wordpress/wp-content/plugins directory
  • Go to Administration/Plugins
  • Activate the plugin
  • Go to Administration/Plugins/CPMFetch Widget Subpage and enter the full path to your cpmfetch-file (e.g. /home/<username>/www/cpmfetch/cpmfetch.php)
  • Go to Presentation/Sidebar Widgets and configure the Widgets.

Requirements:

Hints:

so as you can see we got a new theme - derived from mandigo theme (www.onehertz.com/portfolio/wordpress/mandigo/). After looking at different themes i decided for this one, because i wanted a 3 colum-theme, but i didn’t find any widget-ready themes i liked. and mandigo looked like it would fit a 3rd column on the right very well!

playing around for some time to get familiar with the sidebar-registration and creating my own widges (for the Coppermine Fetch script), all in all it took like 2-3 hours of time… especially the stylesheets :(

whatever, it’s up and running, upcoming events widget doesn’t work for now, but hey - that was enough time for today!

update: yes, i will be releasing this theme, or i will give it back to the creator of mandigo to release it on his side - did not decide so far. but there is 2 points keeping me from doing this right now:

  • the theme is not finished yet: it has a fixed width of approx. 1000 pixels, that’s good as i guess nearly nobody has lower resolutions than 1024×768 and it’s ugly to have those blank areas on the left and on the right side! (especially if you have a widescreen-notebook…). so my ideas left to implement are: - a flexible content column - getting resized in 2 or 3 steps (via javascript/css modification), combined with font-size increments. so the effect will be a bigger blog with bigger font - not more content will fit onto one screen but it will be easier to read (yes, i’m getting old and my notebook is a lightweight one with a small screen ;). if i can achieve the same effect in one step for the right column i could manage to fit in not only one column of pics but 2 or 3 beside each other. or if the screen widt is 1280 or more add a 4th colum and move some of the widgets there like the recent articles/comments to clean the other columns up. once the window is resized and made smaller everything should go where it is right now and the 4th column should be hidden.
  • 2nd point: widgets. i have coded some widgets for the cpm-fetch module, that was quite easy, but right now there is a hardcoded path in the widgets and there is no way to pass parameters to them (like how many pictures should be displayed). and those widgets reside within the theme-files, but that is the wrong place… so i should look into some other widgets how to make a config-page and how to pass parameters to them. and then put all this new stuff into a seperate cpm-fetch widget.

Done. maybe in a year or so…. ;) honestly - please give me some time… i really like to program and hack php from time to time and now this time has begun again. most times that is when i would get the time to come around some old stuff i push around and never finish. and before beginning this old stuff i look for something different. sounds familliar? :)

Close
E-mail It