Karlie
Member
Posts: 10
Registered: 2-9-2012
Member Is Offline
|
|
Forum Based Post Count Controls hack
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
XMB Contributor
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
Which code are you looking for that aint there?
And attach the PHP file where it's missing.
Yes, that's that hack.
|
|
Karlie
Member
Posts: 10
Registered: 2-9-2012
Member Is Offline
|
|
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
|
|
Hack probably needs a minor refresh since escape_var would have changed. Mouser, can you handle that?
|
|
Mouser
XMB Contributor
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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
|
|
Cool.
Updated in SVN.
Updated in the Releases area.
|
|
Karlie
Member
Posts: 10
Registered: 2-9-2012
Member Is Offline
|
|
I did everything it said and it still doesn't work.
|
|
miqrogroove
|
|
It's probably doing what it's supposed to do. What's the problem?
|
|
Karlie
Member
Posts: 10
Registered: 2-9-2012
Member Is Offline
|
|
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
XMB Contributor
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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
Member
Posts: 10
Registered: 2-9-2012
Member Is Offline
|
|
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 409 timesAttachment: topicadmin.php (38kB) This file has been downloaded 414 times
|
|
Mouser
XMB Contributor
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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 384 times
|
|
Karlie
Member
Posts: 10
Registered: 2-9-2012
Member Is Offline
|
|
Yes thank you it all works perfect now.
|
|