Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
DownloadsII Create New Thread Add-On Details »»
DownloadsII Create New Thread Add-On
Version: 1.0.2, by CyberRanger CyberRanger is offline
Developer Last Online: Jan 2015 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.6.8 Rating:
Released: 11-06-2006 Last Update: 11-14-2006 Installs: 254
DB Changes Uses Plugins
Additional Files  
No support by the author.

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
  1. Ability to global select the forum that receives the new thread and the userid of the thread creator.
  2. Ability to decide what forum receives the new thread and the thread creator based on the category of the file
  3. Option to have the thread created by the uploader or always assigned to the same user account
  4. Option to never create threads by category
  5. Usergroup permissions for being allowed to create a new thread
  6. Link added between thread in Downloads file detail (optional).
  7. Updated Downloads entry creates new post in thread alerting of an update.
  8. Database link to Downloads file entry removed if thread is deleted.
  9. If the Downloads new entry is placed in moderation, so is the thread.
  10. Option to have new threads locked.
Installation
  1. Upload the files in the upload folder into your forum directory.
  2. From the admincp, import the product file product-dl2_thread.xml
  3. From the admincp, set the options under "DownloadsII - Create Threads"
  4. Be sure to set the usergroup permissions!
  5. Done!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 11-13-2006, 11:25 AM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by klaush View Post
O.k., just had to delete the lines "executionorder" in the xml-file; so it works for 3.5.5.
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.
Reply With Quote
  #33  
Old 11-13-2006, 04:29 PM
Hel_Sir Hel_Sir is offline
 
Join Date: Sep 2006
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #34  
Old 11-13-2006, 04:38 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hel_Sir View Post
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?
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.
Reply With Quote
  #35  
Old 11-13-2006, 05:25 PM
Ohh-Dutch Ohh-Dutch is offline
 
Join Date: Sep 2006
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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');
any idea how u can help?
Reply With Quote
  #36  
Old 11-13-2006, 05:35 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ohh-Dutch View Post
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
any idea how u can help?
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
Reply With Quote
  #37  
Old 11-13-2006, 05:45 PM
Ohh-Dutch Ohh-Dutch is offline
 
Join Date: Sep 2006
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #38  
Old 11-13-2006, 05:52 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ohh-Dutch View Post
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...
No, there isn't a delay. In admincp -> Downloads - Create Threads -> Settings did you set "Always Create New Thread?" to "Yes" and specify a default forumid?

And ... what version of DownloadsII are you running?
Reply With Quote
  #39  
Old 11-13-2006, 06:22 PM
Ohh-Dutch Ohh-Dutch is offline
 
Join Date: Sep 2006
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CyberRanger View Post
No, there isn't a delay. In admincp -> Downloads - Create Threads -> Settings did you set "Always Create New Thread?" to "Yes" and specify a default forumid?

And ... what version of DownloadsII are you running?

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
Reply With Quote
  #40  
Old 11-13-2006, 06:46 PM
CyberRanger's Avatar
CyberRanger CyberRanger is offline
 
Join Date: Mar 2004
Posts: 1,319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ohh-Dutch View Post
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
Your DownloadsII program is at version 5.0.3. You must be at 5.0.4 for this add-on to work.
Reply With Quote
  #41  
Old 11-13-2006, 07:18 PM
Ohh-Dutch Ohh-Dutch is offline
 
Join Date: Sep 2006
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CyberRanger View Post
Your DownloadsII program is at version 5.0.3. You must be at 5.0.4 for this add-on to work.

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...
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:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04643 seconds
  • Memory Usage 2,328KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete