Hyperz' simple DDL Submitter

Status
Not open for further replies.

Hyperz

Active Member
Veteran
2,473
2009
604
20,255
e73400untitled2.png


Foreword:

This is really simple program I wrote because basically I needed something like this. I decided to share it here in case other people want to use it. Whether or not this tool will be useful for you depends on what DDL sites you submit to. The program requires a mod for your forum. I have written one for IPB 2.3.6 (based on JmZ's IPB autosubmitter, so I have to give him some credit). If you don't use IPB your not gonna be able to use it unless someone makes a mod for your forum software (which should be fairly easy).

Installing the IPB mod:

--- OPEN TEMPLATE BIT (Forum Index -> TableEnd) ---

Find:
Code:
<option value="unapprove">{$this->ipsclass->lang['cpt_unapprove']}</option>

Add below:
Code:
<option value="ddlsubmit">DDL Submit</option>

--- OPEN sources/action_public/moderate.php ---

Find:
PHP:
				case 'merge':
					$this->multi_topic_merge();
					break;

Add below:
PHP:
				case 'ddlsubmit':
					$this->ddlsubmit();
					break;

Find:
PHP:
	/*-------------------------------------------------------------------------*/
	// Multi Merge Topics
	/*-------------------------------------------------------------------------*/

Add above (NOTE: replace my_submissions.txt with your file name. This also requires PHP 5):
PHP:
	/*-------------------------------------------------------------------------*/
	// DDL Submitter
	/*-------------------------------------------------------------------------*/
	
	function ddlsubmit()
	{
		// == CONFIG ============================================================ //
		
		$ddlsubmit_filename = "my_submissions.txt";
		
		// == SCRIPT ============================================================ //
		
		// If you ain't got mod powerz, your ass is outa here =)
		if ($this->ipsclass->member['is_mod'] != 1)
		{
			$this->moderate_error();
			return;
		}
		
		$ddlsubmit_output		= "";
		$ddlsubmit_split		= "\000";
		$ddlsubmit_nl			= "\n";
		
		// Play sex games with the DB <3
		$this->ipsclass->DB->simple_construct(array(
			'select'	=> 'tid, title',
			'from'		=> 'topics',
			'where'		=> 'tid IN (' . implode(",", $this->tids) . ')',
			'order'		=> 'tid asc'
		));
		
		// Go get it
		$this->ipsclass->DB->simple_exec();
		
		// Build the submissions
		while ($r = $this->ipsclass->DB->fetch_row())
		{
			$ddlsubmit_output .= $r['title'] . $ddlsubmit_split . $r['tid'] . $ddlsubmit_nl;
		}
		
		// Write data (function is PHP >= 5)
		file_put_contents(ROOT_PATH . $ddlsubmit_filename, $ddlsubmit_output);
		
		// The only true promise in life :'(
		die('<div align="center" style="margin-top:100px;font-family:verdana;text-align:center;">All done!<br /><a href="' . $this->ipsclass->base_url . '">Return Home</a></div>');
	}

The mod is now installed. You can now select topics (multi moderate) you wish to submit and it will generate a file in
Code:
http://myforum.com/my_submissions.txt
You'll need that file for the program.

Program Download & Usage:

Get the program here:
Code:
http://rapidshare.com/files/250644772/DDLSubmit.rar

The program itself should be pretty straight forward.
  1. Open the program
  2. Set your site name, email etc...
  3. Set the "format", example: http://yoursite.com/forum_root/index.php?showtopic={0} (the {0} will be replaced with the topic ID)
  4. Set the file url (example: http://myforum.com/my_submissions.txt)
  5. Click the load button
  6. Click the process button
  7. Submit your downloads

A note: When you click the submit button on the web pages ONLY CLICK ONCE. The page will stay the same for up to a minute before the result page is displayed.

That's all folks. Enjoy it or throw it away, you decide :p.
 
17 comments
Niceee, tested it and i works perfectly, but if you would be kind enough to write a mod for Vbulletin it would be perfect.
 
I can't. I know IPB inside out but vBulletin is something I have little experience with. But I'm sure anyone with some vB and php knowledge can easily port this to vB.

Another thing I'd like to add is that this makes it possible to move the whole process of submitting to the client side. What I mean is that in the future the application itself could become the autosubmitter without having to use these extremely slow sites. Not to mention the other advantages of moving the whole thing to a desktop program (threading ftw).

What you see here is really a prototype/concept program.
 
Status
Not open for further replies.
Back
Top