The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
DownloadsII Create New Thread Add-On Details »» | |||||||||||||||||||||||||
What does it do?
When a user uploads or updates a file via DownloadsII a thread is created or updated in the specificed forum. DownloadsII Create New Thread Add-On, is not a stand-alone mod. It requires DownloadsII 5.0.4 or higher. You can find it here: https://vborg.vbsupport.ru/showthread.php?t=120122 (free) Features
Show Your Support
|
Comments |
#32
|
||||
|
||||
Sorry, I forgot to remove that after exporting the product file. The product file in the attached zip has the "executionorder" removed so the product will install fine with vb ver 3.5.x and up.
|
#33
|
|||
|
|||
Ok, n00bish question.. I saw you could set a global ForumID for where to post the new download.. So, I take that as its the display order or? I get an error stating: Sorry! This forum is not accepting new posts.
Where did I go wrong? |
#34
|
||||
|
||||
When you click into a forum, the forumid is displayed at the end of the url. For example, "forum/forumdisplay.php?f=7" is a forum with a forumid of 7.
|
#35
|
|||
|
|||
Code:
Database error in vBulletin 3.5.4: Invalid SQL: ### INSERT QUERY GENERATED BY fetch_query_sql() ### INSERT INTO plugin (`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`) VALUES ('1', '5', 'DownloadsII Create Thread on Edit', 'dl_post_upload_edit', 'global $vbulletin;\r\n$cat = $db->query_first(\"SELECT category, dl_forumid_cat, dl_userid_cat, dl_no_threads, dl_threadid\r\n FROM \" . TABLE_PREFIX . \"dl_cats, \" . TABLE_PREFIX . \"dl_files\r\n WHERE \" . TABLE_PREFIX . \"dl_cats.id = \". TABLE_PREFIX . \"dl_files.category AND\r\n \" . TABLE_PREFIX . \"dl_files.id=\".$db->sql_prepare($_GET[\'id\']));\r\n\r\n// only try to build new thread if we have a forumid greater than zero, thread creation permitted, and no existing thread\r\n \r\nif (($vbulletin->options[\'downloadsii_createthread_default_forumid\'] > 0 OR $cat[\'dl_forumid_cat\'] > 0) AND $cat[\'dl_no_threads\'] == 0 AND ($permissions[\'dl2_threadpermissions\'] & $vbulletin->bf_ugp[\'dl2_threadpermissions\'][\'cancreatethreads\']) AND $cat[\'dl_threadid\'] < 1 )\r\n{\r\n $id = $_GET[\'id\'];\r\n\r\n if ($cat[\'dl_forumid_cat\'] > 0)\r\n {\r\n $foruminfo = fetch_foruminfo(&$cat[\'dl_forumid_cat\'], 1);\r\n } else {\r\n $foruminfo = fetch_foruminfo(&$vbulletin->options[\'downloadsii_createthread_default_forumid\'], 1);\r\n }\r\n \r\n \r\n\r\n if (!$foruminfo[\'forumid\'])\r\n {\r\n eval(standard_error(fetch_error(\'invalidid\', $vbphrase[\'forum\'], $vbulletin->options[\'contactuslink\'])));\r\n }\r\n \r\n if (!$foruminfo[\'allowposting\'] OR $foruminfo[\'link\'] OR !$foruminfo[\'cancontainthreads\'])\r\n {\r\n eval(standard_error(fetch_error(\'forumclosed\')));\r\n }\r\n \r\n \r\n $forumperms = fetch_permissions($foruminfo[\'forumid\']);\r\n if (!($forumperms & $vbulletin->bf_ugp_forumpermissions[\'canpostnew\']))\r\n {\r\n print_no_permission();\r\n }\r\n \r\n \r\n // determine the userid to use\r\n if ($cat[\'dl_userid_cat\'] > 0)\r\n {\r\n $userid = $cat[\'dl_userid_cat\'];\r\n \r\n } elseif ($vbulletin->options[\'downloadsii_createthread_default_userid\'] > 0){\r\n \r\n $userid = $vbulletin->options[\'downloadsii_createthread_default_userid\'];\r\n \r\n } else {\r\n \r\n $userid = $vbulletin->userinfo[\'userid\'];\r\n }\r\n \r\n $userstuff = fetch_userinfo($userid,1);\r\n $forumid = $foruminfo[\'forumid\'];\r\n $postuserid = $userstuff[\'userid\'];\r\n $username = $userstuff[\'username\'];\r\n /* $pagetext = $_POST[\'desc\']; */\r\n /* $title = $_POST[\'dname\']; */\r\n eval(\'$pagetext .= \"\' . fetch_template(\'downloadii_create_newthread\') . \'\";\');\r\n eval(\'$title .= \"\' . fetch_template(\'downloadii_create_newthread_title\') . \'\";\');\r\n \r\n $allowsmilie = \'1\';\r\n \r\n if ($_POST[\'purgatory\'] == 1)\r\n {\r\n $visible = 0;\r\n } else {\r\n $visible = 1;\r\n } \r\n \r\n // code to create new thread\r\n require_once(DIR . \'/includes/functions_databuild.php\'); /* included to build new thread and update counters */ \r\n $threaddm =& datamanager_init(\'Thread_FirstPost\', $vbulletin, ERRTYPE_ARRAY, \'threadpost\');\r\n $threadinfo = array();\r\n \r\n $threaddm->set_info(\'forum\', $foruminfo);\r\n $threaddm->set_info(\'thread\', $threadinfo);\r\n $threaddm->setr(\'forumid\', $forumid);\r\n $threaddm->setr(\'userid\', $userid);\r\n $threaddm->setr(\'pagetext\', $pagetext);\r\n $threaddm->setr(\'title\', $title);\r\n $threaddm->set(\'allowsmilie\', $allowsmilie);\r\n $threaddm->set(\'visible\', $visible);\r\n \r\n $threaddm->pre_save();\r\n if(count($threaddm->errors) < 1)\r\n {\r\n $threadid = $threaddm->save();\r\n unset($threaddm);\r\n build_thread_counters($threaddm);\r\n } else {\r\n eval(standard_error(fetch_error($threaddm->errors, $vbphrase[\'forum\'], $vbulletin->options[\'contactuslink\'])));\r\n }\r\n \r\n build_forum_counters($foruminfo[\'forumid\']); \r\n // end code to create new thread\r\n\r\n if ($threadid > 0)\r\n {\r\n $db->query_write(\"UPDATE \" . TABLE_PREFIX . \"dl_files SET `dl_threadid`=\'\".$threadid.\"\' WHERE `id`=\".$db->sql_prepare($id));\r\n eval(\'$desc_new .= \"\' . fetch_template(\'downloadii_create_newthread_desc\') . \'\";\');\r\n $db->query_write(\"UPDATE \" . TABLE_PREFIX . \"dl_files SET `description`=\'\".$desc_new.\"\' WHERE `id`=\".$db->sql_prepare($id));\r\n }\r\n \r\n\r\n}elseif (($vbulletin->options[\'downloadsii_createthread_default_forumid\'] > 0 OR $cat[\'dl_forumid_cat\'] > 0) AND $cat[\'dl_no_threads\'] == 0 AND ($permissions[\'dl2_threadpermissions\'] & $vbulletin->bf_ugp[\'dl2_threadpermissions\'][\'cancreatethreads\']) AND $cat[\'dl_threadid\'] > 0 )\r\n{\r\n\r\n require_once(\'./includes/class_dm.php\');\r\n require_once(\'./includes/class_dm_threadpost.php\');\r\n \r\n $postdm = new vB_DataManager_Post($vbulletin, ERRTYPE_STANDARD);\r\n \r\n $postthreadid = $cat[\'dl_threadid\'];\r\n // determine the userid to use\r\n if ($cat[\'dl_userid_cat\'] > 0)\r\n {\r\n $userid = $cat[\'dl_userid_cat\'];\r\n \r\n } elseif ($vbulletin->options[\'downloadsii_createthread_default_userid\'] > 0){\r\n \r\n $userid = $vbulletin->options[\'downloadsii_createthread_default_userid\'];\r\n \r\n } else {\r\n \r\n $userid = $vbulletin->userinfo[\'userid\'];\r\n }\r\n \r\n $userstuff = fetch_userinfo($userid,1);\r\n $postuserid = $userstuff[\'userid\'];\r\n $id = $_GET[\'id\'];\r\n\r\n \r\n $threadinfo = fetch_threadinfo($postthreadid);\r\n $foruminfo = fetch_foruminfo($threadinfo[\'forumid\']);\r\n \r\n if (!$foruminfo[\'forumid\'])\r\n {\r\n eval(standard_error(fetch_error(\'invalidid\', $vbphrase[\'forum\'], $vbulletin->options[\'contactuslink\'])));\r\n }\r\n \r\n if (!$foruminfo[\'allowposting\'] OR $foruminfo[\'link\'] OR !$foruminfo[\'cancontainthreads\'])\r\n {\r\n eval(standard_error(fetch_error(\'forumclosed\')));\r\n }\r\n \r\n \r\n $forumperms = fetch_permissions($foruminfo[\'forumid\']);\r\n if (!($forumperms & $vbulletin->bf_ugp_forumpermissions[\'canpostnew\']))\r\n {\r\n print_no_permission();\r\n }\r\n \r\n eval(\'$postpagetext .= \"\' . fetch_template(\'downloadii_create_post\') . \'\";\');\r\n \r\n $postdm->set_info(\'forum\', $foruminfo);\r\n $postdm->set_info(\'thread\', $threadinfo); \r\n $postdm->set(\'threadid\', $postthreadid);\r\n //$postdm->set(\'username\', $postusername);\r\n // Use $postusername if posting as a guest, use $postuserid if posting as a user\r\n $postdm->set(\'userid\', $postuserid);\r\n $postdm->set(\'pagetext\', $postpagetext);\r\n $postdm->set(\'allowsmilie\', 1);\r\n $postdm->set(\'visible\', 1);\r\n $postdm->set(\'dateline\', TIMENOW);\r\n $postdm->save();\r\n unset($postdm); \r\n require_once(DIR . \'/includes/functions_databuild.php\');\r\n build_forum_counters($threadinfo[\'forumid\']); \r\n}', 'dl2_thread'); |
#36
|
||||
|
||||
Yes, I can stop being an idiot!!! Sorry, I missed one of the "executionorder" statements that cause the install to blow-up for vb 3.5.x. Please download the newly attached producted file, unzip it, and install product-dl2_thread.xml
|
#37
|
|||
|
|||
Okay It Fixed The DB Problem, But When I Add Something, It DOesnt Show The New Thread... Is There A Certain Amount Of TIme? I Also Edited Usergroup Permissions As Well.... And Vbulletin Options...
|
#38
|
||||
|
||||
Quote:
And ... what version of DownloadsII are you running? |
#39
|
|||
|
|||
Quote:
Yes I Put Forum ID: 14, Set TO Yes... But How Do i Check What Version Im Running? Here Check It Out... http://www.dubicon.com/board Heres A Test Name: username=Judge 1 Pass=Judge |
#40
|
||||
|
||||
Quote:
|
#41
|
|||
|
|||
Quote:
LOL, All That And I Cant Even Use It, I Get A Fatal Error Becuz Of Psionic Visions Battle Hack, WHich Also Interferes With The Mod Application Hack, Anything Used To Make A Thread Wont Work, If I Didnt Have A Rap Website, I Would Uninstall It, But Thanks Anyways, I Still Use Download II And Have Upgraded... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|