Reputation Points Plugin Ready!

  1. ‹ Older
  2. 2 years ago

    how to install?

  3. This is for g4

  4. last year
    Edited last year by chaos

    @optusru how to install?

    Could be a version issue.
    Can you share details about the version you're using?

  5. AAMAZING!!!
    Your work is very beautiful!!!
    thanks a lot!

    i would give it 4.5 out of 5!

    may I req an extra feature?
    Actually, it is much better if a user can do like point giving
    with restriction that the admin of forum can set,
    like how many points a user can give for one day for one user

    Thank you

  6. @chaos @Felli @vruser
    In this line 'ET::memberModel()->getById($post["memberId"]);' of plugin.php in this function, when it render a post, it will do a sql query to get the user's point, so when the conversation is large, it will do so many sql queries a time. So it made the server exploded,-)

    public function handler_conversationController_formatPostForTemplate($sender, &$formatted, $post, $conversation)
    	{
    		if ($post["deleteTime"]) return;
    		if(!C("plugin.Reputation.showReputationPublic")) return;
    		// Show reputation points next to username on every post
    		$memberRepo = ET::memberModel()->getById($post["memberId"]);
    		$postMemberReputation = "+ ".$memberRepo["reputationPoints"]." RP";
    		$postMemberReputation = "<a href='".URL("reputation")."' class = 'time' title='Reputation Points'>$postMemberReputation</a>";
    		$formatted["info"][] = $postMemberReputation;
    	}
  7. @zgq @Felli @vruser

    Thanks a lot @zgq for pointing this out. I have fixed it. Now there are no extra queries specific to reputation points :)

    I've integrated the query to fetch reputation points data directly into postModel (without altering core files). Please find the fixed version on my github:
    https://github.com/yathish1618/Reputation
    Only one file was modified: plugin.php

    Also attaching the updated folder here, just in case!

  8. 3 weeks ago

    @chaos @zgq @Felli @vruser

    Thanks a lot @zgq for pointing this out. I have fixed it. Now there are no extra queries specific to reputation points :)

    I've integrated the query to fetch reputation points data directly into postModel (without altering core files). Please find the fixed version on my github:
    https://github.com/yathish1618/Reputation
    Only one file was modified: plugin.php

    Also attaching the updated folder here, just in case!

    There is a bug, when u setting member get like from other member and get point, but when they unlike, the point is not taken away, then he get like again and he get point, so he can like and unlike for get much point

  9. @pxnji Thanks for pointing it out. I've fixed. Updated plugin.php

    Please download and update your plugin : https://github.com/yathish1618/Reputation/

  10. @chaos @pxnji Thanks for pointing it out. I've fixed. Updated plugin.php

    Please download and update your plugin : https://github.com/yathish1618/Reputation/

    error 3.png
    i;ve got this error message. Thanks for your help before

  11. Edited 3 weeks ago by chaos

    @pxnji
    Terribly sorry. I made a silly mistake in the code. Fixed it and pushed it on github. Please update your plugin.php file now from github.

    Error was - I had to write unlike instead of like after handler_conversationController (You can see this line in the error message you shared here).

    I've checked this and it's working fine now.

  12. @vruser Suggestion: When you delete a post, it should subtract reputation points as well.

    Can someone please raise this as an issue on github?

  13. @chaos @pxnji
    Terribly sorry. I made a silly mistake in the code. Fixed it and pushed it on github. Please update your plugin.php file now from github.

    Error was - I had to write unlike instead of like after handler_conversationController (You can see this line in the error message you shared here).

    I've checked this and it's working fine now.

    Thanks its work, but we can like ourselves and get RP.

  14. @pxnji
    Good point! Fixed and updated. Please update your plugin.php

    Couple more known issues would be RP doesn't get changed when a post/conversation is deleted.. I don't think I'm taking that up anytime soon though :/

  15. Edited 3 weeks ago by pxnji

    @chaos @pxnji
    Good point! Fixed and updated. Please update your plugin.php

    Couple more known issues would be RP doesn't get changed when a post/conversation is deleted.. I don't think I'm taking that up anytime soon though :/

    Yeah, Thank u very much, this is my first problem and solved.

  16. Edited 3 weeks ago by pxnji

    @chaos
    Plus, doesnt get RP when make a private conversation. i hope u fix it soon. there will be my pleasure

  17. @pxnji @chaos
    Plus, doesnt get RP when make a private conversation. i hope u fix it soon. there will be my pleasure

    I just checked and RP is working just fine for private conversations too. That's because private and regular conversations are not differentiated in this plugin. Can you please check again?

  18. @chaos I just checked and RP is working just fine for private conversations too. That's because private and regular conversations are not differentiated in this plugin. Can you please check again?

    No, i mean not to get RP for private conversation. Sorry for my english

  19. Internal Server Error: error
    Something Went Wrong esoTalk has encountered a fatal error. Try again, or get help. SQL Error (42000, 1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (memberId='1')' at line 2UPDATE et_member SET reputationPoints=reputationPoints + WHERE (memberId='1')	The error occurred near /home/khususjo/public_html/core/lib/ETDatabase.class.php:301299: if (!$statement) { 300: $error = $connection->errorInfo(); 301: throw new Exception("SQL Error (".$error[0].", ".$error[1]."): ".$error[2]."
    
    ".$this->highlightQueryErrors($query, $error[2])."
    "); 302: } 303: BacktraceETDatabase->query() [/home/khususjo/public_html/core/lib/ETSQLQuery.class.php:683]ETSQLQuery->exec() [/home/khususjo/public_html/addons/plugins/Reputation/plugin.php:199]ETPlugin_Reputation->updateReputationPoints() [/home/khususjo/public_html/addons/plugins/Reputation/plugin.php:157]ETPlugin_Reputation->handler_conversationModel_createAfter()call_user_func_array() [/home/khususjo/public_html/core/lib/ET.class.php:145]ET::trigger() [/home/khususjo/public_html/core/lib/ETPluggable.class.php:67]ETPluggable->trigger() [/home/khususjo/public_html/core/models/ETConversationModel.class.php:677]ETConversationModel->create() [/home/khususjo/public_html/core/controllers/ETConversationController.class.php:412]ETConversationController->action_start()call_user_func_array() [/home/khususjo/public_html/core/lib/ETController.class.php:181]ETController->dispatch() [/home/khususjo/public_html/core/bootstrap.php:326]require() [/home/khususjo/public_html/index.php:19]Additional Information esoTalk Version (code) 1.0.0g5 esoTalk Version (config) 1.0.0g5 PHP Version 5.6.29 Operating System Linux Server Software Apache Referer http://buku.web.id/conversation/start User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Request URI /?p=conversation/start.ajax

    New problem comes, @chaos . please help..

  20. 2 weeks ago

    @pxnji Internal Server Error: error Something Went Wrong esoTalk has encountered a fatal error. Try again, or get help. SQL Error (42000, 1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE (memberId='1')' at line 2UPDATE et_member SET reputationPoints=reputationPoints + WHERE (memberId='1') The error occurred near /home/khususjo/public_html/core/lib/ETDatabase.class.php:301299: if (!$statement) { 300: $error = $connection->errorInfo(); 301: throw new Exception("SQL Error (".$error[0].", ".$error[1]."): ".$error[2]." ".$this->highlightQueryErrors($query, $error[2])." "); 302: } 303: BacktraceETDatabase->query() [/home/khususjo/public_html/core/lib/ETSQLQuery.class.php:683]ETSQLQuery->exec() [/home/khususjo/public_html/addons/plugins/Reputation/plugin.php:199]ETPlugin_Reputation->updateReputationPoints() [/home/khususjo/public_html/addons/plugins/Reputation/plugin.php:157]ETPlugin_Reputation->handler_conversationModel_createAfter()call_user_func_array() [/home/khususjo/public_html/core/lib/ET.class.php:145]ET::trigger() [/home/khususjo/public_html/core/lib/ETPluggable.class.php:67]ETPluggable->trigger() [/home/khususjo/public_html/core/models/ETConversationModel.class.php:677]ETConversationModel->create() [/home/khususjo/public_html/core/controllers/ETConversationController.class.php:412]ETConversationController->action_start()call_user_func_array() [/home/khususjo/public_html/core/lib/ETController.class.php:181]ETController->dispatch() [/home/khususjo/public_html/core/bootstrap.php:326]require() [/home/khususjo/public_html/index.php:19]Additional Information esoTalk Version (code) 1.0.0g5 esoTalk Version (config) 1.0.0g5 PHP Version 5.6.29 Operating System Linux Server Software Apache Referer http://buku.web.id/conversation/start User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Request URI /?p=conversation/start.ajax
    New problem comes, @chaos . please help..

    Can u help me? @Felli

  21. 2 days ago
    Edited 2 days ago by chaos

    @pxnji This error is happening because of incorrect updation. Can you please disable and re-enable the plugin?

    Go to Administration-> Plugins -> Uncheck Reputation plugin
    Then go to Administration -> Plugins -> Check Reputation plugin to enable it.

    Also, please make sure to have the latest reputation folder from github.

    Please let me know if this doesn't work!

 

or Sign Up to reply!