Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2008, 11:02 AM
daydie's Avatar
daydie daydie is offline
 
Join Date: Oct 2007
Posts: 248
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Coding a Auto link submitter for VB

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:



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.



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:



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
Attached Images
File Type: jpg 2.jpg (110.9 KB, 0 views)
File Type: jpg 1.jpg (102.6 KB, 0 views)
Reply With Quote
  #2  
Old 07-08-2008, 11:03 AM
daydie's Avatar
daydie daydie is offline
 
Join Date: Oct 2007
Posts: 248
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:24 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.03686 seconds
  • Memory Usage 2,205KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_attachment
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete