vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Coding a Auto link submitter for VB (https://vborg.vbsupport.ru/showthread.php?t=184697)

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:

&nbsp;
        <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'>&nbsp;</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

daydie 07-08-2008 11:03 AM

im wanting the above code from PHPBB2 converted into VB...

If some body can do this please reply or PM me.


All times are GMT. The time now is 12:29 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.01218 seconds
  • Memory Usage 1,738KB
  • 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
  • (8)bbcode_code_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