<?php
/**
* [R]andom [T]hread [G]enerator 1.0
* Copyright 2010, Jordan Lovelle
* http://mybbrunway.com
*
* You may not redistribute this plugin without my consent.
* You must keep my copyright in at all times.
**/
if(!defined("IN_MYBB"))
{
die("Nice try. You can't access this file directly, idiot.");
}
function rtg_info()
{
return array(
"name" => "Random Thread Generator",
"description" => "Generate a random thread and place it on the index.",
"website" => "http://mybbrunway.com",
"author" => "Jordan Lovelle",
"authorsite" => "http://mybbrunway.com",
"version" => "1.0",
"guid" => "",
"compatibility" => ""
);
}
function rtg_activate()
{
global $db;
$rtg_group = array(
'gid' => 'NULL',
'name' => 'rtg',
'title' => 'Random Thread Generator',
'description' => 'Settings for the Random Thread Generator plugin.',
'disporder' => "1",
'isdefault' => 'no'
);
$db->insert_query('settinggroups', $rtg_group);
$gid = $db->insert_id();
$rtg_setting = array(
'sid' => 'NULL',
'name' => 'enabled_rtg',
'title' => 'Enable?',
'description' => 'If yes, the random thread will be generated. If not, it will not be.',
'optionscode' => 'yesno',
'value' => '1',
'disporder' = 1,
'gid' => intval($gid),
);
$db->insert_query('settings', $rtg_setting);
rebuild_settings();
$rtg_setting = array(
'sid' => 'NULL',
'name' => 'fid_rtg',
'title' => 'Enter the FID',
'description' => 'Only enter the FID <i>Number</i>.',
'optionscode' => 'text',
'value' => '1',
'disporder' = 1,
'gid' => intval($gid),
);
$db->insert_query('settings', $rtg_setting);
rebuild_settings();
}
?>