Ideas for a new serendipity plugins!

Creating and modifying plugins.
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

dma147 wrote:
Operator wrote:[...]Thank you so much! It works great!
Only 1 thing, the thumbnails don't work. I checked the path and there are no thumbs in the /tmp directory. What did I do wrong?
Hmm... curious, because the thumbnail generation is exactly the same thing as the sized-image generation...
I'll look at this, when I've finished this second requested plugin, which will be finished today...

;)
Garvin and I, we are thinking about to implement these gallery2 features into the already existent galleryimage plugin for gallery1.
So the gallery2image plugin will be removed in the next time and then there will be an update for serendipity_event_galleryimage soon.

I've much other things to do today, so I'll have no time today to fix/finish this. But I'll continue with this soon. ;)
Alexander Mieland, dma147
http://blog.linux-stats.org
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

RobA, That's right, exactly this topic I've discussed with DMA as I saw how it is done in the current plugin.

The new revision of the plugin should fetch the files via a wrapper and spew them out on a seperate s9y external_plugin hook to bypass the problem that G2 images are not necessarily available via HTTP.

Of course this still bypasses the G2 security model as the s9y plugin would then allow you to loop through every file.

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/
Operator

Post by Operator »

dma147 wrote:
dma147 wrote:
Operator wrote:[...]Thank you so much! It works great!
Only 1 thing, the thumbnails don't work. I checked the path and there are no thumbs in the /tmp directory. What did I do wrong?
Hmm... curious, because the thumbnail generation is exactly the same thing as the sized-image generation...
I'll look at this, when I've finished this second requested plugin, which will be finished today...

;)
Garvin and I, we are thinking about to implement these gallery2 features into the already existent galleryimage plugin for gallery1.
So the gallery2image plugin will be removed in the next time and then there will be an update for serendipity_event_galleryimage soon.

I've much other things to do today, so I'll have no time today to fix/finish this. But I'll continue with this soon. ;)
Okidoki then, thanks guys :!:
And here is another idea if you need something to work on :wink: :
Wrapping Gallery2 in the s9y Media Manager so that you can select pictures via clicking on them. Would be kinda useful, but not that urgent. :D



Mark
Master_K

Gallery2 integration

Post by Master_K »

How can I get gallery2 integrated with serendipity for full album view? Currently I am using the static page plugin (which makes an iframe) because I have not been able how to figure this out any other way.

Can you plugin do this rather than simply calling specific images?

Thanks,
smithdave
Regular
Posts: 5
Joined: Mon Jun 13, 2005 9:25 pm
Location: Hamilton, Ohio

Re: Ideas for a new serendipity plugins!

Post by smithdave »

Not a new idea...but I'd be interested to see the External Authentication plugin undergo more development, and get rid of that 'experimental' stage.

Better error reporting related to the plugin, as well as options for stricter and more indepth user control would be nice.

Just throwing it out there.
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

top exits

Post by Josh »

The top exits plug in only ranks the top exits during the last seven days.

Seven days is such a short period. It would be great to have a plugin that lists top exits from the day I went online with my blog or at least from today on.
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

dma147 wrote:
dma147 wrote:
Operator wrote:[...]Thank you so much! It works great!
Only 1 thing, the thumbnails don't work. I checked the path and there are no thumbs in the /tmp directory. What did I do wrong?
Hmm... curious, because the thumbnail generation is exactly the same thing as the sized-image generation...
I'll look at this, when I've finished this second requested plugin, which will be finished today...

;)
Garvin and I, we are thinking about to implement these gallery2 features into the already existent galleryimage plugin for gallery1.
So the gallery2image plugin will be removed in the next time and then there will be an update for serendipity_event_galleryimage soon.

I've much other things to do today, so I'll have no time today to fix/finish this. But I'll continue with this soon. ;)
Okey guys...

I'm now coding since 7h00am on this plugin (it is now 12:40pm) and I have many problems with this gallery2 stuff... it is much different to gallery(1).

[Correction]
Hmm... the idea with the images-ID, which I've posted here first, wasn't that good as I thought... :(

I have to look for another solution...
[/Correction]
Alexander Mieland, dma147
http://blog.linux-stats.org
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

Okidoki...

I've just finished the work at the galleryimage plugin. It was a really hard work...

There is one point, which is not supported for gallery2-images... :(
All gallery2-images will be linked to the image itself in fullsize.
There is absolutly no possibility for now, until the gallery2 developers will add such a function, to link into an album or to a picture in an album.
The reason for this is, because we are using the image-names for the markup-tag and gallery2 only uses the IDs of the albums and images.

But if we'll use only the IDs of the pictures in the markup-tags, for example like this [Gimage]123[/Gimage], then it wouldn't be possible to get the fullsized image and it would be much more expensive for the performance, because the plugin has to walk through all directories in the cache-directory and to fopen/fread/fclose every file in these directories and subdirectories to find the sized-image and the thumbnail of the requested image.

So, sorry for this, but it can't be done by another way. :(

Okay... I have to ask Garvin, if I'm allowed to commit this plugin to cvs. But I'll also upload this plugin to my blog as soon as possible.

Here it is: http://blog.linux-stats.org/index.php?s ... thiscat=75
Alexander Mieland, dma147
http://blog.linux-stats.org
bpkri
Regular
Posts: 41
Joined: Tue Aug 09, 2005 2:31 pm

Post by bpkri »

hm?
Why can the ID not be used for the fullsized image? I mean, it is accessible via an ID, just like any other version of a photo (like the thumbnail), too.

The problem I see is, that getting the required information about the ID must happen "online". You could sure cache the ID-information about a picture, but you can't let a user enter the ID between [G2Image] tags, since the IDs can change (even if the photo/picture behind the ID does not change). And the information about an ID can't be handled statically, as an ID can change when modifying the gallery. (I don't know what modifications can cause the ID to change, but it happened to me lately, so it _can_ happen.)

So what we need is a connection between g2 and s9y via which we can get the ID infomation for pictures in certain sizes (I think thumbnail and full image would do).

Anyone up to this?
OR would the "proper" way to handle this be, to ask the g2 developers if they can't provide something like "permalinks" for Items...
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

bpkri wrote:hm?
Why can the ID not be used for the fullsized image? I mean, it is accessible via an ID, just like any other version of a photo (like the thumbnail), too.
[...]
Because every photo, if fullsized, or thumbnailed, has its own ID.
So the thumbnailed picture of one photo has another ID than the fullsized picture of the same photo.

So if you'll provide a single ID to the markup-tag, this can only be either for the fullsized-, the sized-, or the thumbnailed picture.
So, lets assume that you'll provide the ID for a thumbnailed picture, then the plugin has to go through the whole /alsbums/cache/derivates directories (and subdirectories), and to read *every* single *.inc file there, to get the correct ID for the other (fullsize and sized) pictures of this photo, because the thumbnailes are stored in *.dat files and the information on how to find the correct *.dat file is stored in a *.inc file which hold a serialized array of all the information of one picture.
Exactly the same, if you'll provide the ID of a fullsized-image.

And also the same in the case of a fullsized picture, if you'll provide the name of a photo. Then the plugin only has access to the ./albums/albums directory where the fullsized images are stored under their correct filenames. But again, to get then the ID of the appropriate thumbnail, the plugin has again to go through all these ./albums/cache/derivates directories, which we can not do, really not - Not for every single picture.

There is no other way, to get the appropriate thumbnail or either the ID of any picture.

The way it is done now, is really the best way. ;)
The plugin generates its own thumbnails. So no need to grab for the IDs and this all.

But without these IDs, the plugin can not link to a picture in the gallery2. It only can provide direct links to the self generated pictures.

That's quiet logically, not? *g*
Alexander Mieland, dma147
http://blog.linux-stats.org
waheed
Regular
Posts: 13
Joined: Thu Sep 22, 2005 8:57 pm

Problem installing Java script application:

Post by waheed »

dma147 wrote:
dma147 wrote:
waheed wrote:There is one plugin i have been looking for a long time which is the ability to show a Categorie of my blog on someone elses website using Javascript, alot of my members of my site, have their own websites and they would like to show updated news from my blog on their website.

is it possible to do this with Serendipity? using Javascript instead of rss
[...]
This will be next... ;)
Thanks for the idea...
This is now finished too!
It can be found here:
http://blog.linux-stats.org/index.php?s ... thiscat=76

... or within the next 24 hours through spartacus. ;)

Have fun!


Hello dma147 thanx for the Javascript, iv just seen the demo, really impressed,

im just having a little problem with installing it on my website, im not really familiar with Javascript.

-I downloaded the zip file and extracted the files
-uploaded the folder 'serendipity_event_backend' on my website under blog/plugins
- I then went to the admin panel 'Configure Plugins' and installed it.
-it was asking for the backend URL - i just typed 'backend' and pressed saved. (im not really sure what im supposed to put in here)


