PDA

View Full Version : Problem With attachment plugin..


dip1232001
09-14-2008, 05:10 PM
hello there need a little help
I created a plugin to rate my attachments
here is the plugin details

<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
<plugin active="1" executionorder="5" product="vbulletin">
<title>rate torrent</title>
<hookname>postbit_attachment</hookname>
<phpcode><![CDATA[$myid = $attachment['attachmentid'];

$attachment[rate]=("<p>Rate Torrent</p><form name=\"ratetorrent\" action=\"./rate.php?attachid=$myid \" method=\"POST\" target=\"_blank\" enctype=\"application/x-www-form-urlencoded\">
<p>Video Quality&nbsp;<select name=\"video\" size=\"1\">
<option value=\"1\">1</option>
<option value=\"2\">2</option>
<option value=\"3\">3</option>
<option value=\"4\">4</option>
<option value=\"5\">5</option>
<option value=\"6\">6</option>
<option value=\"7\">7</option>
<option value=\"8\">8</option>
<option value=\"9\">9</option>
<option value=\"10\">10</option>
</select></p>
<p>Audio Quality&nbsp;<select name=\"audio\" size=\"1\">
<option value=\"1\">1</option>
<option value=\"2\">2</option>
<option value=\"3\">3</option>
<option value=\"4\">4</option>
<option value=\"5\">5</option>
<option value=\"6\">6</option>
<option value=\"7\">7</option>
<option value=\"8\">8</option>
<option value=\"9\">9</option>
<option value=\"10\">10</option>
</select></p>
<p>Movie Quality&nbsp;<select name=\"movie\" size=\"1\">
<option value=\"1\">1</option>
<option value=\"2\">2</option>
<option value=\"3\">3</option>
<option value=\"4\">4</option>
<option value=\"5\">5</option>
<option value=\"6\">6</option>
<option value=\"7\">7</option>
<option value=\"8\">8</option>
<option value=\"9\">9</option>
<option value=\"10\">10</option>
</select></p>
&nbsp;&nbsp;&nbsp;<input type=\"submit\" value=\"submit\" name=\"ratetorrent\">

</form>");]]></phpcode>
</plugin>
</plugins>


and here is the postbit_attachment templet i edited as

<tr>
<td><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)</td>
</tr>
<tr><td> </td><td>
<br>
$attachment[tstats]
<br>
$attachment[torrentinfo]
</td>

<if condition="$attachment[torrentinfo]">
<td width="40%">&nbsp;&nbsp;</td>
<td>
$attachment[rate]

</td></if>
</tr>

it looks kind of like this

http://dhamalupload.info/files/1034_kc4aq/my.JPG

now the problem is when ever i klik the submit button it takes me to
http://www.desidhamal.com/inlinemod.php?threadid=30832&p=234458

and it shows You did not select any posts to which the action you picked can be applied.
I am trying when ever any one submit the button it take him to rate.php file ..but it dosent

but the same code does works perfectly in my test site can any one specify why it is happening and what should i do to prevent this..

thank you

Opserty
09-14-2008, 07:14 PM
You can't place forms in the postbit, as they interfere with the in-line moderation (the checkboxes in the corner of the postbit which allow you to select posts).