Karlie
Member
Posts: 10
Registered: 2-9-2012
Member Is Offline
|
|
Shop hack
Hi, I can't seem to find the following codes with the shop hack v.3 in the the topic admin php file.
It asks me to find these code's but can't find them. I also have the forum hack on so been trying to combine them so they work would someone be able
to check this for me please I got as far as step 9:
When I think ive found these too it says this -
Parse error: syntax error, unexpected T_CASE in /home/kawaiist/public_html/topicadmin.php on line 251
Code: | while($result = $db->fetch_array($query)) {
$db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-{$result['pidcount']} WHERE username='".$db->escape($result['author'])."'");
}
********************************
* Replace With:
********************************
$query2 = $db->query("SELECT author FROM ".X_PREFIX."posts WHERE tid=$tid ORDER BY dateline LIMIT 1");
if (1 == $db->num_rows($query2)) {
$firstauthor = $query2['author'];
} else {
$firstauthor = '';
}
while($result = $db->fetch_array($query)) {
$postcountmoney = (int)$result['pidcount'] * (int)$SHOP['spd']; //calculate money to subtract
if ($result['author'] == $firstauthor) $postcountmoney += (int)$SHOP['std'] - (int)$SHOP['spd'];
$db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-{$result['pidcount']}, money=money-$postcountmoney WHERE username='".$db->escape($result['author'])."'");
}
********************************
* Find Code:
********************************
$db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-{$result['pidcount']} WHERE username='$dbauthor'");
********************************
* Replace With:
********************************
$postcountmoney = (int)$result['pidcount'] * (int)$SHOP['spd']; //calculate money to subtract
$db->query("UPDATE ".X_PREFIX."members SET postnum=postnum-{$result['pidcount']}, money=money-$postcountmoney WHERE username='$dbauthor'");
==================================================================================================== |
Attachment: topicadmin(2).php (39kB) This file has been downloaded 425 times
|
|
miqrogroove
XMB 1.9.12 Lead Developer
Posts: 469
Registered: 10-1-2002
Location: Florida
Member Is Offline
Mood: Past Three O'Clock
|
|
I can update the hack.. brb
|
|
miqrogroove
XMB 1.9.12 Lead Developer
Posts: 469
Registered: 10-1-2002
Location: Florida
Member Is Offline
Mood: Past Three O'Clock
|
|
Shop v3.4 now. The only changes are in two files mentioned, plus the instructions for topicadmin.php are updated.
[XMB 1.9.11] Shop v3.4
|
|
Karlie
Member
Posts: 10
Registered: 2-9-2012
Member Is Offline
|
|
Thank you, ill re do that now
|
|
Sarahhuh
New Poster
Posts: 4
Registered: 2-11-2012
Member Is Offline
|
|
Hi, I'm a co owner to Karlies forum, and we've be having issues with moderation. We can't move, close or do any other moderation to any posts. This
error comes up:
Parse error: syntax error, unexpected T_CASE in /home/kawaiist/public_html/topicadmin.php on line 251
and this is what's on that line:
case 'close':
|
|
Daniel Gouveia
XMB International Support
Posts: 64
Registered: 4-10-2007
Location: Portugal, Braga
Member Is Offline
Mood: |Catch Me If You Can|
|
|
Enjoy it Attachment: topicadmin.php (42kB) This file has been downloaded 451 times
|
|
Sarahhuh
New Poster
Posts: 4
Registered: 2-11-2012
Member Is Offline
|
|
thank you so much! it works!
|
|