I then changed the Javscript code:

<script src="http://www.my-site.com/blog/plugins/bac ... "></script>

This is exactly what i have done so far: i pasted it on a html page nothing seems to the apperaring,

Can you please help

Thanx
waheed
Regular
Posts: 13
Joined: Thu Sep 22, 2005 8:57 pm

Re: Problem installing Java script application:

Post by waheed »

waheed wrote:
dma147 wrote:
dma147 wrote: This will be next... ;)
Thanks for the idea...
This is now finished too!
It can be found here:
http://blog.linux-stats.org/index.php?s ... thiscat=76

... or within the next 24 hours through spartacus. ;)

Have fun!


Hello dma147 thanx for the Javascript, iv just seen the demo, really impressed,

im just having a little problem with installing it on my website, im not really familiar with Javascript.

-I downloaded the zip file and extracted the files
-uploaded the folder 'serendipity_event_backend' on my website under blog/plugins
- I then went to the admin panel 'Configure Plugins' and installed it.
-it was asking for the backend URL - i just typed 'backend' and pressed saved. (im not really sure what im supposed to put in here)


I then changed the Javscript code:

<script src="http://www.my-site.com/blog/plugins/bac ... "></script>

This is exactly what i have done so far: i pasted it on a html page nothing seems to the apperaring,

Can you please help

Thanx

Its working finally, its a fantastic little script!! thankyou very very much for this Javascript.
where i went wrong was that i didnt type "index.php?/" e.g.
http://www.my-site.com/blog/index.php?/plugin/news?
Operator

Post by Operator »

dma147 wrote:
bpkri wrote:hm?
Why can the ID not be used for the fullsized image? I mean, it is accessible via an ID, just like any other version of a photo (like the thumbnail), too.
[...]
Because every photo, if fullsized, or thumbnailed, has its own ID.
So the thumbnailed picture of one photo has another ID than the fullsized picture of the same photo.

So if you'll provide a single ID to the markup-tag, this can only be either for the fullsized-, the sized-, or the thumbnailed picture.
So, lets assume that you'll provide the ID for a thumbnailed picture, then the plugin has to go through the whole /alsbums/cache/derivates directories (and subdirectories), and to read *every* single *.inc file there, to get the correct ID for the other (fullsize and sized) pictures of this photo, because the thumbnailes are stored in *.dat files and the information on how to find the correct *.dat file is stored in a *.inc file which hold a serialized array of all the information of one picture.
Exactly the same, if you'll provide the ID of a fullsized-image.

And also the same in the case of a fullsized picture, if you'll provide the name of a photo. Then the plugin only has access to the ./albums/albums directory where the fullsized images are stored under their correct filenames. But again, to get then the ID of the appropriate thumbnail, the plugin has again to go through all these ./albums/cache/derivates directories, which we can not do, really not - Not for every single picture.

There is no other way, to get the appropriate thumbnail or either the ID of any picture.

The way it is done now, is really the best way. ;)
The plugin generates its own thumbnails. So no need to grab for the IDs and this all.

But without these IDs, the plugin can not link to a picture in the gallery2. It only can provide direct links to the self generated pictures.

That's quiet logically, not? *g*
Wow, works great :) Thank you!
Concerning your problem, did you check how they realize this plugin: http://wpg2.ozgreg.com

I didn't test it yet since it's for wordpress, but it also has the tag-feature and you can access images via ID and name. Maybe it helps you if you want to improve your plugin :)


Mark
Operator

Post by Operator »

Sorry for double posting, but I cant edit my previous entry since I'm a guest. (I should really register....)

Just wanted to report a little bug: The "style=fancy" parameter messes up the image. It displays it in big instrad of a thumbnail but totally blurry.

Maybe you could take a look at it, thx!



Mark
dma147
Regular
Posts: 132
Joined: Thu Sep 08, 2005 1:50 pm
Location: Berlin
Contact:

Post by dma147 »

@Operator: I've worked the whole day now, to get this linking to work and finally I've got it! ;)

It was not easy, because it has to use some API-function from gallery2 directly... but it works now.
Now you also can link gallery2-images to an album or a image-page and the fancy-style should also work now.
Here is a little testing page:
http://blog.linux-stats.org/gallery2.html

You'll find this new version in my downloads on http://blog.linux-stats.org

have fun.
Alexander Mieland, dma147
http://blog.linux-stats.org
Post Reply