vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - DownloadsII Create New Thread Add-On (https://vborg.vbsupport.ru/showthread.php?t=130995)

CyberRanger 11-13-2006 11:25 AM

Quote:

Originally Posted by klaush (Post 1116025)
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.

Hel_Sir 11-13-2006 04:29 PM

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? :D

CyberRanger 11-13-2006 04:38 PM

Quote:

Originally Posted by Hel_Sir (Post 1116407)
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? :D

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.

Ohh-Dutch 11-13-2006 05:25 PM

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?

CyberRanger 11-13-2006 05:35 PM

Quote:

Originally Posted by Ohh-Dutch (Post 1116442)
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!!! :D 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

Ohh-Dutch 11-13-2006 05:45 PM

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...

CyberRanger 11-13-2006 05:52 PM

Quote:

Originally Posted by Ohh-Dutch (Post 1116456)
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?

Ohh-Dutch 11-13-2006 06:22 PM

Quote:

Originally Posted by CyberRanger (Post 1116465)
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

CyberRanger 11-13-2006 06:46 PM

Quote:

Originally Posted by Ohh-Dutch (Post 1116486)
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. :)

Ohh-Dutch 11-13-2006 07:18 PM

Quote:

Originally Posted by CyberRanger (Post 1116518)
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...


All times are GMT. The time now is 01:44 AM.

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.01368 seconds
  • Memory Usage 1,792KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete