How to set the like plugin to only one page in elgg(for example i wana set the plugin to only file page and not to blog page). Please anyone answer me soon as it is urgent
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
You need to add a view to your theme.
<your Elgg directory>/mod/<your theme directory>/views/default/likes/button.php
I am using latest 1.8.6 elgg version with cool theme, How i can remove like button when two users become friends?
I can see in activity feeds when two users become friends there shows LIKE button. How I can remove LIKE option when two people become friends?
There is no like button in activity feed when two members become friends using Elgg bundled Like plugin. Probably this is different when using Cool theme. What for theme is this? do you have a link for this theme?
@kisssssss4ever Ok, I have found this theme.
You need to add the following 2 lines of code in <your Elgg directory>/mod/cool_theme/views/default/likes/river_footer.php:
@ElggCloud THANK YOu SO MUCH for your prompt reply, I did try what you said but does not work, still I can see the LIKE button when two users become friend, I don't mind if the LIKe button is there but the problem is when we press that LIKE button it gives fatal error.
Like button works fine everywhere on the site only when two users become friend then that LIKE button gives error :(
1. If you added this new view /mod//views/default/likes/button.php as I showed before, you have to deactivate and then activate your theme plugin. Don't forget :-)
2. Your theme plugin must be placed after like plugin. Usually, you would put this as the last plugin on the bottom.
@ElggCloud :) Before you told me to edit <your Elgg directory>/mod/cool_theme/views/default/likes/river_footer.php:
But now above u said edit /mod//views/default/likes/button.php
Please let me know which one I really need to do :)
Sorry being a pain, I am new to elgg but hope you would bear with me and try to help me with a smile :)
ElggCloud am not sure u answered to me or to sharon :(
Regards
@kisssssss4ever /mod/views/default/likes/button.php was meant for Sharon :-)
Regarding your issue with Cool theme, you just need to add the following 2 lines of code in <your Elgg directory>/mod/cool_theme/views/default/likes/river_footer.php:
<?php
/**
* Elgg likes display
*
* @uses $vars['entity']
*/
if (!$vars['item'] instanceof ElggRiverItem || $vars['item']->annotation_id) {
return true;
}
// These are the 2 lines of code!
if ($vars['item']->getView()=='river/relationship/friend/create')
return true;
//
$object = $vars['item']->getObjectEntity();
..............
@kisssssss4ever The complete solution for your issue is as follow:
1) Modification in <your Elgg directory>/mod/cool_theme/views/default/likes/river_footer.php:
The above added code will prevent already existing likes to be shown on the river.
2) Modification in <your Elgg directory>/mod/cool_theme/start.php:
The above added condition will prevent like menu to be created for friendships on the river.
Thknk you so much ElggCloud its working fine.... :)
- Previous
- 1
- 2
- Next
You must log in to post replies.