New module: Show updates to your gallery

dc2447

Joined: 2002-09-22
Posts: 130
Posted: Tue, 2005-10-11 22:50

Can you elaborate a little Paul?

 
paulbearne

Joined: 2005-08-01
Posts: 87
Posted: Wed, 2005-10-12 07:18
dc2447 wrote:
Can you elaborate a little Paul?

Have look at this CCS block

div.updates-thumb,div.updates-album,div.updates-date
{
display:none;
}
/*Style the link as we do need*/
div.updates-caption,div.updates-item,div.updates-link{
display:inline;
}
div.updates-item{float:left;}

I havn't checked to see if this code will work and I may well not be prefect

But you should get the idea ( you will still be down loading the thombnail image just not shown them!

Paul

 
dondada

Joined: 2005-09-29
Posts: 10
Posted: Wed, 2005-10-12 16:01

First of all, great module.

Had a quick question about the UpdateView.
In this view, how do I get the SideBar NOT to show up?
What class do I need to extend in the .inc file to make a call to remove the sidebar only in this view?

Thanks,
dondada

 
dc2447

Joined: 2002-09-22
Posts: 130
Posted: Wed, 2005-10-12 16:39

cheers Paul will have a look at that

 
sprockit

Joined: 2005-09-23
Posts: 8
Posted: Wed, 2005-10-12 20:21

Yes GREAT mod ...

It's working without problems, but it doesn't fit my needs exactly.

Just as the post above, suggest a way to take out the left sidebar. I will be creating a standalone page that will be outside of gallery in a public viewable section.

I would like to be able to just show the Album thumbnail with a random slection of "X" number of images from the album, and the aldum should show the number of images residing in the album.

Thanks . . . Scott

 
pkx

Joined: 2003-01-27
Posts: 54
Posted: Wed, 2005-10-12 20:35

Any plans to allow you to simply show the last X albums added to the gallery... rather than the last X pictures across all albums?

I think that'd be more useful for a lot of people.

 
dc2447

Joined: 2002-09-22
Posts: 130
Posted: Wed, 2005-10-12 20:56
pkx wrote:
Any plans to allow you to simply show the last X albums added to the gallery... rather than the last X pictures across all albums?

I think that'd be more useful for a lot of people.

actually this is exactly what I need, last X albums in simple html I can ionclude elsewhere.

 
pkx

Joined: 2003-01-27
Posts: 54
Posted: Wed, 2005-10-12 22:11
dc2447 wrote:
actually this is exactly what I need, last X albums in simple html I can ionclude elsewhere.

yep! $10 paypal to the author if he does this :).

It'd also be useful to choose the parent album, i.e.
"Show the newest X albums inside of "[drop-down list showing all albums, with root being at the top]"
and
"Go down X levels"

For example, if I had a new gallery with the following tree
ROOT >
ROOT > 2005
ROOT > 2005 > PARTY PICS
ROOT > 2005 > PARTY PICS > BOB'S PARTY

If I wanted to view the newest 1 album from ROOT going down 1 level, it'd only show 2005. If I wanted to go down 2 levels, it'd show 2005 & PARTY PICS.

Hope that makes sense :).

 
kylehase
kylehase's picture

Joined: 2005-09-15
Posts: 38
Posted: Mon, 2005-10-17 06:23

Great mod. Anyone know how I can add a link to g2_view=updates.ShowUpdates in the albumselect dhmtl? It would be nice to have a link to the updates just below the gallery root link.

 
kylehase
kylehase's picture

Joined: 2005-09-15
Posts: 38
Posted: Mon, 2005-10-17 06:35

Nevermind, I figured it out. Sorry for wasting space.

 
ophiuci

Joined: 2005-02-27
Posts: 13
Posted: Wed, 2005-10-19 20:21

I agree with the others a "last X albums" mode would be very usefull for me. When I update, it's with hundreds of photographs across many many albums. Best of both worlds would be getting it to display X photographs from the updated albums.

