[Suggestion/request] photoalbum

Creating and modifying plugins.
Post Reply
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

[Suggestion/request] photoalbum

Post by SHRIKEE »

Hi all,

Im pretty new to serendipity and i must admit the code as i overlooked it doesnt make much sense to me. So i end up here.

Ive got a idea for a photoalbum plugin. Perhaps it exists. If so please point me to it.

I see that serendipity has a smashing nice media manager. Its able to save images in various folders, resize and whatnot. Its very nicely done.
Now what i want is a plugin that can load image files in selected folders and show them on a thumbnail page. When a image is clicked it shows in full size.

This way we do not need a install of image, gallery, coppermine or whatever compatible script. The plugin just uses the media manager. Much like the plugin usergallery. Only this one doesnt show categories by default which is a big lack in function to me. (no offence, its a nice plugin!).

Would some serendipity guru be willing to create such? All (or most) the functions nessesary are available in serendipity already. The only thing that needs to be done is a sidebar thingy that shows a link to the gallery or galleries. perhaps just the main page of it where a list or table is shown with the galleries in it.

No upload functions are required, the media manager would be used for that. Maybe a mass image resize function to resize all images in a album at once would be cool. This way images are easily used in posts AND the album. See what im getting at? I hope so...
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Shrikee, welcome to Serendipity. I can't help you with the information you need but the media manager is something that is dear to me, I would love to see it develop into a full photoshop competitor, but I lack any programming skills :wink:

Seriously, what you suggest sounds awesome, and becasue I've never got any of the photogallery plugins to work I add my vote to your idea. Garvin, don't hate me...
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

Hi Carl, thanks for the welcome :) i think im using your theme... with a different header img :) Me likes your setup!!

Anyway. Yes i think too its a super idea more and more since all the plugins require another script to run outside serendipity and therefor include other admin areas and blabla.. Basically if someone sets it up like that he/she maintains 2 websites. This is unpractical and why use it if serendipity offers the functions aswell... I wonder why it doesnt exist as of yet (or why its so superhidden IF it exists) :)
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Yeah I like what you've done with that theme. It seems that the most interesting part of the page footer has been removed, probably for backwards compatibility, and that is the $startpage variable. I might add to my page footer tutorial.
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

ive changed the header by replacing the img and editing the css to add height.width and borders.

i removed the footer thing and css footer classes. i also removed the bottomline as i like this look better :) furthermore i made no changes.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
costa
Regular
Posts: 110
Joined: Wed Feb 08, 2006 5:29 pm
Location: Poland
Contact:

Re: [Suggestion/request] photoalbum

Post by costa »

SHRIKEE wrote:Ive got a idea for a photoalbum plugin. Perhaps it exists. If so please point me to it.
maybe you should try picasa plugin. it works with picasa and shows nicely done galleries with thumbnails. you just export your albums from picasa with a xml file where the data resides and of you go. it works quite good althought i prefer managing my online albums with other software (gallery 2 to be precise).

CoSTa
"everything is under control" - kasparov demo
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [Suggestion/request] photoalbum

Post by garvinhicking »

There are also quite a lot of other photo gallery plugins in Spartacus.

The one that seems to come quite close to your wish should be serendipity_event_thumbnails ("Thumbnail page")?

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/
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

garvin:
the plugin you suggested show me nothing but a page with links to posts... Not exactly what i want.

costa:
Ive looked into picasa. This still requires a 3th party script, which im trying to avoid.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hm, the output you see there is not what I anticipated. This looks more like the output of something different.

You did upload pictures into your s9y media database, right? Because those are required that the gallery can show anything...?

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/
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

http://www.sothq.net/index.php?serendipity[page]=thumbs

have a look yourself :(

it also installs a plugin photoblog. not sure why but i dont need a single image in a blog also no list in the sidebar of it...

i still think my original idea is quite solid and easy to perform for someone familiar with the code :)
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, I saw your link. I actually confused the plugin with a different one I was talking of.

Once you upload images to the serendipity media database, you should use this plugin: serendipity_event_usergallery ("Gallery Display").

The code is not so hard and it seems you're familiar with PHP, so you might want to look into it if you need customization? But I think it could suit your needs quite well.

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/
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

aha, yes ive tried usergallery. thats how i came to this idea...

also yes ive looked into the files to customize it. its a very different way of coding as what ive seen before. and unfortunatly it doesnt make much sense to me whats what and such. i understand the code alright, but i have no clue how its put together :(

thats why i posted here and was hoping someone could help me out. in my opinion its fairly easy to do as it only requires the plugin to read configged folders and put the images in a table.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I think the best way then would be to help you understand the code. Are there specific questions you can ask, which I can answer? I think the code is fairly well put together, and I should be able to answer every question.

If you tell exactly what the plugin cannot do currently, I'll see if I have time to enhance it. But I will not code a full gallery-clone out of it. :-)

You can use directory as "categories" for the usergallery pluigin!

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/
SHRIKEE
Regular
Posts: 128
Joined: Tue Feb 21, 2006 2:49 am
Location: Netherlands
Contact:

Post by SHRIKEE »

garvin:

yes last night ive been playing with usergallery.

when you open the 'mainpage' of it it shows a huge page with photos all messed up and not catagorized.

what i want is a page with a list of directories in which the images reside. if a folder (gallery) is clicked it shows a thumbnail gallery.

so the 'new' plugin should be able to set a main directory (or root) inside uploads.

a structure:

Code: Select all

|- uploads
|--- gallery
|----- album 1
|----- album 2
|----- etc...
|--- other image folders
|--- etc...
in this structure the gallery folder would be the root or 'mainalbum'.
the folder inthere could be seen as sub-catagories or albums. offcoarse if there are images placed in the gallery folder they would appear too. for people who dont want multiple albums.

then on the user side. just a page with links or images is shown, not the filter and search options usergallery offers.

all files are uploaded/resized/managed and whatnot with the media manager. so its purely user side output that needs to be done.

Ill look into it some more later today but like i said. the code looks weird to me as ive never used/seen such way of programming.
My kingdom For i am king of my heap of trash

Developing code on:
Workstation: Windows 2000 sp4, TSW webcoder 2005
Server: fedora core 4 amd64, apache 2.0.54, php 5.0.4, mysql 4.1.11.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

The usergallery plugin actually is the same like the media database. So it shows the most recent images of all directories.

You could enhance the plugin by showing a list of directories first, where a user has to select the directory before he sees anything.

You just need to set the directory_filter and can pass that as a GET parameter to the URL to instruct the gallerycode to only display that directory.

So it would be great if you look into the code, as it seems you know your PHP fairly well (judging by the plugin coding you mention on your blog), so I would absolutely love it if you were able to help us in this regard. I'm sadly quite busy these days with releasing serendipity 1.0 and coding parts of the core that need polishing, as well as my every-day job. So every help we can get from you would be a huge benefit to us.

Can you specify what exactly you think looks weird about the code? Actually it is mostly object oriented with a solid differentiation of methods to interface with. If you just play a bit with it, you should get the hang of it quite soon. It's more some kind of "MVC" application than just a functional approach.

This approach is much more modular and thus allows coding plugins very easily, as you might see when looking at other plugins we have. It is quite superior to other plugin frameworks, and much cleaner than wordpress plugins. :-)

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