PDA

View Full Version : i need some help with my addon


AN-net
01-18-2004, 08:15 PM
im currently constructing an addon for vb2 and since there is no help me finish forum anymore i guess ill post here.

anyways i made an addon for showthread.php. well here we go:
this is the error i get:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/anima22/public_html/community/showthread.php on line 485


line 485 is this:

$qaasshow="The file:$qassg['filename'] what posted by $posts['postusername'].<br>To view this file go <a href='attachment.php?attachmentid=$qaasg[attachid]'>here</a><br><form action='qaasupdate.php' method='get'><input type='hidden' name='attachid' value='$qaasg[attachid]' size='10'><input type='radio' name='qaas' value='1'>Approve&nbsp;&nbsp;<input type='radio' name='qaas' value='2'>Disapprove&nbsp;&nbsp;<input type='radio' name='qaas' value='3'>Delete<br><input type='submit' value='Update Attachment'></form>";

and i attached the entire modification i made:)

Xenon
01-18-2004, 08:19 PM
as you are using an array within a string, you should remove the singlequotes of $qassg[filename] and so on :)

AN-net
01-18-2004, 08:24 PM
O.o thanks;)

hmm nothing is showing up>_> i put $qaasshow in my postbit template and nothing is showing up:(

AN-net
01-18-2004, 08:38 PM
ok all the text thats susposed to show is not showing up, anyone know y?

AN-net
01-18-2004, 09:47 PM
ok i updated my coding but nothing shows still, anyone got any ideas?

heres my code:

$qaas= $DB_site->query("SELECT attachment.attachmentid,attachment.filename AS filename,post.postid FROM attachment,post,thread WHERE attachment.visible=0 AND attachment.attachmentid=post.attachmentid AND post.threadid=thread.threadid");
while($qaasg=$DB_site->fetch_array($qaas))
{
if($bbuserinfo[usergroupid]==6)
{
$qaasshow="<td bgcolor='$post[backcolor]' colspan='2' align='left' valign='bottom'>The file:$qassg[filename] what posted by $posts[postusername].<br>To view this file go <a href='attachment.php?attachmentid=$qaasg[attachmentid]'>here</a><br><form action='qaasupdate.php' method='get'><input type='hidden' name='qaaspID' value='$qaasg[postid]'><input type='hidden' name='attachid' value='$qaasg[attachmentid]' size='10'><input type='radio' name='qaas' value='1'>Approve&nbsp;&nbsp;<input type='radio' name='qaas' value='2'>Disapprove&nbsp;&nbsp;<input type='radio' name='qaas' value='3'>Delete<br><input type='submit' value='Update Attachment'></form></td>";
}
else
{
$qaasshow="";
}
}

AN-net
01-18-2004, 10:51 PM
ok i made some changes again, the over all script works but it still wont show its self on the post. i made the code that goes into the post into a template file. i will see how this works. anyways can someone give me some ideas how to solve this?

ok i moved the code from showthread.php to functions.php and it still doesnt show anything>_> only when i do print $qaasshow does it work

AN-net
01-19-2004, 09:36 PM
anyone know y it doesnt display my stuff in my template?