daydie |
07-08-2008 11:02 AM |
Coding a Auto link submitter for VB
1 Attachment(s)
What is this mod? Well, here are some screenshots.
First, you can browse over your viewforum. Check out the threads or whatever you want to do. Then you can go into the moderator panel, as we all know:
https://vborg.vbsupport.ru/
Then, once in the moderator panel, there's a "submit" button which you can hit after you've selected any of the threads you want to submit to Katz.
https://vborg.vbsupport.ru/
Then, once you've hit the "Submit" button, it takes us to a new page where you have the following information about the threads you selected:
https://vborg.vbsupport.ru/
How to install
Open templates/subSilver/modcp_body.tpl
Find:
Code:
<input type="submit" name="unlock" class="liteoption" value="{L_UNLOCK}" />
After, add:
Code:
<input type="submit" name="submit" class="liteoption" value="Submit" />
Open modcp.php
Find:
Code:
$unlock = ( isset($HTTP_POST_VARS['unlock']) ) ? TRUE : FALSE;
After, add:
Code:
$submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : FALSE;
Find:
Code:
else if ( $unlock )
{
$mode = 'unlock';
}
After, add:
Code:
else if ( $submit )
{
$mode = 'submit';
}
Find:
Code:
message_die(GENERAL_MESSAGE, $lang['Topics_Unlocked'] . '<br /><br />' . $message);
break;
After, add:
Code:
//
//
//Erratic's Katz.cd submit script.
//http://www.wjunction.com/
//
//
case 'submit':
//Here's some basic settings.
$yoursite = "http://www.pornbb.org/viewtopic.php?t="; //include link to the viewtopic, so everything is there except for the unique ID.
$yoursiteurl = "http://www.pornbb.org/";
$youremail = "youremail@email.com";
$yoursitename = "pornBB";
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$topics = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? $HTTP_POST_VARS['topic_id_list'] : array($topic_id);
//Grab topic titles
$topic_idgrab = '';
for($i = 0; $i < count($topics); $i++)
{
$topic_idgrab .= ( ( $topic_idgrab != '' ) ? ' OR topic_id=' : '' ) . intval($topics[$i]);
}
//Grab our data
$sql = "SELECT topic_id, topic_title
FROM " . TOPICS_TABLE . "
WHERE topic_id = $topic_idgrab
LIMIT $start, " . $board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Touble grabbing data', '', __LINE__, __FILE__, $sql);
}
print "<table width='100%' cellspacing='2' cellpadding='2' border='0' align='center'><tr><td align='left' class='nav'></td></tr></table><table class='forumline' width='100%' cellspacing='1' cellpadding='3' border='0' align='center'><tr><th class='thHead'>Submit Downloads</th></tr>";
print "<tr><td class='row1'><div align='center'><span class='mainmenu'>";
print "<b>Important!</b> Please make sure you check <b><i>ALL</b></i> rules before submitting to Katz. <a href='http://katz.cd/submit.php' taget='_blank'>Click here for the official submission page</a>.";
print "<form name='add' action='http://katz.cd/submit.php' method='POST'>";
while ( $row = $db->sql_fetchrow($result) )
{
$topic_title = $row['topic_title'];
$topic_url = $row['topic_id'];
print "<br /><br />";
print "Download Title: <input type=\"text\" name=\"title[]\" class=\"form\" maxlength=\"70\" size=\"60\" value=\"$topic_title\"> ";
print "Download Url: <input type='text' name='url[]' class='form' maxlength='70' size='50' value='$yoursite$topic_url'> ";
print " <select name='type[]' class=form><option value='App'>App</option><option value='Game'>Game</option><option value='Movie'>Movie</option><option value='TV'>TV</option><option value='Music'>Music</option><option value='XXX'>XXX</option><option value='eBook'>eBook</option><option value='Template'>Template</option><option value='Other'>Other</option></select>";
print " <a href='$yoursite$topic_url' target='_blank' class='mainmenu'>Check Download</a>";
}
print "<br /><br />Site Name: <input type='text' name='sname' class='form' size='30' value='$yoursitename'> Site URL: <input type='text' name='surl' class='form' size='30' value='$yoursiteurl'> Email: <input type='text' name='email' class='form' size='30' value='$youremail'><br />";
print "<br /><input type='Submit' value='Submit Download(s)' class='liteoption'></form>";
print "</div></td></tr><tr><td class='catBottom' height='28'> </td></tr></table>";
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
break;
//
//
//Erratic's Katz.cd submit script.
//http://www.wjunction.com/
//
//
This was made for phpBB2 - I'm yet to upgrade to phpBB3 so I haven't converted this mod
|