Photo Albums for Groups (AndrewP) - part 2

Quote · 26 Oct 2013

This is the update.sql I created for updating the group photo album module:


ALTER TABLE agrp_palbums_units
ADD COLUMN  `rate` float NOT NULL AFTER `Filename`,
ADD COLUMN  `rateCount` int(11) unsigned NOT NULL AFTER `rate`,
ADD COLUMN  `commentsCount` int(11) NOT NULL AFTER `rateCount`,
ADD COLUMN  `featured` int(1) default '2' AFTER `commentsCount`;

CREATE TABLE `agrp_palbums_img_cmts` (
  `cmt_id` int(11) NOT NULL auto_increment,
  `cmt_parent_id` int(11) NOT NULL default '0',
  `cmt_object_id` int(11) NOT NULL default '0',
  `cmt_author_id` int(10) unsigned NOT NULL default '0',
  `cmt_text` text NOT NULL,
  `cmt_mood` tinyint NOT NULL default '0',
  `cmt_rate` int(11) NOT NULL default '0',
  `cmt_rate_count` int(11) NOT NULL default '0',
  `cmt_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `cmt_replies` int(11) NOT NULL default '0',
  PRIMARY KEY  (`cmt_id`),
  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `agrp_palbums_img_rating` (
  `gpap_id` int(11) unsigned NOT NULL default '0',
  `gpap_rating_count` int(11) unsigned NOT NULL default '0',
  `gpap_rating_sum` int(11) unsigned NOT NULL default '0',
  UNIQUE KEY `med_id` (`gpap_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `agrp_palbums_img_voting_track` (
  `gpap_id` int(11) unsigned NOT NULL default '0',
  `gpap_ip` varchar(20) default NULL,
  `gpap_date` datetime default NULL,
  KEY `med_ip` (`gpap_ip`,`gpap_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`,

`Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES
(NULL, 'bx_events_main', '998px', 'Feature Group Photos', '_gpa_featured_list', 1, 1, 'PHP', 'return

BxDolService::call(''gphotos'', ''index_page_feature'', array());', 1, 71.9, 'non,memb', 0);

INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`,

`Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES
(NULL, 'index', '998px', 'Feature Group Photos', '_gpa_featured_list', 1, 1, 'PHP', 'return

BxDolService::call(''gphotos'', ''index_page_feature'', array());', 1, 71.9, 'non,memb', 0);

INSERT INTO `sys_objects_cmts` (`ID`, `ObjectName`, `TableCmts`, `TableTrack`, `AllowTags`, `Nl2br`,

`SecToEdit`, `PerView`, `IsRatable`, `ViewingThreshold`, `AnimationEffect`, `AnimationSpeed`, `IsOn`,

`IsMood`, `RootStylePrefix`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldComments`, `ClassName`,

`ClassFile`) VALUES
(NULL, 'agrp_palbums_img', 'agrp_palbums_img_cmts', 'sys_cmts_track', 0, 1, 90, 5, 1, -3, 'none', 0, 1, 0,

'cmt', 'agrp_palbums_units', 'ID', 'commentsCount', '', '');

INSERT INTO `sys_objects_vote` (`ID`, `ObjectName`, `TableRating`, `TableTrack`, `RowPrefix`, `MaxVotes`,

`PostName`, `IsDuplicate`, `IsOn`, `className`, `classFile`, `TriggerTable`, `TriggerFieldRate`,

`TriggerFieldRateCount`, `TriggerFieldId`, `OverrideClassName`, `OverrideClassFile`) VALUES
(NULL, 'agrp_palbums_img', 'agrp_palbums_img_rating', 'agrp_palbums_img_voting_track', 'gpap_', 5,

'vote_send_result', 'BX_PERIOD_PER_VOTE', 1, '', '', 'agrp_palbums_units', 'rate', 'rateCount', 'ID', '',

'');

SET @iLevelNonMember := 1;
SET @iLevelStandard := 2;
SET @iLevelPromotion := 3;

INSERT INTO `sys_acl_actions` VALUES (NULL, 'agpalbums feature', NULL);
SET @iAction = (SELECT LAST_INSERT_ID());

INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
    (@iLevelPromotion, @iAction);


Geeks, making the world a better place
Quote · 27 Oct 2013

After updating I am seeing a couple of issues.

One is the group photo album block on the Home Page is showing albums that are marked to be viewed by group members only.  The featured block also shows photos from albums that are marked group members when the logged in member is not a member of that group.

There is no feature photo block on the group home page and I am not seeing it in the inactive items.  Perhaps my update.sql did not include that?

Geeks, making the world a better place
Quote · 27 Oct 2013

Hello geek_girl,

Yes, you needed the update SQL (in case if you don't want to reinstall the module completely.
Your update SQL is correct, but you have to replace '998px' to '1140px' (both instances).

With regards to the privacy issue, give me some time, I need to investigate this question.

Quote · 28 Oct 2013

I updated the package, and also I included your update.sql into the package.

I changed

INSERT INTO `sys_page_compose` ... (NULL, 'bx_events_main'
to
INSERT INTO `sys_page_compose` ... (NULL, 'bx_groups_main'

(in the update.sql)

 

Two files (AGpalbumsModule.php and AGpalbumsImgSearch.php) were updated - you can update them.

Quote · 28 Oct 2013

Thanks Andrew, will download the updates.   I just want to take the time to say that you are one of the best developers on Boonex; you answer questions and issues in a timely matter and that means a lot.

Again, Thanks.

Geeks, making the world a better place
Quote · 28 Oct 2013

I made sure to log in as a non-admin of the site.  I checked the photo albums for their privacy level.  All photos album on the home page were set to privacy level members (members of the site, not the group)  What I am seeing is that if a group is a private group, then photo albums that are shared to members of the site can not be view, you get Access Denied.  I am guessing this is from Dolphin not allowing the viewing of the photo album due to blocking non-members of the private group from viewing group content.

If fixing this is going to be difficult or impossible, then I may just opt to remove the photo album block from the home page because of the access denied when trying to view the photo albums from private groups.  The other solution for a private group would be to check if the group is private and then remove the privacy levels of public and members since the photo albums can not be viewed in a Private Group; that might be a workable solution.

Update: I am not seeing the featured button on the photo view page after I updated the files.

Geeks, making the world a better place
Quote · 28 Oct 2013

Hi geek_girl,

Yes, of course, privacy rules of a group is more important than privacy rules of its photo albums. We always should check for group's privacy rules when we are at inside pages of the group.

But yes, you are right, that in two new blocks (feature photos) we don't check for privacy rules of it's parent groups, we check only for privacy settings of it's albums.

If you need, I can show you how to add this extra check for group's privacy settings for both blocks of images. Send me a letter for this instruction

Quote · 3 Nov 2013

With regards to the 'Feature' button, this button is in 'modules\andrew\gpalbums\templates\base\photo_unit_full.html' file.

If your HTML cache is enabled, you will need to clean your caches before you see this button

Quote · 3 Nov 2013

Hi Andrew,

I have a strange request.  I have the Group photo album installed and working fine as version 2.0.0 on D7.1.4

When I try to update to version 2.0.1 of the module and run the update (2.0.0-2.0.1).sql I get this error.

Error

SQL query:

ALTER TABLE agrp_palbums_units ADD COLUMN `rate` float NOT NULL AFTER `Filename` ,
ADD COLUMN `rateCount` int( 11 ) unsigned NOT NULL AFTER `rate` ,
ADD COLUMN `commentsCount` int( 11 ) NOT NULL AFTER `rateCount` ,
ADD COLUMN `featured` int( 1 ) default '2' AFTER `commentsCount` ;

MySQL said: Documentation

#1146 - Table 'Mydatabase_dolphin.agrp_palbums_units' doesn't exist

I looked at my database structure and could not find any tables with "agrp"

So - how could my groups and group albums be working fine as version 2.0.0 but I am not able to update to 2.0.1 because the "table does not exist?" :)

Example: http://molosserdogs.com/m/gphotos/group/Spanish-Mastiff-Mastín-Español/album/Some-Spanish-Mastiffs/

This is the sql

ALTER TABLE agrp_palbums_units
ADD COLUMN  `rate` float NOT NULL AFTER `Filename`,
ADD COLUMN  `rateCount` int(11) unsigned NOT NULL AFTER `rate`,
ADD COLUMN  `commentsCount` int(11) NOT NULL AFTER `rateCount`,
ADD COLUMN  `featured` int(1) default '2' AFTER `commentsCount`;

CREATE TABLE `agrp_palbums_img_cmts` (
  `cmt_id` int(11) NOT NULL auto_increment,
  `cmt_parent_id` int(11) NOT NULL default '0',
  `cmt_object_id` int(11) NOT NULL default '0',
  `cmt_author_id` int(10) unsigned NOT NULL default '0',
  `cmt_text` text NOT NULL,
  `cmt_mood` tinyint NOT NULL default '0',
  `cmt_rate` int(11) NOT NULL default '0',
  `cmt_rate_count` int(11) NOT NULL default '0',
  `cmt_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `cmt_replies` int(11) NOT NULL default '0',
  PRIMARY KEY  (`cmt_id`),
  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `agrp_palbums_img_rating` (
  `gpap_id` int(11) unsigned NOT NULL default '0',
  `gpap_rating_count` int(11) unsigned NOT NULL default '0',
  `gpap_rating_sum` int(11) unsigned NOT NULL default '0',
  UNIQUE KEY `med_id` (`gpap_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `agrp_palbums_img_voting_track` (
  `gpap_id` int(11) unsigned NOT NULL default '0',
  `gpap_ip` varchar(20) default NULL,
  `gpap_date` datetime default NULL,
  KEY `med_ip` (`gpap_ip`,`gpap_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES
(NULL, 'bx_groups_main', '1140px', 'Feature Group Photos', '_gpa_featured_list', 1, 1, 'PHP', 'return BxDolService::call(''gphotos'', ''index_page_feature'', array());', 1, 71.9, 'non,memb', 0);

INSERT INTO `sys_page_compose` (`ID`, `Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES
(NULL, 'index', '1140px', 'Feature Group Photos', '_gpa_featured_list', 1, 1, 'PHP', 'return BxDolService::call(''gphotos'', ''index_page_feature'', array());', 1, 71.9, 'non,memb', 0);

INSERT INTO `sys_objects_cmts` (`ID`, `ObjectName`, `TableCmts`, `TableTrack`, `AllowTags`, `Nl2br`, `SecToEdit`, `PerView`, `IsRatable`, `ViewingThreshold`, `AnimationEffect`, `AnimationSpeed`, `IsOn`, `IsMood`, `RootStylePrefix`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
(NULL, 'agrp_palbums_img', 'agrp_palbums_img_cmts', 'sys_cmts_track', 0, 1, 90, 5, 1, -3, 'none', 0, 1, 0, 'cmt', 'agrp_palbums_units', 'ID', 'commentsCount', '', '');

INSERT INTO `sys_objects_vote` (`ID`, `ObjectName`, `TableRating`, `TableTrack`, `RowPrefix`, `MaxVotes`, `PostName`, `IsDuplicate`, `IsOn`, `className`, `classFile`, `TriggerTable`, `TriggerFieldRate`, `TriggerFieldRateCount`, `TriggerFieldId`, `OverrideClassName`, `OverrideClassFile`) VALUES
(NULL, 'agrp_palbums_img', 'agrp_palbums_img_rating', 'agrp_palbums_img_voting_track', 'gpap_', 5, 'vote_send_result', 'BX_PERIOD_PER_VOTE', 1, '', '', 'agrp_palbums_units', 'rate', 'rateCount', 'ID', '', '');

SET @iLevelNonMember := 1;
SET @iLevelStandard := 2;
SET @iLevelPromotion := 3;

INSERT INTO `sys_acl_actions` VALUES (NULL, 'agpalbums feature', NULL);
SET @iAction = (SELECT LAST_INSERT_ID());
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
    (@iLevelPromotion, @iAction);

 

 

Gary http://molosserdogs.com
Quote · 15 Nov 2013

Hi Andrew,

thanks for the good work, well done!

It works very well, but after adding some photos, I was in need to set the main thumb for an album. For me it's quite simple by accessing mysql directly and change the data of the album record, but simple users can't do that of course.

Is there actually no way to set the desired thumb in the available forms and functions, or did I miss something?

Best regards, Tom

Quote · 25 Nov 2013

Hello,
The new version of the module was released today.
SQL instructions to upgrade between versions are also added.

2 gsicard, please make sure that the table 'agrp_palbums_units' exists in your database. This is the main table of the module which was not added recently, but it was added long ago, in the first version of the module.

2 paeckchen, there is no need to do it, the module does it automatically: it sets last added image as album thumbnail

Make sure that the module is properly installed (binary ftp mode)

Quote · 6 Dec 2013

New features (v 2.0.2):
* Group Wall module integration
* Possibility of adding (pin) pictures by URL

Quote · 6 Dec 2013

Hello Andrew,

thanks for the update!

On application I encountered a problem: Do I have to apply the update.sql for 202->203 ?
Since I startet with version 202, is there any need of applying the update-sql to 203? Because if I do that, table a_gwall_handlers doesn't exist and therefore comes an error in mysql.

The regular 203 install.sql contains this sql-command also which obviously leads to an install error when installing a fresh 203 version.

----------------------------

Concerning thumbnails is my intention, that I like to choose and/or fix the thumbnail by myself. Because not always is the last picture my desired thumb, for example when I replace a picture but don't want to use it as the thumb.

 

Tom

Quote · 6 Dec 2013

Hi Tom,
In case if you don't use my 'Group Timeline', you may omit executing the update(2.0.2-2.0.3).sql, just refresh module's source files (all php files only)

Quote · 6 Dec 2013

I upgraded the module and applied the SQL updates.  However, when I try to edit the photo title of a photo, it is not applied.  I click on the button, the form opens up, I change the title, hit submit and the title stays the same.  I even tried refreshing the page.

Geeks, making the world a better place
Quote · 10 Jan 2014

 

I upgraded the module and applied the SQL updates.  However, when I try to edit the photo title of a photo, it is not applied.  I click on the button, the form opens up, I change the title, hit submit and the title stays the same.  I even tried refreshing the page.

What I found out was that you have to include something in the description box as well; if you just have a title and no description, it won't change the title.

Geeks, making the world a better place
Quote · 12 Jan 2014

Hi GG,

The module was updated accordingly your needs (in order to be able to edit only titles without descriptions, and vice versa). To update your version you can update the only file: AGpalbumsModule.php

Quote · 15 Jan 2014

New update's features:

possibility of adding (pin) pictures by URL (v2.0.3)

small little badge (thumb) of a member who uploaded a photo (v2.0.4)

Quote · 18 Mar 2014

kinda on/off topic request...

any chance you can do a video albums for groups module! 

 

Pleeeease :-)

Quote · 24 Sep 2014

That is possible, but in case if it would be in demand. Is there anyone else who needs it?

Quote · 25 Sep 2014

 

That is possible, but in case if it would be in demand. Is there anyone else who needs it?

I think it would be a good addition to your group modules and I would be interested.  However, and this is a big however, my team has no funds at this time for purchasing modules.  Currently we are focused on upgrading the site files.  So while I would like to add a video albums mod to groups, I can not tell you when we would be able to purchase such a module.  Andrew, why not ask out in the main forums so that you can get a better idea since this is really the support forum for your photos album module and only those coming here for support and update messages even sees this.

Geeks, making the world a better place
Quote · 2 Oct 2014

Vid albums for group would be of interest to me when ready.

Quote · 20 Feb 2015

Today the module was updated for dolphin 7.2.0

Quote · 8 Sep 2015

 

Today the module was updated for dolphin 7.2.0

 

Why add swfUpload to this module instead of using the new uploader in Dolphin 7.2?  Me no understand :(

 

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 22 Sep 2015

Hello,

 

Installed this module on my 7.2 site, and when another member of the group who is not the owner attempts to upload a photo to the album, it says access is denied, even when the group is set up to allow this. It appears that in the getFuploadFormFile function inside AGpalbumsUploaders.php, the first "if" statement is not being triggered by anyone except the album owner. Any ideas on how to fix?

Quote · 14 Oct 2015

any chance of video albums for group mod soon?

Quote · 14 Oct 2015

Hi C-X-H, the code is correct. By default, only website admin, group owner and group admins are able to perform all possible actions with groups. If you created album with enabled option that allow other group members to add photos - make sure that you are Fan of this group (you need to join the group).

Quote · 2 Dec 2015

 

any chance of video albums for group mod soon?

 bump!

Quote · 17 Dec 2015

Updated (for 7.2.x and 7.3.x)

Quote · 28 Mar 2016

Still using swfupload.  Why??

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 31 Mar 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.