PDA

View Full Version : Thread Reply Problem.. HELP!


Thr33
03-24-2010, 12:16 AM
Hey guys ive been having this problem for a couple of weeks and ive looked into it and still i can amend it. Please can anyone help me see whats erroring here and why.

The enclosed screenshot happens when i post a reply in the shares section. Now the shares section has had a little modding with MARCO's Hide BBCode, plus my own postbit editing and reputation system PHP mod.

The error is:
(header)
Warning: Cannot use a scalar value as an array in [path]/includes/class_postbit.php(314) : eval()'d code on line 122
- which is odd because there is no data on like 122

(VBulletin Message)
Unable to add cookies, header already sent.
File: /home/lazyreco/public_html/network/includes/class_core.php
Line: 4372
- which is just the error script

As mentioned i have modded the postbit_legacy (to better allign/display the postbit stats) & the functions_newpost.php (to enable a custom built reputation system for share ratio purposes)

(postbit_legacy)
<vb:if condition="$show['reputation']"><dt>Reputation</dt> <dd>{vb:raw post.reputation} <a class="popupctrl reputation" title="{vb:rawphrase reputation}" href="reputation.php?{vb:raw session.sessionurl}do=addreputation&amp;p={vb:raw post.postid}" rel="nofollow" id="reputation_{vb:raw post.postid}"><img src="http://lazyrecords.net/network/images/rep-plu.gif" alt="{vb:rawphrase reputation}" /></a></dd></vb:if>
- added under usertitle & rank

(functions_newpost.php)
if ($foruminfo[forumid]>3 AND $foruminfo[forumid]<8 OR $foruminfo[forumid]==10 OR $foruminfo[forumid]==11)
{
if ($type == 'thread')
{
$result = $vbulletin->db->query_first("SELECT reputation FROM user WHERE userid =".$vbulletin->userinfo['userid']." ORDER BY userid ASC");
$punkty=$result['reputation']+1;
$vbulletin->db->query_write("UPDATE user SET reputation=".$punkty." WHERE userid=".$vbulletin->userinfo['userid']);
$senderpermissions=0;
$registry =& $vbulletin;
}
if ($type == 'reply')
{
$result = $vbulletin->db->query_first("SELECT reputation FROM user WHERE userid =".$vbulletin->userinfo['userid']." ORDER BY userid ASC");
$punkty=$result['reputation']-1;
$vbulletin->db->query_write("UPDATE user SET reputation=".$punkty." WHERE userid=".$vbulletin->userinfo['userid']);
$senderpermissions=0;
$registry =& $vbulletin;
}
}
- added after

eval(print_standard_redirect('redirect_duplicatepo st', true, true));
}
}
}
}

Can anyone help in seeing where ive made a mistake or how to correct it?? Ive uploaded all files mentioned incase you need a deeper look into it. Thanks in advance.