Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to ged rid of the ”view” (or ”show”) button – Or: How to alter the Activity Header


  • Oliver
    Participant

    @corell

    Hello :)

    i know it has been discussed before, but unfortunately i found no solution for my problem. In the entry.php i wanna alter the header:

    div class=”activity-header” -> bp_activity_action()

    Actually, i just want to ged rid of the “view”-button (the one next to the “delete”-button). It seems its too troublesome to find out where “bp_activity_action” is located an how it works. So maybe theres an alternative for me to just ged rid of the view-button? I would be veeeeeery thankful for any given hint.

    Thanks a lot!

Viewing 8 replies - 1 through 8 (of 8 total)
  • @corell; The View link confuses people, we find, though others here said it’s useful as a permalink for bookmarking. Without it, people could lose track of posts in the Activity stream. However, for non-techie users and those not used to Internet blogs and forums, etc., the Favourite link does a better job and means more to them. Plus, My Favourites is always there on the Activity stream page for easy access to what they’ve saved.

    So, I modified a few BP core files, and saved them separately so I can overwrite the core or restore it as required. (I’d been having problems with the theme’s View page layout, and was modifying it with help from others). You can see the result at our still developing site at http://lincme.co.uk/activity/

    I used a fast file internal search and hunted down the string “View middot” (“View” AND “middot”, not “View” + space + “middot”). Then I just remmed out the permalink insert line with /* & */. There aren’t too many files to change, but obviously, keep them separate and don’t overwrite your BP zip installer! If it helps, I use a freeware file search tool for Windows called Agent Ransack.


    Oliver
    Participant

    @corell

    Wow great! It worked!!! Thank you soooooooooooo much :D
    For everyone with the same problem: The Files are:

    bp-activity-templatetags.php
    entry.php

    just search the for the div (e.g. firebug) to find the respective functions name in the entry.php. Then you search the function in the bp-activity-templatetags.php and change it the way you want :)

    We aim to please. And also strip 60% of BuddyPress away so it functions in ways ordinary users can understand. :)

    avoid hacking the core files – to remove the ‘view’ permalink for an activity record just filter on “bp_activity_permalink” and return a blank string.

    @nuprn1; I know you’re trying to help, but you might as well have said “Just create world peace; end of problems”. For those who aren’t used to creating plugins, hooking into WP and BP functions, etc., (and more importantly, who don’t have the time to learn it all right now) this is quick, and it works. Also, in not just one opinion here, the View link and the improperly formatted page it leads to are not required, and confuse users who don’t play around on blogs and forums all the time. Thanks for the help and all, but it would also save time if perhaps you just posted a link to a quick way to do what you suggest..?

    Edit: I thought it worth adding an extra note to say that I hope this doesn’t come across as ungrateful. We all appreciate the time and work you and others put into WP, BP and plugins. One issue that’s obvious reading around this site is that not only are people finding things confusing for end users, they’re also confused themselves, and they’re trying to build sites! All the advertising of “Famous 5 minute install” are pretty worthless to those who aren’t programmers (and don’t want to be) when they find weeks and weeks of work is required to produce something workable.

    Most of us just want to build sites end users find simple and effective, and we’re using WP and BP because they’re presented as being the quickest, easiest, and most powerful way to do so. Having to continually slave away at making it all simple is time wasting, and often very frustrating for those who believe what code authors say about it being simple. Turns out, it isn’t, is it? I love the WP+BP combination, but I’ll take the shortest route to a working system that I can, because somewhere away from my hot computer there’s a life I used to lead! :)

    Well these are common WP type functions – have a look at the codex.
    https://codex.wordpress.org/Function_Reference/add_filter

    If you’re building a site – might as well try changing it the correct way instead of informing others to hack the bp-core. (as that will just lead to bigger problems down the road for those who may not understand the changes made). BuddyPress is littered with hooks

    something like:

    function my_blank_activity_permalink( $content ) {
    return ”;
    }
    add_filter(‘bp_activity_permalink’, ‘my_blank_activity_permalink’, 1, 1 );

    @nuprn1; I’m switching off and taking a much needed break, but again, thanks for your help. That function means little to me in terms of where it goes (I’m assuming in an overridden theme file). I’m also guessing that the guy who asked the original question might also say, “What?!” Yes, there’s the codex, and god knows how many more hours wasted just trying to do something *really* simple like remove a useless link! As I said, it’s *not* simple, is it? And if people who download WP and BP to build a site find it isn’t as simple as they were lead to believe, guess what? They disappear after a very short while. Right now, if I have the choice of spending 14 hours a day for months on end trying to untangle a massive ball of string or getting the knife out, I’ll get the knife out. Coding *isn’t* poetry, it’s sometimes fun, sometimes a waste of life. Sometimes both! ;)


    @mercime
    Keymaster

    @mercime

    @lincme that code would be added to your child theme’s or active BP theme’s functions.php file

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to ged rid of the ”view” (or ”show”) button – Or: How to alter the Activity Header’ is closed to new replies.
Skip to toolbar