vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Problem With attachment plugin.. (https://vborg.vbsupport.ru/showthread.php?t=190915)

dip1232001 09-14-2008 05:10 PM

Problem With attachment plugin..
 
hello there need a little help
I created a plugin to rate my attachments
here is the plugin details

PHP Code:

<?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

HTML Code:

<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
HTML Code:

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).


All times are GMT. The time now is 07:25 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00955 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete