3 Column River Display Help

Hey, I can't seem to figure out how to keep friends add off the river or activity page. I know there is a plugin for this, and I installed it, but with the 3 Column its not working even with the plugin enabled, is there a trick or an option setting im missing? Anyone else have issues doing this, and if so how do you keep friends add off activity page. Thanks.

  • and it sounds like it might be another plugin extending the view to show it.  are you using any other plugins that have to do with friends, such as the plugin "friend request"?

  • plugin causing itskim grief is called 'elgg core' ;-) soooo if not know mucho re: elgg api, php -> not try to 'fix' nada, b/c it *will come backk to bite - real cruel ;-P btw the code you're looking for is
    add_to_river('river/relationship/friend/create', 'friend', elgg_get_logged_in_user_guid(), $friend_guid);
    somewhere within elgg core.. if u r game enuff to mess @that ? u r on your own..;-oO;X;P & have funzzz. O&O.

  • i can tell you how to make it go away if you want to screw with the core........

    views > default > river > relationship > friend > create.php.....

    comment out the file.......only 5-6 lines,  if you want to screw with core it

  • Ok, so what happens when I mess with the core for this create.php file? When I upgrade to the next version of elgg it will overwrite the file and I will just have to re-edit it everytime I upgrade? That is not a problem. I will play with it later, and backup the create.php incase I take a line of code out that I shouldn't have. Also, once a newer version of elgg is released, should I upload the old create.php back before I upgrade?

    Yes, I have friend request plugin installed, I have probably 50 plugins or more installed, lol. I will just make sure I back this core file up so incase something were to go wrong I have the original. Thankyou. Will post back on the outcome, and hopefully its not bad.

  • @DhrupDeScoop : Inside: river/relationship/friend/create' is this code:

    <?php
    /**
    * Create friend river view
    */
    $subject = $vars['item']->getSubjectEntity();
    $object = $vars['item']->getObjectEntity();

    $subject_icon = elgg_view_entity_icon($subject, 'tiny');
    $object_icon = elgg_view_entity_icon($object, 'tiny');

    echo elgg_view('river/elements/layout', array(
    'item' => $vars['item'],
    'attachments' => $subject_icon . elgg_view_icon('arrow-right') . $object_icon,
    ));

    When I remove some of the codes here, I can get certain things to dissappear from the friend relationship from appearing, but it still does not remove the names of the people or link to their profile page. I can get rid of the arrow and the graphics, but thats it, if I try to take all or more of the code out, then the activity page does not load anything, just a blank page...

  • Sorry, that code was for: /views/default/river/relationship/friend/create.php

  • Scoop: add_to_river('river/relationship/friend/create', 'friend', elgg_get_logged_in_user_guid(), $friend_guid)

    I do not know where this code is in the core files, its okay to have friends adds displayed on profile pages, all im trying to do is remove the code from the activity page from showing friend adds. Using elgg1.8.9 right now, the code posted from the: /views/default/river/relationship/friend/create.php I was able to remove a few things but there has to be way to remove it all entirely somehow and still be able to display the activity page, because if I take something out that needs to be there in the code the page goes blank. From what I could see, it had something to do with the: echo elgg_view('river/elements/layout', array( if I take everything else out, I can remove the images, but still showing the add. This is confusing, lol.

  • itskim, because you have other plugins that are also adding to the view, the friend request plugin has had code in it to display on the river also.  just as a test i commented out the entire create.php file and it worked fine for me.  the line of code that DaScoop was talking about is also in the friend request plugin.

  • itskim, dont remove the code, just comment it out like:     /* thecode here*/

    it is a core file, but when you upgrade it just overwrites and returns to original.  simplest way you can do it without creating a plugin.  the better way would be to take a little time and learn how to make a plugin

  • Can you copy and paste the entire code you were using to test to see what you mean exactly, then I can just copy that and upload it to see if it works? Only other thing I saw was this:

    https://github.com/Elgg/community_customizations/blob/master/start.php#L94

    On line 94 there is a hook you can make false, but im not sure where this start.php is located.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking