WordPress.org

Ready to get started?Download WordPress

Forums

myCRED
[resolved] BuddyPress Links Request (29 posts)

  1. mucus
    Member
    Posted 4 months ago #

    Hi, is there some code I could add to the BuddyPress Links hook to award or deduct points for either a thumbs up or thumbs down vote? For example if I posted a link and I got 10 thumbs up, I get 5 points for each thumbs up my links receives (so awarded 50 points in he example case), yet if I get 10 thumbs down I lose 10 points for each (so deducted 100 points in this example case).

    I know I can get points for voting on other links, but not sure if I can do what I want to do as in the example above.

    http://wordpress.org/plugins/buddypress-links/

    https://wordpress.org/plugins/mycred/

  2. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Hi.

    I would have to go though the plugin and see how we could accomplish this as I am not that familiar with the plugin.

  3. mucus
    Member
    Posted 4 months ago #

    It would be an awesome hook if you could my friend, allows the MyCred system to punish people for spamming the links directory with rubish links, at the moment they can just vote on any links and get paid points and upload spam links to get points. If this could work somehow the user could stand to lose more points than they gain for posting a bad link, thus making the point system and the BuddyPress Links plugin a strong force for driving quality content. Hope you could do this!

  4. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    If it's ok with you I will have a look at it over the weekend and post you an update on Monday.

  5. mucus
    Member
    Posted 4 months ago #

    Yeah that's cool buddy, thanks for looking into it, I really appreciate it!!

  6. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    I have updated the 1.4 Beta which now includes two new options for this hook allowing you to award / deduct points for up and down votes. Try it out.

  7. mucus
    Member
    Posted 4 months ago #

    Hi gabriel, awesome work on the new version!

    The links (reward/deduct) feature doesn't seem to be working, I've tried it as an admin and a member on a test clone site, but when I look at my history I only see points for adding the link or placing a vote, not awarded for it being voted up or deducted for being voted down.

    Two other things I have noticed:

    1) The leaderboard places me as first and last (although there are only 5 members accounts activated and it's programmed to show 10, so maybe because there isn't ten to display) and
    2) In the profile page of BuddyPress it shows 'Points Balance: %cred% 1000', how do I get rid of the %cred% and just show the balance?

  8. mucus
    Member
    Posted 4 months ago #

    One other thing, with the new referral add-on is there a way to add a box on the register page where members have to input a code/key sent by the 'affiliate' to be able to register? (I'm currently using a plugin called Secure Invites to secure my register page from unwanted members, I have a closed community).

  9. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Ok.

    In your hook settings, did you set a log entry for both up and down votes? Do you award / deduct any other amount then zero?

    Do you get any error messages when you vote on a link?

    I only tested this with BP 1.9.2 and latest version of BP Links.

    1) All widgets got updated in 1.4 so go though each widget you use (that is from myCRED) and save the settings.

    2) You need to update your BuddyPress settings on myCRED > Settings where the balance template no longer supports %cred% . The template is now only used to display any text before the amount.

  10. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Regarding the referral hook, the hook will check for a referral link when the user signs up so there is no need for them to enter any details. If the user has the cookie that is saved when a referral link is detected, this will be detected when the registration process fires.

  11. mucus
    Member
    Posted 4 months ago #

    Awesome, I'll give it a go now!

    So as long as the referral system is on, no other members can join through the register page?... Is that right or no?

    (you really are a true professional btw Gabriel, I really admire your work!)

  12. mucus
    Member
    Posted 4 months ago #

    I awarded 5 points for a vote up and -10 for a vote down, no error messages when voting on a link

  13. mucus
    Member
    Posted 4 months ago #

    Just had a notification to say my link was voted up! :-D

  14. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Does this mean you can get it to work or still having an issue?

  15. mucus
    Member
    Posted 4 months ago #

    I've only got one of the votes to register a points award on the history pager in the profile. I've also updated the widgets and the form to transfer points has vanished within the widget, even though an empty box still shows up

  16. mucus
    Member
    Posted 4 months ago #

    Fixed the %creds% issue and the widget update fixed the duplicate name in leaderboard issue, but transfer and voting issue still remains

  17. mucus
    Member
    Posted 4 months ago #

    There was also a massive delay between voting on the link and receiving the points for my link being voted

  18. mucus
    Member
    Posted 4 months ago #

    It's only registering 1 vote per link, not points per vote (so 3 votes down on 3 different links got me -10 points, when it should have been -10 for each vote, so -30 in total)

    Registered a deduction for a vote down

  19. mucus
    Member
    Posted 4 months ago #

    Multiple deductions now working, seems to all be working now.

    Just the transfer widget issue now

  20. mucus
    Member
    Posted 4 months ago #

    Once I'm done configuring the mycred beta plugin on my test site and it all seems to be working,could I just copy the folder (following the installation instructions) from my test site and upload/replace the deactivated mycred plugin folder on my main site with it keeping the same settings? Would that work?

  21. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    By default, the hook will not award points if you vote on your own link but besides that, each vote should give points as long as the voter is not the author.

    Regarding transfers.

    Does the [mycred_transfer] shortcode work in a post / page content? Both uses the same render engine so if the shortcode shows the widget should show too, unless some custom styling is hiding the content in the widget.

  22. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    You must replicate the update process if you want to update manually.
    So first you disable the myCRED plugin in your admin area.
    Then upload the files to your plugin folder so they get replaced.
    Rename myCRED in the admin area.

    This is because when you enable the plugin, myCRED will update your settings to 1.4. If you just upload your files and replace your current version, old bugs that lurk in the settings might still be around.

  23. mucus
    Member
    Posted 4 months ago #

    Right, I've just tried the shortcode as a custom text widget and n a page and neither are showing up. I do have a piece of code in the site somewhere to allow me to use shortcodes in the Custom Text/HTML widget, would that be causing the problem? (sorry about the delayed response, just got in from work)

  24. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Hey.

    Ok in that case, enable WP_DEBUG in your wp-config.php file and visit the page with the shortcode to see what error message you receive.

    Also make sure you are using the latest beta (version 6).

  25. mucus
    Member
    Posted 4 months ago #

    How do I get access to the BETA forum? (I'll check which version I'm using now)

  26. mucus
    Member
    Posted 4 months ago #

    Yup, version 6. Not sure how to 'enable WP_DEBUG'

  27. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    You open wp-config.php file and locate:

    define( 'WP_DEBUG', false );

    To enable change false into true and save. To disable just change it back from true to false.

    Alternatively if you do not want to "see" the error messages, you can log them into a file. This is a good solution if you want to troubleshoot a live site but dont want users to see ugly error messages that might brake your layout.

    In that case, you need to replace:

    define( 'WP_DEBUG', false );

    with:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    Once you save, WordPress will save all error messages in a file called debug.log which will be saved into your wp-content folder. Make sure you disable WP_DEBUG once you are done troubleshooting otherwise this file might become very big if get a lot of errors or warnings.

  28. mucus
    Member
    Posted 4 months ago #

    WOW, I had a whole load of text on my screen! What part am I looking for?

  29. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    search for mycred in the text to see if there are any mycred related issues.
    Do not post the errors here! You can always contact me via the myCRED.me website if you need to send large texts.

Reply

You must log in to post.

About this Plugin

About this Topic