HorsePunchKid: thanks for your work on this module!

 
dc2447

Joined: 2002-09-22
Posts: 130
Posted: Fri, 2005-10-21 08:34

Maybe the more people that requst this mod then the better chance there is of it being done?

I have had a look but unlike G1, I can't really come to terms with the code

 
clever

Joined: 2005-09-28
Posts: 11
Posted: Mon, 2005-10-24 20:02

Is there any way to hack this bad boy to show the most recent comments? I'm sure it would make the entire G2 community happy until the feature is implemented in the bundle.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2005-10-28 04:55

Very cool mod! Yes, the show "last X albums" would be very nice to have and also remove or option to remove the sidebar.

 
Fjelsten

Joined: 2005-10-15
Posts: 66
Posted: Sun, 2005-10-30 09:06

Thanks for a nice module!

There does seem to be a minor problem with protected images: have some galleries that users need to log in to see but on the Updates page, updates in these galleries are also shown - not the images themselves but the data of the images (I have mine set to show Album and when the image was added). Is anybody else also getting this?

Suggestion: It would be nice if you could make multiple "Updates" pages, e.g. for different albums - like gallery.url/v/album1/updates/

 
Fjelsten

Joined: 2005-10-15
Posts: 66
Posted: Thu, 2005-11-03 15:19

HorsePunchKid?

 
wolfeman

Joined: 2004-09-02
Posts: 25
Posted: Tue, 2005-11-08 20:22

I just wanted to report a strange bug I'm experiencing that I have not seen reported here yet

Gallery 2.01
[browsing with Safari+ Firefox]

Matrix theme with very minor tmpl header/footer modification [inserted my own logo and use a php include for footer text]

module: update 2.4

when set to a number higher than 25 "update" gets the following error:

Fatal error: Call to a member function on a non-object in /www/html/gallery2/modules/updates/ShowUpdates.inc on line 101

not sure if this makes any difference but my thumb size is set to 150 as default and I noticed that at one point updates worked when set to 50 but the recent updates at that time had been much smaller thumbs, like 75 pixels

additionally, in either case the display page itself is jumbled

example: with return view of 25, I get three rows of 5 then a row with only one thumb in the last (5th) column,
then a row of 5 and lastly a row of 4 :

00000
00000
xxxx0
00000
0000x

I have uninstalled, re-installed, de-activated, reactivated, replaced and cleared caches and still get the problem.

is anyone else experienceing this and does anyone have any suggestions to fix/troubleshoot it?

thanks
[its a great mod by the way]

-mw

[edit: I forgot to mention when I queried the update module for a raw view I also got the same error listed above when i used a number higher than 25]

 
wolfeman

Joined: 2004-09-02
Posts: 25
Posted: Tue, 2005-11-08 22:11

hmm. seems I have answered my own question, in part at least.

I tried a few things and as it turns out what is causing the problems as far as I can tell is irregularly long image names. when I turn off the file name in the updates module control panel I have no issues in returning as many files as I want and there is no display issues either.

Long file names seem to gum up not only the display but for some reason the number of files you can retrieve.

at least thats what my tests seem to indicate

update it also seems that larger sized images throw off the updates module [it returns the error listed in my first post] as well as the image block module. Has anyone else encountered this problem?

 
tomcat76
tomcat76's picture

Joined: 2003-04-22
Posts: 133
Posted: Sat, 2005-11-12 23:03

Hey I like the idea of this, but how do I get a link on g2 for it to work?
I'm currently using pgtheme, sorry but don't know aything about programing.

If anyone could help please?

Regards Steve

 
gbo
gbo's picture

Joined: 2005-10-06
Posts: 24
Posted: Mon, 2005-11-14 22:51
wolfeman wrote:
is anyone else experienceing this and does anyone have any suggestions to fix/troubleshoot it?

