I agree, I runs 3 galleries myself and statistic show that, on all the pages, the "Latest update" page is always the first thing everyone check. It is arguably one of the most important part of the gallery. Of course, it depends on the nature of your site. But I do hope this module will get some more attention since all attempt to improve the code by me have failed so far. I just don't know enough about php to start working on this yet. ^^;
netscan
Joined: 2005-07-16
Posts: 39
Posted: Sun, 2006-05-07 14:25
mindless wrote:
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?
It only occurs in the updates module, the rest of the urls generate correctly.
renmarc
Joined: 2006-04-18
Posts: 3
Posted: Sun, 2006-05-14 11:58
Hi,
i have modified the query in ShowUpdates.inc to show toprated images.
But, if i wish to add the "number of votes" under each thumbnails...how can i do it?
Is it possible?
Thanks.
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2006-05-14 15:12
you'll need to load that data in ShowUpdates.inc and put it in the $template so the tpl can show it.
(or would it work to just using the rating block?)
Fjelsten
Joined: 2005-10-15
Posts: 66
Posted: Mon, 2006-05-15 08:05
Mindless, I wonder if you could help me: now the Updates page shows items also from hidden albums. To me this makes little sense as albums are hidden for a reason. I guess the problem is that they may be viewable by guests and a such are found by the query. Could you help me expand the query so that hidden albums are excluded?
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-05-15 14:47
unless you modified the query, it applies permissions. you'll see hidden items if you're logged in as admin or any user that can see them, or if you are a guest and have visited the hidden album. the module does not support guest preview.. to test what guests will see you must logout.
poil11
Joined: 2005-10-24
Posts: 5
Posted: Tue, 2006-05-16 02:39
is anyone using this with the latest version of gallery? i changed the version check but now i am getting "Undefined class name 'gallerystatus'". Any help would be greatly appreciated.
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Tue, 2006-05-16 05:01
Ok, got a new version of the update module working.
Only tested with Gallery 2.11. So use at your own risk. As usual, back up everything, including the computer you download this file from, any server, router, or any computer equipment inbetween your computer and the server. Make sure every single possible safety producure are done ahead of time before you even think about download this file and put it in any form of use.
After that. Just deactive your old update module, delete the old module and upload the new one. Then go to module, click update, and activate. Then it should work just like the old one.
The main different is that instead of showing just the last defined number of image in a single page, it will now shows how many page there are, and let you go forward and backward in pages. The query also handle subalbum update with a link in each album. At the moment, that link is hard coded. if someone feel like fixing it so it can be turned off in the site album area, please send aid! O.o
Oh, and, thanks for the orignal owner, I borrowed most of the code and hope you are ok with this. I have a feeling some new feature in 2.2 will make this obsculate, but who knows. Hope this is still helpful.
Developer, please let us know what else we need to do to make this module commitable to the SVN (I don't use SVN)
Fjelsten
Joined: 2005-10-15
Posts: 66
Posted: Tue, 2006-05-16 06:51
Sounds good, Eka_Mei - I will see if I dare using it with Gallery 2.1. Is there anywhere I can see it in action? I am not sure what you mean by the subalbum feature.
poil11
Joined: 2005-10-24
Posts: 5
Posted: Tue, 2006-05-16 08:20
wow, perfect! Works really well. The images arn't lined up, but its exactly what i was looking for. You can see a demo at http://westondeboer.com/gallery/updates/ (I enabled url rewrite). Thanks for this update, good work!
Fjelsten
Joined: 2005-10-15
Posts: 66
Posted: Tue, 2006-05-16 08:51
Poil11, which version of Gallery are you running?
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Tue, 2006-05-16 12:34
As far as I know, version 2.1 and 2.11 have no different in core. 2.11 is more like a repackage.
If it is my server I would say just try it out.
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Tue, 2006-05-16 12:36
poil11 wrote:
wow, perfect! Works really well. The images arn't lined up, but its exactly what i was looking for. You can see a demo at http://westondeboer.com/gallery/updates/ (I enabled url rewrite). Thanks for this update, good work!
It doesn't line up might have something to do with the template being modified slightly for my custom theme. Since I don't use the standard matrix theme at all, If someone can fix it please reply.
Twister69
Joined: 2006-05-16
Posts: 2
Posted: Tue, 2006-05-16 21:20
Sorry if this has been covered somewhere else but I could not find it. I uploaded the module (0.2.4) and then went to activate it but I came across this message:
Incompatible module!
Core API Required: 6.8 (available: 7.3)
Module API Required: 2.0 (available: 3.0)
I'm a newb at this... where can I get these?
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-05-17 00:03
Twister69, get a newer version of updates module.
Twister69
Joined: 2006-05-16
Posts: 2
Posted: Wed, 2006-05-17 03:05
Doh! Thought what I had was the latest. Grabbed it, installed it... works great. Thanks.
silverbullit
Joined: 2006-03-25
Posts: 15
Posted: Wed, 2006-05-17 07:16
Eka_mei. I uploaded it and it seems to work. I am also having the problem of the images not lining up. Also, i get extra data like Color Space, Date/Time, Orientation, Resolution Unit Inch Compression and others. I do not want this information displayed and it would be nice if they lined up how might i be able to fix this problem. Change Themes or change code. Thanks in advance for this great mod.
paulbearne
Joined: 2005-08-01
Posts: 87
Posted: Wed, 2006-05-17 07:36
Hi
I did a hack back on page 2 of this thread in which I hid some bits text and added float left to the css I haven't install this version so can't update the code in this tread but the same principle may still work.
Paul Bearne
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Wed, 2006-05-17 12:52
silverbullit wrote:
Eka_mei. I uploaded it and it seems to work. I am also having the problem of the images not lining up. Also, i get extra data like Color Space, Date/Time, Orientation, Resolution Unit Inch Compression and others. I do not want this information displayed and it would be nice if they lined up how might i be able to fix this problem. Change Themes or change code. Thanks in advance for this great mod.
My update template is a customized solution it will also display comments and extra info. For those who find this mods can't line up, or showing extra info, just do this following:
Removes these lines in updates/template/local/ShowUpdates.tpl around line 65-67
to make the items line up just go into site admin / updates and add css to set a fixed size for each cell..
.updates-item { width: 200px; height: 250px; }
silverbullit
Joined: 2006-03-25
Posts: 15
Posted: Thu, 2006-05-18 01:06
Quote:
My update template is a customized solution it will also display comments and extra info. For those who find this mods can't line up, or showing extra info, just do this following:
Removes these lines in updates/template/local/ShowUpdates.tpl around line 65-67
Thanks for the fix. It worked perfectly. However is there any way to show just the ratings underneath and no comments.
Alexandra70
Joined: 2004-12-08
Posts: 143
Posted: Thu, 2006-05-18 01:07
mindless, I just added the new Module by Eka_Mei on my 2.1 personal Gallery (still waiting to hear from HorsePunchKid regarding my other 2.0 Gallery)... anyway.. this works like a charm and the css you wrote above did the trick to line up the rows!!!
But.. since I know that you're the languages wizard (since it's always your name inside .po files... Please tell me what to do here..
In the Updates Module, I added a po folder with an edited pt_BR.po in it, and also a locale/pt_BR/LC_MESSAGES/modules_updates.mo that I created using PoEdit. I also need to create one for Nederlands!!
So.. I thought I was doing it all right, but it did not work. Am I missing something? Any other files I need to edit, to make them read other languages?
Thanks!!
Alex
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-05-18 04:05
perhaps start a new topic in the translations forum. following the directions in Documentation / Translations should work.. (in this case you need to create the po dir and copy a GNUmakefile from any other module)
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Thu, 2006-05-18 04:27
Yes, but you will have to do a few things. I don't know how else to do this.
First, you will have to put those line you just removed back on there. Secondly, you will have to do something to your temples in all the blocks that are showing. For example, if you don't want the comment to show up, you will need to edit the ViewComments.tpl and add these lines
{if $smarty.get.g2_view != "updates.ShowUpdates"}
to the very top, and
{/if}
to the very bottom.
Alexandra70
Joined: 2004-12-08
Posts: 143
Posted: Fri, 2006-05-19 18:17
Hello mindless,
I am posting this here because I found a string missing on the Updates Module "module.inc" file. So this post does belong here.. Read on..
I followed all directions on the Documentation / Translations page and could not get my pt_BR to work... Until I noticed that it DOES work, but ONLY in the Admin Sidebar... It translated the word "View Updates" over there...
But on the main page or albums/pics sidebar... It was not translating "View Latest Updates"!!!
So I looked into the module.inc and there's string or function, or whatever you call that (I don't understand any of this) MISSING!!
It should be similar to this one:
translate('View Updates'),
But instead, needs to be:
translate('View Latest Updates'),
That's why it is translating "View Updates", but NOT "View Latest Updates", which is the one that appears on the sidebar for visitors to see.
I do not know how to create the string for "View Latest Updates". I tried making a copy of the ones for "View Updates", but I guess I did not put it in the right place and then my Gallery wouln't load.
Bottom line.. could someone EDIT the module.inc file and add the missing translate string for "View Latest Updates", please??
Thanks!!
Alexandra
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2006-05-20 00:06
Yup, I see the missing translate() call.. I've added that.
Other changes:
- I made getItemLinks obey the site admin option for update links (if you unchecked it they still appeared).
- When the updates links are turned on, I made them only appear for albums (link from a photo just shows the photo..).
- I added a new site admin option for the blocks to use, rather than using the photo blocks from the default theme.
Updates 0.3.7 attached.
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Sat, 2006-05-20 00:19
Yay, thanks! And sorry for a sloppy job that need you to look after ^^;
Alexandra70
Joined: 2004-12-08
Posts: 143
Posted: Sat, 2006-05-20 00:52
Wooo hooo!!! I don't understand any of this stuff.. (I'm simply a housewife), but I am getting the hang of all this coding and am so proud that I found something missing!!!
Thanks for the update mindless!! (PS.. check the Translations Tracker. I spent hours today, creating pt_BR for the RSS Module and assigned it to you even though I was not sure if I HAD to assign it to someone)
Alex
joe7rocks
Joined: 2004-10-07
Posts: 560
Posted: Mon, 2006-05-29 19:26
Eka_Mei: good work. Though the module needs some work to be able to effectively work (in bigger installs)
I'd be happy to see it workin with my ~200K pics ;)
(now the result is a simple timeout after 30secs;)
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Tue, 2006-05-30 04:55
My gallery only have 10k pics. And I don't know what is wrong nor do I have a gallery this big to help me look for bottle neck.
How long does the old update module take you? Cause for mine, both take almost exactly the same time when displaying the same amount of pictures.
Fjelsten
Joined: 2005-10-15
Posts: 66
Posted: Tue, 2006-05-30 09:14
Midless, could you please help me exclude hidden items as well? The current query I use looks like this:
Quote:
$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
';
I only want to see images from one user. As far as I can tell, the hidden attribute is in the g2_Entity table on the g_onLoadHandlers column where the status is [Hidden].
Can I just ad:
Quote:
AND
[GalleryEntity::onLoadHandlers] != [Hidden]
... to make it work?
joe7rocks
Joined: 2004-10-07
Posts: 560
Posted: Tue, 2006-05-30 09:24
okay, nm, it not (just) the amount of pics, but amount of users/permissions used in the queries..
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Tue, 2006-05-30 12:08
In that case, there are not a lot I can do. I used the standard way to handle the pages, letting Gallery2 itself figure out how many pages there are. That might be one reason why it is slowing down.
The amout of user/permissions definitely will effect the speed as well.
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-05-30 18:00
Fjelsten, you don't need to omit hidden items specifically. The permissions portion of the query will handle that.. so you'll see hidden items only if you have visited them, or already have permission to see them because you're an admin, etc.
Fjelsten
Joined: 2005-10-15
Posts: 66
Posted: Tue, 2006-05-30 18:09
Really? Wow - then G2 is really advanced. I just didn't think that since I had logged off and still saw the hidden items.
Peter
Fjelsten
Joined: 2005-10-15
Posts: 66
Posted: Tue, 2006-05-30 18:36
Sorry to bug you again, Mindless, but in .37, the hack you helped me with above that would show only my images, does not work anymore (from the first query in ShowUpdates.inc):
Quote:
AND
[GalleryItem::ownerId] = 6
Do you have an update (pun intended!) for me?
Thanks.
Peter
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-05-30 22:11
it should still work.. the variable to apply the change to is now called $queryBase.. add [GalleryItem] in the FROM list, add [GalleryEntity::id] = [GalleryItem::id] AND [GalleryItem::ownerId] = 6 AND in the WHERE section.
Fjelsten
Joined: 2005-10-15
Posts: 66
Posted: Wed, 2006-05-31 08:47
It does! Thanks a bunch.
Peter
geneb19
Joined: 2006-02-22
Posts: 4
Posted: Tue, 2006-06-06 02:50
dzm wrote:
Before spending a huge amount of time trying to debug the error joefish should just open the module's Admin screen and save the default value. After this (assuming it's the same problem) everything should magically work.
alright, i'm really dense tonight...how do i open the module's Admin screen? originally thinking this refered to the Site Admin link in Gallery, i went there but could only find where i installed the module. no configuration available.
thanks for any help!
Gene
Eka_Mei
Joined: 2006-01-03
Posts: 132
Posted: Tue, 2006-06-06 14:04
Once you installed and activated the module, you can configure it by clicking on "updates" on the side bar.
wayneb
Joined: 2006-06-11
Posts: 6
Posted: Sun, 2006-06-11 20:08
This is a great module - as a user I want to see the latest photos, I'm sure many are like me. Thank you.
I'm a gallery newbie. This might be a URLrewrite question more than the updates module, if so I apologize, but I would like to make the updates page the default page the user goes to, rather than the default main.php. So if they go to domain.com/gallery2/ it redirects to the updates page (currently I have URLrewrite pointing to /updates/). Of course I'd like the breadcrumb to still return to the top level gallery at main.php once they are inside albums.
Does this involve URLrewrite or editing main.php somehow (or config.php?)? Thanks!
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2006-06-11 20:12
if you just want to change /gallery2/ then edit index.php to redirect wherever you want.
alternatively, you can edit modules/core/classes/GalleryConstants.class and find the default view (where G2 goes for main.php with no g2_view parameter)
Alexandra70
Joined: 2004-12-08
Posts: 143
Posted: Wed, 2006-06-14 17:25
HorsePunchKid or anybody....
Do you think it's safe for me to try adding the Updates Module to my Charity Gallery which is 2.0-rc-2 core 0.9.36??
If I install it and then my Gallery stops working, how can I manually uninstall it via FTP??
Thanks!!
Alex
Hinokagutsuchi
Joined: 2006-06-13
Posts: 3
Posted: Wed, 2006-06-14 22:38
I want to change the look of the updates page itself, how can I do that? I know that I can edit the main theme to change the layout of the entire gallery, but I don't want to do that.
I'm guessing the way to do it would be through the custom CSS block. I'm not good with CSS, though. Any suggestions?
(Basically, all I want is to display three thumbnails of the most recently added items and nothing else. It's for a window on my main page.)
dancingbear0420
Joined: 2006-06-15
Posts: 3
Posted: Thu, 2006-06-15 00:52
i am newb to gallery & do not know php, so i apologize in advance if this is a dumb question... i'm trying to get rid of the side bar on the updates page. i have disabled the side bar on the other parts of my gallery2, but can't figure out how to remove it on the updates page. i poked around in rawupdates.tpl & showupdates.tpl, but am not sure what to change (or if that's even the right place to look).
can anyone be so kind as to please point me in the right direction?
thanks in advance,
~Nancye
dancingbear0420
Joined: 2006-06-15
Posts: 3
Posted: Thu, 2006-06-15 01:21
i figured it out myself, and figured i should post the solution for others who may experience this... duh, in site admin, my theme had a block selected to show in the sidebar. i thought i'd checked this, but guess i missed it. D'Oh!
swordfish
Joined: 2004-10-01
Posts: 388
Posted: Thu, 2006-06-15 02:55
Hinokagutsuchi wrote:
I want to change the look of the updates page itself, how can I do that? I know that I can edit the main theme to change the layout of the entire gallery, but I don't want to do that.
I'm guessing the way to do it would be through the custom CSS block. I'm not good with CSS, though. Any suggestions?
(Basically, all I want is to display three thumbnails of the most recently added items and nothing else. It's for a window on my main page.)
May not be the best method but I hacked the ShowUpdates.inc to display latest 25 images only.
I changed line 184 from: $totalCount = (int)$result[0];
to: $totalCount = 25;
Hinokagutsuchi
Joined: 2006-06-13
Posts: 3
Posted: Thu, 2006-06-15 03:38
There's an option in the module itself to only show the latest three images. However, that's all I want to show. No sidebars or anything else. Just three thumbnails, image info (the summary that you type in when you upload), and have the thumbnails link to the page.
swordfish
Joined: 2004-10-01
Posts: 388
Posted: Thu, 2006-06-15 04:19
That option in the module only applies to how many images to show on each page. I only wanted a max of 25 no matter how many new images I uploaded.
Posts: 132
I agree, I runs 3 galleries myself and statistic show that, on all the pages, the "Latest update" page is always the first thing everyone check. It is arguably one of the most important part of the gallery. Of course, it depends on the nature of your site. But I do hope this module will get some more attention since all attempt to improve the code by me have failed so far. I just don't know enough about php to start working on this yet. ^^;
Posts: 39
It only occurs in the updates module, the rest of the urls generate correctly.
Posts: 3
Hi,
i have modified the query in ShowUpdates.inc to show toprated images.
But, if i wish to add the "number of votes" under each thumbnails...how can i do it?
Is it possible?
Thanks.
Posts: 8601
you'll need to load that data in ShowUpdates.inc and put it in the $template so the tpl can show it.
(or would it work to just using the rating block?)
Posts: 66
Mindless, I wonder if you could help me: now the Updates page shows items also from hidden albums. To me this makes little sense as albums are hidden for a reason. I guess the problem is that they may be viewable by guests and a such are found by the query. Could you help me expand the query so that hidden albums are excluded?
Posts: 8601
unless you modified the query, it applies permissions. you'll see hidden items if you're logged in as admin or any user that can see them, or if you are a guest and have visited the hidden album. the module does not support guest preview.. to test what guests will see you must logout.
Posts: 5
is anyone using this with the latest version of gallery? i changed the version check but now i am getting "Undefined class name 'gallerystatus'". Any help would be greatly appreciated.
Posts: 132
Ok, got a new version of the update module working.
Only tested with Gallery 2.11. So use at your own risk. As usual, back up everything, including the computer you download this file from, any server, router, or any computer equipment inbetween your computer and the server. Make sure every single possible safety producure are done ahead of time before you even think about download this file and put it in any form of use.
After that. Just deactive your old update module, delete the old module and upload the new one. Then go to module, click update, and activate. Then it should work just like the old one.
The main different is that instead of showing just the last defined number of image in a single page, it will now shows how many page there are, and let you go forward and backward in pages. The query also handle subalbum update with a link in each album. At the moment, that link is hard coded. if someone feel like fixing it so it can be turned off in the site album area, please send aid! O.o
Oh, and, thanks for the orignal owner, I borrowed most of the code and hope you are ok with this. I have a feeling some new feature in 2.2 will make this obsculate, but who knows. Hope this is still helpful.
Developer, please let us know what else we need to do to make this module commitable to the SVN (I don't use SVN)
Posts: 66
Sounds good, Eka_Mei - I will see if I dare using it with Gallery 2.1. Is there anywhere I can see it in action? I am not sure what you mean by the subalbum feature.
Posts: 5
wow, perfect! Works really well. The images arn't lined up, but its exactly what i was looking for. You can see a demo at http://westondeboer.com/gallery/updates/ (I enabled url rewrite). Thanks for this update, good work!
Posts: 66
Poil11, which version of Gallery are you running?
Posts: 132
As far as I know, version 2.1 and 2.11 have no different in core. 2.11 is more like a repackage.
If it is my server I would say just try it out.
Posts: 132
It doesn't line up might have something to do with the template being modified slightly for my custom theme. Since I don't use the standard matrix theme at all, If someone can fix it please reply.
Posts: 2
Sorry if this has been covered somewhere else but I could not find it. I uploaded the module (0.2.4) and then went to activate it but I came across this message:
Incompatible module!
Core API Required: 6.8 (available: 7.3)
Module API Required: 2.0 (available: 3.0)
I'm a newb at this... where can I get these?
Posts: 8601
Twister69, get a newer version of updates module.
Posts: 2
Doh! Thought what I had was the latest. Grabbed it, installed it... works great. Thanks.
Posts: 15
Eka_mei. I uploaded it and it seems to work. I am also having the problem of the images not lining up. Also, i get extra data like Color Space, Date/Time, Orientation, Resolution Unit Inch Compression and others. I do not want this information displayed and it would be nice if they lined up how might i be able to fix this problem. Change Themes or change code. Thanks in advance for this great mod.
Posts: 87
Hi
I did a hack back on page 2 of this thread in which I hid some bits text and added float left to the css I haven't install this version so can't update the code in this tread but the same principle may still work.
Paul Bearne
Posts: 132
My update template is a customized solution it will also display comments and extra info. For those who find this mods can't line up, or showing extra info, just do this following:
Removes these lines in updates/template/local/ShowUpdates.tpl around line 65-67
{foreach from=$theme.params.photoBlocks item=block}
{g->block type=$block.0 params=$block.1}
{/foreach}
And it won't shows thoses extra info.
Posts: 8601
to make the items line up just go into site admin / updates and add css to set a fixed size for each cell..
.updates-item { width: 200px; height: 250px; }
Posts: 15
Thanks for the fix. It worked perfectly. However is there any way to show just the ratings underneath and no comments.
Posts: 143
mindless, I just added the new Module by Eka_Mei on my 2.1 personal Gallery (still waiting to hear from HorsePunchKid regarding my other 2.0 Gallery)... anyway.. this works like a charm and the css you wrote above did the trick to line up the rows!!!
But.. since I know that you're the languages wizard (since it's always your name inside .po files... Please tell me what to do here..
In the Updates Module, I added a po folder with an edited pt_BR.po in it, and also a locale/pt_BR/LC_MESSAGES/modules_updates.mo that I created using PoEdit. I also need to create one for Nederlands!!
So.. I thought I was doing it all right, but it did not work. Am I missing something? Any other files I need to edit, to make them read other languages?
Thanks!!
Alex
Posts: 8601
perhaps start a new topic in the translations forum. following the directions in Documentation / Translations should work.. (in this case you need to create the po dir and copy a GNUmakefile from any other module)
Posts: 132
Yes, but you will have to do a few things. I don't know how else to do this.
First, you will have to put those line you just removed back on there. Secondly, you will have to do something to your temples in all the blocks that are showing. For example, if you don't want the comment to show up, you will need to edit the ViewComments.tpl and add these lines
{if $smarty.get.g2_view != "updates.ShowUpdates"}
to the very top, and
{/if}
to the very bottom.
Posts: 143
Hello mindless,
I am posting this here because I found a string missing on the Updates Module "module.inc" file. So this post does belong here.. Read on..
I followed all directions on the Documentation / Translations page and could not get my pt_BR to work... Until I noticed that it DOES work, but ONLY in the Admin Sidebar... It translated the word "View Updates" over there...
But on the main page or albums/pics sidebar... It was not translating "View Latest Updates"!!!
So I looked into the module.inc and there's string or function, or whatever you call that (I don't understand any of this) MISSING!!
It should be similar to this one:
translate('View Updates'),
But instead, needs to be:
translate('View Latest Updates'),
That's why it is translating "View Updates", but NOT "View Latest Updates", which is the one that appears on the sidebar for visitors to see.
I do not know how to create the string for "View Latest Updates". I tried making a copy of the ones for "View Updates", but I guess I did not put it in the right place and then my Gallery wouln't load.
Bottom line.. could someone EDIT the module.inc file and add the missing translate string for "View Latest Updates", please??
Thanks!!
Alexandra
Posts: 8601
Yup, I see the missing translate() call.. I've added that.
Other changes:
- I made getItemLinks obey the site admin option for update links (if you unchecked it they still appeared).
- When the updates links are turned on, I made them only appear for albums (link from a photo just shows the photo..).
- I added a new site admin option for the blocks to use, rather than using the photo blocks from the default theme.
Updates 0.3.7 attached.
Posts: 132
Yay, thanks! And sorry for a sloppy job that need you to look after ^^;
Posts: 143
Wooo hooo!!! I don't understand any of this stuff.. (I'm simply a housewife), but I am getting the hang of all this coding and am so proud that I found something missing!!!
Thanks for the update mindless!! (PS.. check the Translations Tracker. I spent hours today, creating pt_BR for the RSS Module and assigned it to you even though I was not sure if I HAD to assign it to someone)
Alex
Posts: 560
Eka_Mei: good work. Though the module needs some work to be able to effectively work (in bigger installs)
I'd be happy to see it workin with my ~200K pics ;)
(now the result is a simple timeout after 30secs;)
Posts: 132
My gallery only have 10k pics. And I don't know what is wrong nor do I have a gallery this big to help me look for bottle neck.
How long does the old update module take you? Cause for mine, both take almost exactly the same time when displaying the same amount of pictures.
Posts: 66
Midless, could you please help me exclude hidden items as well? The current query I use looks like this:
I only want to see images from one user. As far as I can tell, the hidden attribute is in the g2_Entity table on the g_onLoadHandlers column where the status is [Hidden].
Can I just ad:
... to make it work?
Posts: 560
okay, nm, it not (just) the amount of pics, but amount of users/permissions used in the queries..
Posts: 132
In that case, there are not a lot I can do. I used the standard way to handle the pages, letting Gallery2 itself figure out how many pages there are. That might be one reason why it is slowing down.
The amout of user/permissions definitely will effect the speed as well.
Posts: 8601
Fjelsten, you don't need to omit hidden items specifically. The permissions portion of the query will handle that.. so you'll see hidden items only if you have visited them, or already have permission to see them because you're an admin, etc.
Posts: 66
Really? Wow - then G2 is really advanced. I just didn't think that since I had logged off and still saw the hidden items.
Peter
Posts: 66
Sorry to bug you again, Mindless, but in .37, the hack you helped me with above that would show only my images, does not work anymore (from the first query in ShowUpdates.inc):
Do you have an update (pun intended!) for me?
Thanks.
Peter
Posts: 8601
it should still work.. the variable to apply the change to is now called $queryBase.. add [GalleryItem] in the FROM list, add [GalleryEntity::id] = [GalleryItem::id] AND [GalleryItem::ownerId] = 6 AND in the WHERE section.
Posts: 66
It does! Thanks a bunch.
Peter
Posts: 4
alright, i'm really dense tonight...how do i open the module's Admin screen? originally thinking this refered to the Site Admin link in Gallery, i went there but could only find where i installed the module. no configuration available.
thanks for any help!
Gene
Posts: 132
Once you installed and activated the module, you can configure it by clicking on "updates" on the side bar.
Posts: 6
This is a great module - as a user I want to see the latest photos, I'm sure many are like me. Thank you.
I'm a gallery newbie. This might be a URLrewrite question more than the updates module, if so I apologize, but I would like to make the updates page the default page the user goes to, rather than the default main.php. So if they go to domain.com/gallery2/ it redirects to the updates page (currently I have URLrewrite pointing to /updates/). Of course I'd like the breadcrumb to still return to the top level gallery at main.php once they are inside albums.
Does this involve URLrewrite or editing main.php somehow (or config.php?)? Thanks!
Posts: 8601
if you just want to change /gallery2/ then edit index.php to redirect wherever you want.
alternatively, you can edit modules/core/classes/GalleryConstants.class and find the default view (where G2 goes for main.php with no g2_view parameter)
Posts: 143
HorsePunchKid or anybody....
Do you think it's safe for me to try adding the Updates Module to my Charity Gallery which is 2.0-rc-2 core 0.9.36??
If I install it and then my Gallery stops working, how can I manually uninstall it via FTP??
Thanks!!
Alex
Posts: 3
I want to change the look of the updates page itself, how can I do that? I know that I can edit the main theme to change the layout of the entire gallery, but I don't want to do that.
I'm guessing the way to do it would be through the custom CSS block. I'm not good with CSS, though. Any suggestions?
(Basically, all I want is to display three thumbnails of the most recently added items and nothing else. It's for a window on my main page.)
Posts: 3
i am newb to gallery & do not know php, so i apologize in advance if this is a dumb question... i'm trying to get rid of the side bar on the updates page. i have disabled the side bar on the other parts of my gallery2, but can't figure out how to remove it on the updates page. i poked around in rawupdates.tpl & showupdates.tpl, but am not sure what to change (or if that's even the right place to look).
can anyone be so kind as to please point me in the right direction?
thanks in advance,
~Nancye
Posts: 3
i figured it out myself, and figured i should post the solution for others who may experience this... duh, in site admin, my theme had a block selected to show in the sidebar. i thought i'd checked this, but guess i missed it. D'Oh!
Posts: 388
May not be the best method but I hacked the ShowUpdates.inc to display latest 25 images only.
I changed line 184 from:
$totalCount = (int)$result[0];
to:
$totalCount = 25;
Posts: 3
There's an option in the module itself to only show the latest three images. However, that's all I want to show. No sidebars or anything else. Just three thumbnails, image info (the summary that you type in when you upload), and have the thumbnails link to the page.
Posts: 388
That option in the module only applies to how many images to show on each page. I only wanted a max of 25 no matter how many new images I uploaded.
Posts: 3
Ohhh, I see. That works a lot better. Thanks.