I would like to see this as well, along with a global album
option that allows you to enable random highlight by default
(so you don't have to enable it manually everytime you
create a new album).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
requested for over 1-1/2 year and still no update. This may not be a high priority request, but 1-1/2 year? Come on!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
-
2007-05-10
Logged In: YES
user_id=1229647
Originator: NO
very tedious, indeed. this has been bugging me for quite some time now, so i finally took some time, logged sql queries and poked here and there and figured the sql to extract the random highlight information. here it is:
SELECT g2_Entity.g_id, g2_Entity.g_onLoadHandlers
FROM g2_Derivative
INNER JOIN g2_ChildEntity ON g2_Derivative.g_id = g2_ChildEntity.g_id
INNER JOIN g2_Entity ON g2_Derivative.g_id = g2_Entity.g_id
WHERE
g2_ChildEntity.g_parentId IN
(select g_id from g2_Entity where g_entityType = 'GalleryAlbumItem')
AND g2_Derivative.g_derivativeType = 1;
this is for RandomHighlight module v0.8.6 or newer (before, there was a RandomHighlightDerivativeImage entity type).
(re)setting random highlight for all your albums should be a snap now :)
would be great if this could be done from the admin ui. and if there was a default setting for new albums. thanks everyone for that!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
-
2007-05-10
Logged In: YES
user_id=1229647
Originator: NO
addendum to the sql query: make sure to clear the database cache (Site Admin > Gallery > Maintenance) after directly updating the database.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Based on AXK's contribution, here are the steps to enable random highlights on all sub-albums:
Step 1: Create a temporary table with information about folder objects
---------
CREATE TABLE a_random
SELECT g2_Entity.g_id, g2_Entity.g_onLoadHandlers
FROM g2_Derivative
INNER JOIN g2_ChildEntity ON g2_Derivative.g_id = g2_ChildEntity.g_id
INNER JOIN g2_Entity ON g2_Derivative.g_id = g2_Entity.g_id
WHERE
g2_ChildEntity.g_parentId IN
(select g_id from g2_Entity where g_entityType = 'GalleryAlbumItem')
AND g2_Derivative.g_derivativeType = 1;
---------------------------------------------------------------------------------------------------------------
Step 2: Update g2_Entity table with the appropriate values
---------
UPDATE g2_Entity a, a_random c
SET a.g_onLoadHandlers='whatever'
WHERE a.g_id = c.g_id;
---------------------------------------------------------------------------------------------------------------
Step 1: Force Gallery2 to query the database for new information
---------
Admin > Gallery > Maintenance > Clear Database Cache
Cheers,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: NO
Where is the information for each album to be random
highlight or not stored? I could not find it in the SQL
database.
Logged In: YES
user_id=767280
I would like to see this as well, along with a global album
option that allows you to enable random highlight by default
(so you don't have to enable it manually everytime you
create a new album).
Logged In: YES
user_id=932005
I would like to see this option!
Logged In: NO
Where is the information stored if an album uses random highlighted images? I would be satisfied if could change the settings with an sql query.
Logged In: NO
requested for over 1-1/2 year and still no update. This may not be a high priority request, but 1-1/2 year? Come on!
Logged In: YES
user_id=1229647
Originator: NO
very tedious, indeed. this has been bugging me for quite some time now, so i finally took some time, logged sql queries and poked here and there and figured the sql to extract the random highlight information. here it is:
SELECT g2_Entity.g_id, g2_Entity.g_onLoadHandlers
FROM g2_Derivative
INNER JOIN g2_ChildEntity ON g2_Derivative.g_id = g2_ChildEntity.g_id
INNER JOIN g2_Entity ON g2_Derivative.g_id = g2_Entity.g_id
WHERE
g2_ChildEntity.g_parentId IN
(select g_id from g2_Entity where g_entityType = 'GalleryAlbumItem')
AND g2_Derivative.g_derivativeType = 1;
this is for RandomHighlight module v0.8.6 or newer (before, there was a RandomHighlightDerivativeImage entity type).
(re)setting random highlight for all your albums should be a snap now :)
would be great if this could be done from the admin ui. and if there was a default setting for new albums. thanks everyone for that!
Logged In: YES
user_id=1229647
Originator: NO
addendum to the sql query: make sure to clear the database cache (Site Admin > Gallery > Maintenance) after directly updating the database.
Based on AXK's contribution, here are the steps to enable random highlights on all sub-albums:
Step 1: Create a temporary table with information about folder objects
---------
CREATE TABLE a_random
SELECT g2_Entity.g_id, g2_Entity.g_onLoadHandlers
FROM g2_Derivative
INNER JOIN g2_ChildEntity ON g2_Derivative.g_id = g2_ChildEntity.g_id
INNER JOIN g2_Entity ON g2_Derivative.g_id = g2_Entity.g_id
WHERE
g2_ChildEntity.g_parentId IN
(select g_id from g2_Entity where g_entityType = 'GalleryAlbumItem')
AND g2_Derivative.g_derivativeType = 1;
---------------------------------------------------------------------------------------------------------------
Step 2: Update g2_Entity table with the appropriate values
---------
UPDATE g2_Entity a, a_random c
SET a.g_onLoadHandlers='whatever'
WHERE a.g_id = c.g_id;
---------------------------------------------------------------------------------------------------------------
Step 1: Force Gallery2 to query the database for new information
---------
Admin > Gallery > Maintenance > Clear Database Cache
Cheers,