I experienced the same behaviour and what I discovered is that it is space in file name that causes this problem, after replacing space by underscore in files names it was working again.

HTH
_________________
Gil
My Gallery http://mesphotos.fontismedia.com/

 
wolfeman

Joined: 2004-09-02
Posts: 25
Posted: Tue, 2005-11-15 01:09

great suggestion. I'm going to investigate that. Both times this happened to me someone uploaded a long file name and yes it did have spaces and another person uploaded a file that was over 2MB and I think that may have had a space in the filename as well. I had the cause and effect all wrong i guess :) thank you, I'll report back once I check it out.

cheers

 
Luke-Jr

Joined: 2005-11-18
Posts: 5
Posted: Fri, 2005-11-18 05:26

How about, for registered users, showing only updates on those which are new since they last logged in?

 
wakebdr

Joined: 2005-09-16
Posts: 8
Posted: Wed, 2005-12-07 01:33

Can someone post a link to the module code? The link in the beginning of the thread is broken.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Thu, 2005-12-08 04:49

The link works for me. Use Firefox to download files in these forums. IE for some reason corrupts zip files.

 
wakebdr

Joined: 2005-09-16
Posts: 8
Posted: Fri, 2005-12-09 21:12

I didn't even see the link in the bottom of the post. I was clicking on the 'here' in the beginning of the post.

I got it now.

thanks

 
kilativ

Joined: 2005-11-30
Posts: 29
Posted: Sun, 2005-12-11 03:38

Is there a way to have a link in the "item actions" in the left sidebar that links to the "show updates" page?

Thanks

 
hardtoneselector

Joined: 2005-03-08
Posts: 46
Posted: Sun, 2005-12-11 18:45

It does not work really, I can't access this page in an embedded enviroment, but I have seen the Albums are getting marked as new and as updates, wonderfull thats all I need, but it would be awesome, when this mark could be similar to an watermakr, show and extra icon accross the thumbnail saying new/updated,...

thanks
bernie

 
Revenant

Joined: 2005-12-11
Posts: 4
Posted: Sun, 2005-12-11 22:26

Ok, read through this thread, and cannot figure out how to have the updates module as the first thing seen when a person logs in. Any ideas?

And yes, I second the motion for Updates to use the standard album formatting, to keep things evenly spaced.

Thanks!

Revenant
http://rat-rant.com/gallery2

 
Revenant

Joined: 2005-12-11
Posts: 4
Posted: Mon, 2005-12-12 22:01

Anyone have any suggestions for the post above?

Thanks!

Revenant
http://rat-rant.com/gallery2

 
Revenant

Joined: 2005-12-11
Posts: 4
Posted: Thu, 2005-12-15 05:14

Well, this is frustrating.

Revenant
http://rat-rant.com/gallery2

 
phazeman

Joined: 2005-12-15
Posts: 3
Posted: Thu, 2005-12-15 14:58

Hi all

i'm a new here but not a newb with the gallery
i've been looking for this module for so long....
did anyone fix the module lately ? Coz i have a problem with it. it doesn't render the images good.
you can see what i'm talking about in here:
http://mishka.site.co.il/gallery2/main.php?g2_view=updates.ShowUpdates

thanks a lot in advance !

PS. the module version i've installed is 0.2.4. i couldn't find anything newer myself...

 
phazeman

Joined: 2005-12-15
Posts: 3
Posted: Thu, 2005-12-15 16:15

nevermind. got it working.
thanks for providing such needed module
http://mishka.site.co.il/gallery2

 
Revenant

Joined: 2005-12-11
Posts: 4
Posted: Fri, 2005-12-16 06:45

Can someone PLEASE tell me how I can get updates to show up as the first thing when one logs into the site?? I don't know how to use the URL Rewrite module, I just don't understand what it's supposed to do. Just a little guidance is all I need. PLEASE!!

Revenant
http://rat-rant.com/gallery2

 
nzwhost

Joined: 2005-10-29
Posts: 61
Posted: Tue, 2005-12-20 06:18

Anyone had success with this module in an embedded environment, specifically drupal?

I have a drupal embedded install - I can access the updates at at "gallery2/main.php?g2_view=updates.ShowUpdates" but not at the drupal embedded site "gallery/main.php?g2_view=updates.ShowUpdates".

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Tue, 2005-12-20 07:03
Revenant wrote:
Can someone PLEASE tell me how I can get updates to show up as the first thing when one logs into the site?? I don't know how to use the URL Rewrite module, I just don't understand what it's supposed to do. Just a little guidance is all I need. PLEASE!!

Revenant
http://rat-rant.com/gallery2

I don't believe this is possible yet on redirecting after Login. You can file a feature request. Search first as someone may have already made such a request.

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Tue, 2005-12-20 07:04
nzwhost wrote:
Anyone had success with this module in an embedded environment, specifically drupal?

I have a drupal embedded install - I can access the updates at at "gallery2/main.php?g2_view=updates.ShowUpdates" but not at the drupal embedded site "gallery/main.php?g2_view=updates.ShowUpdates".

Works fine for me using WordPress.

 
nzwhost

Joined: 2005-10-29
Posts: 61
Posted: Mon, 2005-12-26 02:38

Figured it out. In the Drupal embedded environment the page is accesed by the following URL format.

http://www.digital-images.co.nz/gallery/?g2_view=updates.ShowUpdates

------------------
[url]www.nzwhost.com[/url]
[url]www.digital-images.co.nz[/url]

 
id01

Joined: 2005-11-07
Posts: 62
Posted: Fri, 2005-12-30 02:27

I'm going to be trying to add the "show comment" right beside each photo. Adding backward and forward link to make it behaves like the old G1 as much as possible cause we all know, the G1 does thing that way for a few reason, plus people have gotten used to it.
My gallery have recently gotten way too big to use G1 anymore (4000+ picture across 200 album with 3000 page views an hour) even dedicated server doesn't cut it. So I needed to upgrade. Hopefully someone are willing to help me on how to do this.
I will probably try to hack this into displaying the latest comment but from the look of the database, Gallery handle photo and comment rather differently to make it a possible easy transition. However, the statistic build here http://gallery.menalto.com/node/41326#comment-158810 seem promising... perhaps I can glue the code together to make a combined module...

Anyone have any idea or pointer? I'm not really a programmer so if I can come up with anything, it will take a while!

 
id01

Joined: 2005-11-07
Posts: 62
Posted: Fri, 2005-12-30 03:45

Not sure if anyone but insert this

Quote:
{foreach from=$theme.params.photoBlocks item=block}
{g->block type=$block.0 params=$block.1}
{/foreach}

into line 50 in showupdates.tpl after the {/if} seem to show the comment for each picture. The lay out is all wrong, but not much I can do about it at the moment. Any one care to help? I am afraid this might be the limit of my hacking skill!

 
E-Razor
E-Razor's picture

Joined: 2005-01-07
Posts: 18
Posted: Mon, 2006-01-02 13:13

Well i've had the same problems with permissions too.
I think that should fix the problem:
Line 73 in ShowUpdates.inc:

  //var_dump($perms);                                
  foreach($ids as $i=>$value) {                      
    if(!array_key_exists($ids[$i], $perms) ||      
       !array_key_exists("core.view", $perms[$ids[$i]])) { 
      unset($ids[$i]); 
    } 
  }
 
Fjelsten

Joined: 2005-10-15
Posts: 66
Posted: Tue, 2006-01-03 16:58

Thank you E-Razor for your suggestion but as you can see here <http://gallery.fjelsten.dk/nyeste/> it does not really work.

Any other suggestions?

 
MBrK

Joined: 2005-11-08
Posts: 12
Posted: Fri, 2006-01-06 10:38

