View Single Post
  #1  
Old 09-14-2008, 04:10 PM
dip1232001 dip1232001 is offline
 
Join Date: Apr 2006
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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



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
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03093 seconds
  • Memory Usage 1,784KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete