Skip to:
Content
Pages
Categories
Search
Top
Bottom

“My Favorites” Plugin

  • Avatar of Betoverli
    betoverli
    Participant

    @betoverli

    Does this plugin exists somewhere? It would work like “site wide”. someone “logged in” could mark a post of anything on the site (all blogs associated to the that WPMU site) as favorite. Them, in the profile page for that user, it would appear in a “My Favorites” section.

    This would make people navigate more through out the whole website it self! People could them leave “comments” for each specific favorite for that person. Making it the site to be a true sitewide social network.

    Sorry for my poor english!

Viewing 25 replies - 26 through 50 (of 52 total)
  • Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @slaffik – Hmm… make sure you’re using the latest code as the older ones I posted on Pastebin did not hook into the right action.

    Also double check the wp_bp_activity table and make sure for the “new_blog_post” type that the item_id is the blog ID and the secondary_item_id is the post ID on the blog.

    One thing that you pointed out to me is I need to add some type of check to see if the activity ID exists for the blog post in question, if it does, then output the favorite button, if doesn’t, it should output nothing.

    Avatar of poolie
    poolie
    Participant

    @poolie

    @r-a-y code works great for me, thanks for sharing!

    Avatar of Daniel Hay
    Daniel Hay
    Participant

    @danhay

    @r-a-y Nice bit of code. You can extend this to also show how many faves a post has:

    = ( $fav = bp_activity_get_meta( $activity_id, ‘favorite_count’ ) ) ? $fav : 0

    Avatar of justbishop
    justbishop
    Member

    @justbishop

    Just posting so I don’t lose this thread ;)

    Avatar of justbishop
    justbishop
    Member

    @justbishop

    @r-a-y: Amazing! Thanks!

    Avatar of justbishop
    justbishop
    Member

    @justbishop

    @danhay: I’d love to use your code for how many people have favorited a post, but I’m not sure if the BP forum has mangled it or if it really is supposed to start with “=”?

    Also, anyone have widget code or anything that would return a list of the top X most favorited posts for display in my main site’s sidebar?

    Avatar of Jorisdieben
    Joris
    Participant

    @jorisdieben

    Is it already possible to use this code for a single 3.x WP install, instead of only on WPMU?

    Avatar of Maeda
    Maeda
    Participant

    @maeda

    I’m having the weird problem SlaFFik had earlier. Anybody got ideas on why this happens?

    The ‘favorite’ link is spitting this out…
    http://xxx.com/activity/favorite//?_wpnonce=ec58546bf0

    the // is where the activity ID is missing.

    Avatar of kateM82
    kateM82
    Member

    @ddgdaily

    @danhay @justbishop

    Any updates on the number of favourties count code from earlier, I cant get it working either, and it looks like it needs a few extra bits and pieces.

    This is what @danhay originally posted:

    = ( $fav = bp_activity_get_meta( $activity_id, ‘favorite_count’ ) ) ? $fav : 0

    Avatar of justbishop
    justbishop
    Member

    @justbishop

    This is the first activity I’ve seen on the issue since asking myself, @ddgdaily. I really wish someone would come and pastebin the correct code, because if this is possible, I could really use it!

    Avatar of Gulflee
    gulflee
    Participant

    @gulflee

    cannot found bp-custom.php and there is a “favorite” when clicked it change to “remove favorite”, link show
    http://xxx.com/activity/favorite/3/?_wpnonce=d6f0625717 but it did not save, when page refreshed it change back to “favorite” state.
    any help, thanks in advance

    Avatar of kateM82
    kateM82
    Member

    @ddgdaily

    @justbishop. I got it working

    Here is what I did in BP-newb terms:

    Created a blank php doc in the wp-content/plugins folder named bp-custom.php

    (You need to set up this blank doc with this: http://pastebin.com/GM269f2H)

    Between that paste :
    http://pastebin.com/Ct0HZV00

    Then in the single.php of your these paste the following where you want the favourites to show

    http://pastebin.com/3Pa7WUAV

    Then just copy over the CSS from the normal favourites button and you should be good to go, I hope…

    PS – you can view it on my site here – http://members.dropdeadgorgeousdaily.com

    haven’t tried adding it to other sites on the MU install, fingers crossed that works too!

    Avatar of justbishop
    justbishop
    Member

    @justbishop

    @ddgdaily, I’m not seeing a “most favorited” list anywhere on your site? Is all of that code you pastebinned just the stuff to add the *ability* to favorite a post, because I already have that up and running. I’m just looking for a way to keep a top 5 (or whatever number) list of the posts that have been favorited the most times, and display that in my main site’s sidebar :)

    Avatar of kateM82
    kateM82
    Member

    @ddgdaily

    Ah ok, sorry, I probably missed a post there!

    Avatar of stwc
    stwc
    Participant

    @stwc

    Bookmark post.

    Avatar of justbishop
    justbishop
    Member

    @justbishop

    OK, I have a new request…would it be possible to display a user’s list of favorites on a page other than members/username/activity/favorites/ ?

    I’d love to use the favorites feature on my site to allow users to create something like Etsy Treasuries, and display a new member’s picks each day/week/whatever on my site’s front page.

    Avatar of benklocek
    benklocek
    Member

    @benklocek

    Subscribe

    Avatar of sidjags
    sidjags
    Member

    @sidjags

    any update on getting the “number of favorites” to appear next to the favorite now button… ps, thanks r-a-y for making this happen!

    Avatar of sidjags
    sidjags
    Member

    @sidjags

    @r-a-y @kateM82 what you guys suggested for “favoriting” posts from across a network worked great… but it doenst hold good with bp 1.5 beta 2… i still have the same code in bp-custom.php in the plugins folder… and i still have the same code in single.php… when i mouseover the link it does show me a “post id”… so thats not the problem.. and it does say… domain.com/activity/favorite/POST_ID/xxx …. so what then is the problem!? Could it be that in 1.5 beta 2… u have to assign a “page” for activity… and thats why its not working right?

    Avatar of tommyhoang
    tommyhoang
    Member

    @tommyhoang

    i wish someone would just develop a plug for this already.

    Avatar of leemour
    leemour
    Member

    @leemour

    @sidjags I have same problem with BP 1.5 beta 2. It seems that adding to favourites works only on activity page but not on post pages. The Favourite link URL is generated correctly.

    Avatar of tommyhoang
    tommyhoang
    Member

    @tommyhoang

    bump for this thread. any updates on a plugin for my favorites

    Bump. @kateM82 code worked fine for me until I updated BuddyPress 1.5. Now when I click the favorite button it only says “the page was not found.” Any help for fixing this?

    Does anyone know why the solutions for adding the favorite button to post pages are now giving 404 errors when you click the button?

    Avatar of 大QQ
    ?QQ
    Member

    @tatterslee

    @r-a-y I upgrade to BP1.5, when hover on a favorite button, the url is correct, but after click it give 404 errors. Please Help~~~~ Thank you very much.

Viewing 25 replies - 26 through 50 (of 52 total)

You must be logged in to reply to this topic.