XMB Forum Software

Forum Based Post Count Controls hack

Karlie - 2-12-2012 at 12:17 AM

I downloaded this hack Forum Based Post Count Controls and followed the steps but as I got so far it was asking me to change the codes when there wasn't a code called that, Can't seem to get it to work.

Would this be the hack where I can tick the boxes if they are to gain post counts or points in certain forums? Also does anyone know how I can get the top bar centered Where it says Search, FAQ, Member List, Today Posts, Stats?

I've got the following hacks so far:
Birthday one
Shop one
Award system
View poll voters
Minimum Posts Needed
Staff list
Quick Edit

I just need this last one so they can't always gain posts and points so I can let member's join.

Mouser - 2-12-2012 at 09:14 PM

Which code are you looking for that aint there?
And attach the PHP file where it's missing.

Yes, that's that hack.

Karlie - 2-13-2012 at 08:07 PM

Reinstalled the whole thing back to clean and started with this hack first and this one is missing. from step 2:

Code:
$db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-1 WHERE username='".$db->escape_var($orig['author'])."'");


AND everything missing from STEP 4.

Code:
Edit File: topicadmin.php: ============================ ========== Find Code: ========== $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-{$result['pidcount']} WHERE username='".$db->escape_var($result['author'])."'"); ============= Replace With: ============= if ($forums['fpcount'] == 'yes') { $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-{$result['pidcount']} WHERE username='".$db->escape_var($result['author'])."'"); } ========== Find Code: ========== $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-{$result['pidcount']} WHERE username='$dbauthor'"); ============= Replace With: ============= if ($forums['fpcount'] == 'yes') { $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-{$result['pidcount']} WHERE username='$dbauthor'"); } ========== Find Code: ========== $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-1 WHERE username='$dbauthor'"); ============= Replace With: ============= if ($forums['fpcount'] == 'yes') { $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-1 WHERE username='$dbauthor'"); } ========== Find Code: ========== $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum+{$result['pidcount']} WHERE username='".$db->escape_var($result['author'])."'"); ============= Replace With: ============= if ($otherforum['fpcount'] == 'yes') { $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum+{$result['pidcount']} WHERE username='".$db->escape_var($result['author'])."'"); }




miqrogroove - 2-14-2012 at 03:48 AM

Hack probably needs a minor refresh since escape_var would have changed. Mouser, can you handle that?

Mouser - 2-14-2012 at 04:36 PM

Not a problem. I've went through all the steps and verified the coding was still up-to-date. Updated where necessary.

I can't reply to the original thread, so I'll attach it here :)

Attachment: Forum Based Post Count Controls v1.4.zip (9kB)
This file has been downloaded 75 times


miqrogroove - 2-14-2012 at 08:47 PM

Cool.

Updated in SVN.

Updated in the Releases area.

Karlie - 2-15-2012 at 01:21 AM

I did everything it said and it still doesn't work.

miqrogroove - 2-15-2012 at 04:45 AM

It's probably doing what it's supposed to do. What's the problem?

Karlie - 2-15-2012 at 09:33 AM

nothing, There no place for me to stop the post gain or the point gain.

Now i just tried out trying post after doing that hack and this comes up so now i cant post.

Parse error: syntax error, unexpected T_CASE in /home/kawaiist/public_html/post.php on line 811

Mouser - 2-15-2012 at 09:16 PM

Unfortunately, that error means nothing if you don't attach the PHP file for us to check.

Where did you check, to enable/disable post-count on posting?

Karlie - 2-15-2012 at 10:55 PM

I checked in the admin options and than went to forums and more options. Im an admin on another forum and if I do the same pattern it shows me where i can tick or untick a box to gain post counts, But can't get it to work on mine.


Right think I've clicked on finally when we did the forum based post count hack it worked fine but soon as we installed the shop hack it went funny, So we took them both out and just did the shop hack and now the forum count hack won't work. I need both on there but they won't work with each other any tips? I can attack the two files I have the problems with its the post.php & Topicadmin.php that where it normally goes wrong on them two files. When you install the forum hack it okay but soon as you do the shop one and it asks you to find certain codes there the same codes as you placed in the forum post count hack.



Attachment: post.php (68kB)
This file has been downloaded 410 times

Attachment: topicadmin.php (38kB)
This file has been downloaded 417 times


Mouser - 2-16-2012 at 01:01 PM

Correct.
Because both hacks interfere with the query that updates the posts.

When you combine the hacks, a user gets only posts+money, if you set that he's allowed to get posts.


The post.php was missing a bracket. Does this one work?



Attachment: post.php (69kB)
This file has been downloaded 385 times


Karlie - 2-16-2012 at 06:04 PM

Yes thank you it all works perfect now.