Custom Post Reputation

← News & Stuff — Started 26 Aug, 2010

(31 Aug, 2010 12:38 am)xomp Wrote:  One question though, is there any way to disable to message about "Thank's for voting on users post" message when you actually rank a post? Much like how it's used here would be ideal Smile

That message should only appear if you have javascript switched off or there is a problem with the 'ajax'. To turn it off, you'll need to either switch off friendly redirects or make an edit in the m_custompostrep.php file:

Line 664:
Code:
// Display a nicer message for our non-ajax users...
$string = $lang->sprintf($lang->pt_rated_normal, $post['username']);

to

Code:
// Display a nicer message for our non-ajax users...
$mybb->settings['redirects'] = 0;
$string = $lang->sprintf($lang->pt_rated_normal, $post['username']);

(31 Aug, 2010 12:38 am)xomp Wrote:  On a side note, are rankings stored by IP address in the db? Reason I asked is because me and my fiance moderate our forums and I was showing her the new system and everything said "Rated!" for her even though she didn't rank any posts lol. Is there a way around this by chance?

Yes, it is stored as an IP address. I wanted to provide a way to ensure that duplicate votes were very hard to do (and it helps protect duplicates when guest posting is on). To change this alter line 397:

Code:
$query = $db->simple_select("myn_postreptags_log", "*", "uid = '".$mybb->user['uid']."' OR uid = '0' AND ipaddress = '".$db->escape_string($mybb->session->ipaddress)."'");

This change will mean it will only check against IP address when there is a guest vote from the same IP address. I think. Give it a try and let me know how it goes (and I might figure out a way to put this in the code permanently).

As for the Admin CP errors, if you re-download the Custom Post Reputation Feature you should be OK. I forgot to reset the language. Shy
0  
JonP
31 Aug, 2010, 2:40 pm (This post was last modified: 31 Aug, 2010 2:59 pm by JonP.)
This is weird, when i try and turn this feature on, it tries to search in the MyBB languages folder and says this file doesn't exist in the network/languages/admin or english.


Edit: i can turn it on but i see no changes :/
0  
(31 Aug, 2010 7:48 am)Tomm Wrote:  That message should only appear if you have javascript switched off or there is a problem with the 'ajax'. To turn it off, you'll need to either switch off friendly redirects

Thanks, I just now realized that when I do rate a post I don't get the little pop-up saying "Please wait" like it does here. I really don't know why that doesn't work as I don't recall really messing with javascript/ajax support on the webserver.

I've switched off Friendly URL Redirecting in the AdminCP and that has squashed the issue with it showing the "Thanks for ranking users Post" but it throws the person back to the top of the page heh

I'm really unsure how to troubleshoot this ajax or javascript problem I have, I'm really unable to find anything in the AdminCP regarding them.
0  
(31 Aug, 2010 2:40 pm)JonP Wrote:  Edit: i can turn it on but i see no changes :/

Check out Using Custom Post Reputation.


(31 Aug, 2010 3:17 pm)xomp Wrote:  I'm really unsure how to troubleshoot this ajax or javascript problem I have, I'm really unable to find anything in the AdminCP regarding them.

It's an easy one. Tongue

The feature looks for the end of the popup_menu.js?ver=1600 to add in the javascript, and your forum is using the 1.4 version of it. Best thing is to change the m_custompostrep.php feature file (the $find variable is at the bottom of the custompostrep_showthread function)...
0  
JonP
31 Aug, 2010, 5:44 pm (This post was last modified: 31 Aug, 2010 5:44 pm by JonP.)
I got all the tags i wanted made, it's turned on, maybe something is missing in the template?
0  
(31 Aug, 2010 5:44 pm)JonP Wrote:  I got all the tags i wanted made, it's turned on, maybe something is missing in the template?

Have you selected which forums will be using the tags?
0  
JonP
31 Aug, 2010, 8:11 pm (This post was last modified: 31 Aug, 2010 8:25 pm by JonP.)
Ya and i selected the usergroups as well.

Edit: all solved, i guess never checking the updated templates and reverting them to the original always leads to support Tongue
0  
Ahhh indeed. Didn't think about having somethings like that removed. You could always alter the feature file to suit any changes, but glad you figured it out!
0  
xomp
1 Sep, 2010, 12:24 am (This post was last modified: 1 Sep, 2010 12:31 am by xomp.)
(31 Aug, 2010 5:38 pm)Tomm Wrote:  
(31 Aug, 2010 2:40 pm)JonP Wrote:  Edit: i can turn it on but i see no changes :/

Check out Using Custom Post Reputation.


(31 Aug, 2010 3:17 pm)xomp Wrote:  I'm really unsure how to troubleshoot this ajax or javascript problem I have, I'm really unable to find anything in the AdminCP regarding them.

It's an easy one. Tongue

The feature looks for the end of the popup_menu.js?ver=1600 to add in the javascript, and your forum is using the 1.4 version of it. Best thing is to change the m_custompostrep.php feature file (the $find variable is at the bottom of the custompostrep_showthread function)...

Hmm, I did have quiet a few issues when upgrading from 1.4 to 1.6 (enough so that Mr. Gordon had to debug directly from my dedicated server). Is there anyway at all to use 1.6's javascript? heh I changed the $find variable in m_custompostrep.php to 1.4
Code:
$find = 'popup_menu.js?ver=1400"></script>';
but I would really like to find a way to fix the fact my site is using 1.4 stuff when I'm upgraded to 1.6 haha

Thanks!
0  
The references to that js are in the header and headerinclude I think. Are you using custom templates there that needed reverting?
[Image: leelink.gif]
( Loves Opera 11.50)
0  

User(s) browsing this thread: 1 Guest(s)