Set as avatar action

Hopefully someone might have a clue on a missing action button.  In both cases, the dolphin (7.1.4) installation has the photo and avatar modules installed....and as near as I can tell, configured the same way.  In one case, the "Set as Avatar" button is in the actions block.  In the other, it is missing.  Screen shots attached.

...thanks...

actions1.jpg · 44.1K · 487 views
actions2.jpg · 47.3K · 462 views
Quote · 27 Oct 2014

Are both of these fresh installs? I do not have the option either to 'Set as Avatar' on a newly built 7.1.4 site with Avatar and Photo module installed.

 

The default FAQ (written 2 years ago) says: If the Photos module is installed, from the View photo page you can set a photo as your Default Avatar.

http://www.boonex.com/trac/dolphin/wiki/DolUsersFAQ

 

I checked the install SQL for the Photo module and do not see where 'Set as Avatar' is being added in the sys_objects_actions table. I took a search through ALL 7.1.4 file and only found 1 instance of it and that was in the language file. So the language key of 'Set As Avatar' is there (_bx_photos_set_as_avatar) but there are no actions associated with it.

Nothing to see here
Quote · 28 Oct 2014

This 'may' not be the proper way but I checked all the instal SQLs for the Photos module and only found the 'Set as Avatar' in the original 7.1 version.

 

I tested this on a demo and it worked but I strongly suggest that you backup your database BEFORE doing this (at least the sys_objects_actions table).

 

Step 1. Count how many buttons are in your actions block starting from 0 (zero). For example, the blue screenshot has 7 buttons in it.

Step 2. Login to your database via MyPhpAdmin or Webadmin from your control panel.

Step 3. Run the following script:

 

INSERT INTO `sys_objects_actions` (`Type`, `Caption`, `Icon`, `Url`, `Script`, `Eval`, `Order`) VALUES
('[db_prefix]', '{TitleSetAsAvatar}', 'image_link.png', '{evalResult}&make_avatar_from_shared_photo={ID}', '', 'bx_import(''BxDolPermalinks'');\r\n$o = new BxDolPermalinks();\r\nreturn $o->permalink(''modules/?r=avatar/'');', 8);

 

Step 4. Clear your cache.

 

The #8 at the very end of that script is the order of where the button will be placed. After you run it, it should look like the grey screenshot you provided.

 

AGAIN - This may not be the proper way but it worked. BTW, Both Avatar and Photo modules HAVE to be installed.

Nothing to see here
Quote · 28 Oct 2014

Since avatars are square; I am assuming this resizes and crops a photo into the avatar, or does it take you to the avatar module with the photo loaded in the avatar editor?

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

When you click it, it takes you to the avatar page. The photo is already there so you just need to crop it and click 'Add Avatar'

Nothing to see here
Quote · 28 Oct 2014

 

This 'may' not be the proper way but I checked all the instal SQLs for the Photos module and only found the 'Set as Avatar' in the original 7.1 version.

 

I tested this on a demo and it worked but I strongly suggest that you backup your database BEFORE doing this (at least the sys_objects_actions table).

 

Step 1. Count how many buttons are in your actions block starting from 0 (zero). For example, the blue screenshot has 7 buttons in it.

Step 2. Login to your database via MyPhpAdmin or Webadmin from your control panel.

Step 3. Run the following script:

 

INSERT INTO `sys_objects_actions` (`Type`, `Caption`, `Icon`, `Url`, `Script`, `Eval`, `Order`) VALUES
('[db_prefix]', '{TitleSetAsAvatar}', 'image_link.png', '{evalResult}&make_avatar_from_shared_photo={ID}', '', 'bx_import(''BxDolPermalinks'');\r\n$o = new BxDolPermalinks();\r\nreturn $o->permalink(''modules/?r=avatar/'');', 8);

 

Step 4. Clear your cache.

 

The #8 at the very end of that script is the order of where the button will be placed. After you run it, it should look like the grey screenshot you provided.

 

AGAIN - This may not be the proper way but it worked. BTW, Both Avatar and Photo modules HAVE to be installed.

 

I clearly owe you a beer! 

This wasn't exactly what I saw but it pointed me in the right direction.  The working installation and the faulty one both had 9 bx_photo type entries in their sys_objects_actions table.  But they weren't sequentially numbered.  However, they all had the same order numbers except for the "Set as Avatar" ones.  On the working installation, the order number was 14.  On the "faulty" one, the order number was 11.  I backed up the latter and used phpmyadmin to change the 11 to a 14 and...PRESTO!!!...the button appeared.  Kind of makes me wonder if there are action buttons for other pages that may have problems.  But so far, everything looks good.

Many thanks!!

Quote · 28 Oct 2014

i've just decided to install the avatar mod to have a look at it as i really don't like the way the profile photo's work when they keep getting replaced with a new uploaded one, at the moment the Copy To Profile Photo Album is checked by default, is there a way to have this un-checked by default?

Quote · 10 Nov 2014
 
 
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.