New module: Show updates to your gallery
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
i didn't compare the code E-Razor posted to the original 0.2.4 version.. i assume they have the same queries so it shouldn't matter which version you use. |
|
id01
Joined: 2005-11-07
Posts: 62 |
![]() |
I believe it is the same as well, but for the life of it I can not get it to work. I do not believe that the embedded enviroment will make any different neither. This is what I have at line 51 for showupdates.inc. Does not seem to work, keep returning blank screen. It could be a prblem with my database and having lots of images already. Quote:
$query=' LIMIT ' . $param['itemCount']; |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
do you have some public and some private items? this module appears to pick N items, then filter permissions. so if it happens to pick N items w/o permission then you see nothing. |
|
id01
Joined: 2005-11-07
Posts: 62 |
![]() |
I am looking at the update with site admin account, so it should display everything. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Updated module attached.. cleaned up API usage, filter permissions in query instead of post-query, gets all DataItems instead of just photos. Edit: Version 0.2.6 added updates.UpdatesLink block |
|
nzwhost
Joined: 2005-10-29
Posts: 61 |
![]() |
Formatting appears to be broken using IE. However, looks good with Mozilla Firefox. Any ideas? You can see what I mean here - http://www.digital-images.co.nz/gallery/?g2_view=updates.ShowUpdates Noticed that the same issue at http://severinghaus.org/gallery/updates/. I am using the following custom css: /*set the total height so the float left work on all line*/ ------------------ |
|
nzwhost
Joined: 2005-10-29
Posts: 61 |
![]() |
Fixed! Added: to: In IE thumbnails of different dimensions actually increase the height of this div and mess up the formatting on subsequent lines. It becomes obvious if you have a thumbnail which is portrait in a row of landscape thumbnails. ------------------ |
|
swordfish
![]()
Joined: 2004-10-01
Posts: 388 |
![]() |
mindless wrote:
Updated module attached.. cleaned up API usage, filter permissions in query instead of post-query, gets all DataItems instead of just photos. I take it this updated module requires latest G2 from CVS since I don't have the required |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
yes, my starting point was the code E-Razor posted which was updated for core api 7.1, module api 3.0 |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Updated my post above with version 0.2.6: |
|
Fjelsten
Joined: 2005-10-15
Posts: 66 |
![]() |
I updated to 2.0.2 and when I try to run it now, I get: Quote:
Error Detail - Can anybody help? Thanks |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
please post your question in the new 3rd party modules forum, with [updates] in the topic title. be sure to include what version of the module you are using, and what version of gallery you updated from. |
|
Fjelsten
Joined: 2005-10-15
Posts: 66 |
![]() |
OK, thanks. Sorry. |
|
Fjelsten
Joined: 2005-10-15
Posts: 66 |
![]() |
Mindless, could you make a 2.0.2 version for thouse of use with the release version? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Fjelsten, search back in this topic for the older version that works with 2.0.x. I don't plan to backport my additions to work with 2.0.x. |
|
Fjelsten
Joined: 2005-10-15
Posts: 66 |
![]() |
I know the older version works - it just appeared like you have fixed the bugs I had reported with that version (the pre-/post-query stuff). Thanks anyway. I look forward to the release of 2.1 |
|
GravityArc
![]()
Joined: 2003-02-27
Posts: 54 |
![]() |
Is there any way to have the updates show as an album so I can have the first album in my gallery be a set of Updated items? Thanks... |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
activate the linkitem module, create a linkitem with the URL for the updates view. |
|
GravityArc
![]()
Joined: 2003-02-27
Posts: 54 |
![]() |
Cool...guess I need to update to 2.0.2 before I can use Link Items. I'll do that this weekend hopefully. Thanks! |
|
Eka_Mei
Joined: 2006-01-03
Posts: 132 |
![]() |
Are there any plan on improving the update module? Like having individial album update rather then the entire gallery? Or having the ability to scrolls back and see the second page instead of only the last 50? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
certainly a lot more could be done with this module, but i don't think anyone is working on it. |
|
gaida
Joined: 2004-12-25
Posts: 5 |
![]() |
Hi Everyone, Nick |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
you have to put {g->block type="updates.UpdatesLink"} somewhere in your theme's tpl. i didn't add a blocks.inc file to make it appear in theme settings (but you could do that too..) |
|
gaida
Joined: 2004-12-25
Posts: 5 |
![]() |
mindless, thanks for the reply.I sort of made it work,but it looks horible and out of place.I wish you add it as a block as i don't know how to make a block.inc file. |
|
gaida
Joined: 2004-12-25
Posts: 5 |
![]() |
Can anyone help me? I just want the Updates link to appear the same as the other items in the sidebar. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
you can add it as an item link by adding getItemLinks to module.inc.. look at other modules to see how this is done. of course, the link shows updates across the whole gallery, not updates in the current album as placing the link among the other item links might imply. |
|
RwD
![]()
Joined: 2005-01-09
Posts: 383 |
![]() |
Is it possible to implement this block into a block so it could be added to any page?? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
look 5 posts up.. |
|
RwD
![]()
Joined: 2005-01-09
Posts: 383 |
![]() |
oops, missed that. I'll take a look at it, doesn't sound too difficult to do... [edit] {g->block type="imageblock.ImageBlock" blocks="recentImage|recentImage|recentImage"} This eliminates my needs for the module in this topic, and perhaps for other people as well... |
|
TravisBickle
![]()
Joined: 2006-03-28
Posts: 1 |
![]() |
I've searched the forums and I've tried editing modules.inc and theme.tpl to allow "Updates" to display in the sidebar, but to no avail. Thanks in advance |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
TravisBickle, try experimenting.. put those in theme.tpl or album.tpl/photo.tpl and see how it works. |
|
Eka_Mei
Joined: 2006-01-03
Posts: 132 |
![]() |
Still trying to make it possible to turn back in page like in the recent comment module. Any chance you think it might be possible? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
sure, someone has to write it.. it would be very similar to recent comments, just a different query. |
|
Eka_Mei
Joined: 2006-01-03
Posts: 132 |
![]() |
I guess I will have to study both modules very well to handle this. Look much harder then I thought. |
|
tlmothy
Joined: 2005-11-10
Posts: 41 |
![]() |
Hey mindless any chance of adding code to the module.inc so it displays an item link similar to "show a google map", or "view latest comments"? I think instead of editing the theme to add a link, why not add it to the side menu from the module. It may be helpfull for people with more than one theme being used. Thanks |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
it doesn't do that now because it currently is "updates for gallery" not "updates for this album" (though with a more complex query it could be). to add an item link, add "getItemLinks" in the setCallbacks call in the constructor, add the getItemLinks function itself, then bump the module version so G2 will reregister the callbacks and start using your getItemLinks function. |
|
tlmothy
Joined: 2005-11-10
Posts: 41 |
![]() |
Well I think that is the way to go. I bet someone here could give us a hand and code it. I believe the old G1 latest updates hack has features this module lacks. Such as viewing by multiple pages, as someone had mentioned earlier. It seems silly that these features are not included with G2. I think that this module should also have features such as: Latest Albums (all of G2) I think you guys would agree? Infact lets take it even further, wouldn't it be cool to have a rectangular block above each album page displaying "latest albums here, latest pictures here" (in this album)via a few thumbnails. Would be great for albums with many sub albums / pictures. And if no sub albums are found in that page, why not disable the rectangular block not to display at all, only show latest pictures. What do you think mindless? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
not sure why it is silly, someone has to write these things. guess i'd be more interested in discussing feature ideas if there are developers other than me inclined to work in it. |
|
Eka_Mei
Joined: 2006-01-03
Posts: 132 |
![]() |
I will work on it if no one else is willing. Most likely just copying a lot of code from the comment module and hope it will work with the update module. Since my experience with the Gallery system is very limited. The only module I ever been able to make is the comment block and the side bar move to top, both with some help from other even. |
|
Eka_Mei
Joined: 2006-01-03
Posts: 132 |
![]() |
done some research. If I just type in "_" into the search field and press enter. It will kinda give you a paged view of every item in the gallery ranked by the time they last submitted/updated. However it is not flexible enough, you can't see more then 20 items pre pages, and it doesn't search just in one album. Nor is there any easier way to get in without requiring the user to manually type in "_" and press enter. |
|
tlmothy
Joined: 2005-11-10
Posts: 41 |
![]() |
mindless maybe silly wasn't the word, it seems like a feature such as this should of been included in G2. If I could program php I would be glad to help but unfortunately I cannot. So I rely on people who are capable. I don't see a problem with talking about new ideas even if there is a lack of developers willing to help. At least maybe these ideas will inspire people to create them. Thank you Eka Mei for stepping up to the plate, with that attitude I think we could accomplish a lot. I am sure if this thread had enough interest people would be glad to help out. |
|
tlmothy
Joined: 2005-11-10
Posts: 41 |
![]() |
Ideas for Update modification. I was thinking about this a bit more today and here are a few ideas to expand on. A great way to integrate updates to gallery would be to add static links to the sidebar displaying a "latest picture updates (in this album)", and "latest albums(in this album)". Also: How about a block placed above selected albums displaying X number of the latest entries via a small thumbnail. This block could be enabled from settings to a desired album. In theory it should be disabled by default and the user would enable it on there selected albums. Showing thumbnails of latest updates from a user enabled album and sub album. |
|
Eka_Mei
Joined: 2006-01-03
Posts: 132 |
![]() |
Don't count on me. I hardly figure know the head and tail of c++, php so far, doesn't like me. I'll see what I can do since nobody is doing it, but definitely no promise. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
You two have summed it up quite nicely.. but it's not just relying on someone else capable, you have to hope for or find someone capable who is also interested in the same feature as you.. and that may just get you a hack or bit of code that you can use. If you want a feature in the product you need someone also capable and dedicated enough to put together quality code and unit tests to make it into the G2 codebase.. we'd really love for more such people to help out, send 'em our way! |
|
netscan
Joined: 2005-07-16
Posts: 39 |
![]() |
In gallery 2.1, when viewing as a guest, all of the url's that are generated have a ? tacked to the end, ie: .../pictures/picture.jpg.html? If logged in, the url's are correct, ie: .../picture/picture.jpg.html Any thoughts as to what might be causing this? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
the code that prevents guest users from creating a persistent session until actually needed might do this.. do you see this everywhere or just in updates module? |
|
Fjelsten
Joined: 2005-10-15
Posts: 66 |
![]() |
Mindless, I know next to nothing about Gallery coding or PHP but I know a little SQL. I would like to make the query in the Updates module just find items where I am the owner of the item. SELECT [GalleryEntity::id], [GalleryEntity::creationTimestamp] FROM [GalleryEntity], [GalleryDataItem], [GalleryAccessSubscriberMap], [GalleryUser] WHERE [GalleryEntity::id] = [GalleryDataItem::id] AND [GalleryUser::id] = `6` (which is me) - "" [] '' do not help AND [GalleryEntity::id] = [GalleryAccessSubscriberMap::itemId] AND [GalleryAccessSubscriberMap::accessListId] IN (' . $aclMarkers . ') ORDER BY [GalleryEntity::creationTimestamp] DESC - but that gave me an error: Quote:
Error (ERROR_STORAGE_FAILURE) Any hints? |
|
noufejt
Joined: 2006-03-23
Posts: 3 |
![]() |
Hi, can anybody help me? I need have same "recently added photos" on the main page - it is possible? Many THX |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
$query = ' SELECT [GalleryEntity::id], [GalleryEntity::creationTimestamp] FROM [GalleryEntity], [GalleryItem], [GalleryDataItem], [GalleryAccessSubscriberMap] WHERE [GalleryEntity::id] = [GalleryItem::id] AND [GalleryItem::ownerId] = 6 AND [GalleryEntity::id] = [GalleryDataItem::id] AND [GalleryEntity::id] = [GalleryAccessSubscriberMap::itemId] AND [GalleryAccessSubscriberMap::accessListId] IN (' . $aclMarkers . ') ORDER BY [GalleryEntity::creationTimestamp] DESC '; |
|
Fjelsten
Joined: 2005-10-15
Posts: 66 |
![]() |
Wicked, Mindless! Thanks a bunch. I really hope that some G2 knowledgable person falls in love with this module and expands it. Unfortunately my technical abilities stop at HTML/CSS. |
|