Well, just a question, isn't there yet any update to show just the X albums?

 
Kandi

Joined: 2005-12-29
Posts: 4
Posted: Sun, 2006-01-08 13:36

This is a really great mod!!! :) (and the comments thing works well too)
Just wondering is anyone knows the best way to get this into a nuke block rather than stand alone?

Kandi

 
E-Razor
E-Razor's picture

Joined: 2005-01-07
Posts: 18
Posted: Sat, 2006-01-14 17:32

is there any easy way to get it working with the lastest CVS?

CoreApi: 7.1
ModuleApi: 3.0
--
i started to upgrade this way:
'GalleryStatus :: success()' => 'GalleryStatus::success()'
execute convert.pl (http://www.menalto.com/.outgoing/gallery/convert.pl)
execute convertRequireOnce.pl (http://dev.nei.ch/convertRequireOnce.txt)
change 'version' to 'version-cvs'
'$this->setRequiredCoreApi(array (6, 8));' => '$this->setRequiredCoreApi(array (7, 0));'
'$this->setRequiredModuleApi(array (2, 0));' => '$this->setRequiredModuleApi(array (3, 0));'

All seems to be ok, i've the right admin-view with all options but /updates/ gives me a blank page.

--

i think i got it, file attached :-)

 
id01

Joined: 2005-11-07
Posts: 62
Posted: Sat, 2006-01-14 22:39

I'm wondering if anyone can help me figure out how to display all type of material, not just image. Perhaps document files or movie as well.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2006-01-15 21:57

Revenant, you'll need to modify the module to add an event handler for Gallery::Login events that returns the appropriate redirect. See modules/useralbum/module.inc for an example of this.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2006-01-15 22:07

id01, look at updates/ShowUpdates.inc and you'll find in the query where is adds:
WHERE [GalleryEntity::entityType] = \'GalleryPhotoItem\'

you can remove that line to get all items (albums and data items).
you can change that to GalleryAlbumItem to get albums.
the query needs a join on GalleryDataItem table to get just items (not albums).

 
id01

Joined: 2005-11-07
Posts: 62
Posted: Sun, 2006-01-15 22:27
mindless wrote:
id01, look at updates/ShowUpdates.inc and you'll find in the query where is adds:
WHERE [GalleryEntity::entityType] = \'GalleryPhotoItem\'

you can remove that line to get all items (albums and data items).
you can change that to GalleryAlbumItem to get albums.
the query needs a join on GalleryDataItem table to get just items (not albums).

Thank you very much for your help!

I have tried that to simply replace GalleryPhotoItem into GalleryDataItem. Which does not seem to work

When I remove the whole line, it also does not seem to work. Both of those editing will return a simple complete blank screen.

When I change GalleryPhotoItem to GalleryAlbumItem, nothing appear to have been changed. Oddly enough.

Any other suggestion perhaps?

Thank ou very much for your help though! I

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-01-16 04:22
Quote:
I have tried that to simply replace GalleryPhotoItem into GalleryDataItem. Which does not seem to work

nope, i specifically said above you need a join on GalleryDataItem in the query to do that.
i just tried the other 2 (GalleryAlbumItem or remove that line) and both worked as i expected. tested with the 0.2.4-cvs version.

 
id01

Joined: 2005-11-07
Posts: 62
Posted: Mon, 2006-01-16 06:46

Apparently my CVS is not as update as yours. Do you think I should update my Gallery installation and try again?

Quote:
Gallery version = 2.0.2+ core 1.0.10
PHP version = 5.0.4 apache
Webserver = Apache/1.3.34 (Unix) PHP/5.0.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysql 4.0.25-standard
Toolkits = ArchiveUpload, Thumbnail, NetPBM, Gd, ImageMagick, Swf
Operating system = Linux us01.weyrnet.co.uk 2.4.21-37.EL #1 Wed Sep 7 13:35:21 EDT 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5