How can i add a action that is only visible when you visit your own profile?
I have the module Actions Manager...
How can i add a action that is only visible when you visit your own profile? |
are you referring to adding an actions button in the actions block such as the greeting or befriend buttons caredesign.net |
step 1 - templates/base/scripts/BxBaseProfilesView.php - find (around line 435)
if(isMember()) {
top section is what members see, bottom is what non members see
if you want to hide a btton, then add '' in place of the _t('_Whatever')
if you want to add a line then copy one of the already existing buttons and just change the name, again, remember top section and bottom section should be identical except for after the =.
Step 2 - Make sure to add a language key for each new button you create. Step 3 - run this sql script in your phpmyadmin or deanos tool change the text in red to fit your needs:
`ID` ,
`Caption` , `Icon` , `Url` , `Script` , `Eval` , `Order` , `Type` , `bDisplayInSubMenuHeader`
NULL , '{evalResult}', 'paper-clip', 'page/whatever?id={ID}', '', 'if ({ID} != {member_id}) return; return _t(''{cpt_whatever}'');', '0', 'Profile', '0'
);
caredesign.net |
Always remember to clear cache after making changes to the sys_objects_actions table (or any of the sys_ tables) Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz |