“My Favorites” Plugin
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!
@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.
@r-a-y code works great for me, thanks for sharing!
@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
@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?
Is it already possible to use this code for a single 3.x WP install, instead of only on WPMU?
I’m having the weird problem SlaFFik had earlier. Anybody got ideas on why this happens?
The ‘favorite’ link is spitting this out…
the // is where the activity ID is missing.
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!
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
@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 :
Then in the single.php of your these paste the following where you want the favourites to show
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!
@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
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.
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!
@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?
i wish someone would just develop a plug for this already.
@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.
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?
- The topic ‘“My Favorites” Plugin’ is closed to new replies.