vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vBSupport v2.0.0 Beta 2 (https://vborg.vbsupport.ru/showthread.php?t=94023)

Magnetism 12-14-2006 07:41 AM

Getting the error

Warning: Invalid argument supplied for foreach() in /vbsupport.php on line 391

When posting a new ticket, any ideas on how to fix this?

sinisterpain 12-24-2006 01:19 PM

Has anyone found or resolved the problem with Categorys not working in 3.6.4. Is CMX still working on this hack since it is a useful tool for a lot of forums.

sinisterpain 12-31-2006 09:03 PM

It appears to me just going thru the code in functions_vbsupport that some thing here is not right. It will not read the datastore for the variables. Not a coder so I can not figure out why the categories are not displaying. The author seems to have disapeared and while it its functional in 3.6.4 without categories it much more beneficial if they were too work. Would greatly appreciate any help. If its wrong to post this, I appologize

Code:

// function to build the category options
function vbsupport_build_category_options($selcatid)
{
  global $vbulletin, $vbphrase, $show;

  // clear out $categoryoptions
  $categoryoptions = '';
  //check if they are allowed to change ticket categories
    $show['category'] = false;
  if (!empty($vbulletin->vbs_category) && is_array($vbulletin->vbs_category))
      {

    // always set this first value
    $categoryoptions = "<option value=0>" . $vbphrase['vbsupport_none'] . "</option>";

    // process all of the vbs_category
    foreach($vbulletin->vbs_category AS $categoryid => $category)
    {
      // check if this category is accessible
      if (($category['active'] > 0) AND vbsupport_check_allowed($vbulletin->userinfo, $category['allowedgroups'], $category['deniedgroups']))
      {
        // check if its integrated with vbbux / vbplaza
        if ($vbulletin->options['vbsupport_vbbuxplaza_integrate'] > 0)
        {
          // check if the cost is more than 0
          if ($category['cost'] > 0)
          {
            // format the cost properly
            $category['cost'] = vb_number_format($category['cost'], $vbulletin->options['vbbux_decimalplaces']);

            // update the $category['name'] to show the cost
            $category['name'] .= " (" . $category['cost'] . " " . $vbphrase['vbbux_name'] . " " . $vbphrase['vbbux_points'] . ")";
          }
        }

        // check if this is the one assigned
        if ($categoryid == $selcatid)
        {
          $categoryoptions .= "<option value=" . $categoryid . " selected>" . $category['name'] . "</option>";
        }
        else
        {
          $categoryoptions .= "<option value=" . $categoryid . ">" . $category['name'] . "</option>";
        }
      }
    }

    // set it so this user can set a category
    $show['category'] = true;
  }

  // return the $categoryoptions
  return $categoryoptions;
}


sinisterpain 01-04-2007 02:54 AM

Ok, with some research I finally got this to show the categories and assigned admins in both the support thread created and in creating a new ticket in vB 3.6.4.

you need to edit the author's files in the upload folder includes/vbsupport_functions.php file and the vbsupport.php file as follows:

vbsupport_functions.php

find:
Code:

// function to build the category options
function vbsupport_build_category_options($selcatid)
{
  global $vbulletin, $vbphrase, $show;

  // clear out $categoryoptions
  $categoryoptions = '';

  // check if they are allowed to change ticket categories
  $show['category'] = false;
  if (!empty($vbulletin->vbs_category) && is_array($vbulletin->vbs_category))
 {

change to:

Code:

// function to build the category options
function vbsupport_build_category_options($selcatid)
{
  global $vbulletin, $vbphrase, $show;

  // clear out $categoryoptions
  $categoryoptions = '';

  // check if they are allowed to change ticket categories
  $show['category'] = false;
  $vbulletin->datastore->do_db_fetch("'vbs_category'");
  if (!empty($vbulletin->vbs_category) && is_array($vbulletin->vbs_category))
  {

In vbsupport.php

find:
Code:

  // build the assigned user (if any)
      $show['assigned'] = true;
      $assigned = $vbulletin->vbs_admin[$thread['assigneduserid']];
      if (!empty($assigned) && is_array($assigned))
      {

change to:
Code:

// build the assigned user (if any)
      $show['assigned'] = true;
      $vbulletin->datastore->do_db_fetch("'vbs_admin'");
      $assigned = $vbulletin->vbs_admin[$thread['assigneduserid']];
      if (!empty($assigned) && is_array($assigned))
      {

find:
Code:

// build the category (if any)
      $category = $vbulletin->vbs_category[$thread['categoryid']];
      if (!empty($category) && is_array($category))
      {

change to:
Code:

// build the category (if any)
      $vbulletin->datastore->do_db_fetch("'vbs_category'");
      $category = $vbulletin->vbs_category[$thread['categoryid']];
      if (!empty($category) && is_array($category))
      {

I am posting this fix since no word or activity has come from the author since July 2006. I feel that alot of members could really use this hack for their boards. The call for the datastore was not working which required a do_db_fetch since it did not recognize the vbs_category and would only see the datastore folder in the data base when using the call $vbulletin->vbs_categaory. These edits may not be needed by everyone, if you did a fresh install of 3.6.4 and not the upgrade the authors files may work without the edits you need to try the authors file and if categorys do not work then use the edits.

tank14 01-05-2007 12:39 AM

Quote:

Originally Posted by sam anders (Post 1052102)
i know the coder of this mod is having issues with pc but wondering if any one as any ideas on the above?

Same issue here.

sinisterpain 01-05-2007 12:43 AM

Forgot another edit which must be made to the admincp/vbsupport.php file inorder for emails and pms to work with the categorys. Since the pm and emails get sent based on the individual category set up. Once the file edit is made in the admincp-> manage categorys select a category for edit and at the bottom you should see check boxes with administators listed for email and PM option. Select the admin and save this will send a pm based on who is selected for a specific category.

in the folder admincp/vbsupport.php

find:

Code:

function print_admin_user_row($title, $name = 'multibox', $columns = 0, $userlist)
{
  global $vbulletin;

  // build $userids
  if (empty($userlist))
  {
    // build an empty $userlist
    $userlist = '0';
  }
  $ids = explode(',', $userlist);

  // build the options
  $options = array();
  foreach($vbulletin->vbs_admin AS $userid => $user)
{


change to:

Code:

function print_admin_user_row($title, $name = 'multibox', $columns = 0, $userlist)
{
  global $vbulletin;

  // build $userids
  if (empty($userlist))
  {
    // build an empty $userlist
    $userlist = '0';
  }
  $ids = explode(',', $userlist);

  // build the options
  $options = array();
  $vbulletin->datastore->do_db_fetch("'vbs_admin'");
  foreach($vbulletin->vbs_admin AS $userid => $user)
  {

find:
Code:

// unserialize the datastore
$vbulletin->vbs_category = unserialize($vbulletin->vbs_category);
$vbulletin->vbs_admin = unserialize($vbulletin->vbs_admin);

change to:
Code:

$vbulletin->datastore->do_db_fetch("'vbs_category'");
$vbulletin->vbs_category = unserialize($vbulletin->vbs_category);
$vbulletin->datastore->do_db_fetch("'vbs_admin'");
$vbulletin->vbs_admin = unserialize($vbulletin->vbs_admin);


sinisterpain 01-07-2007 01:19 PM

Quote:

Originally Posted by tank14 (Post 1151027)
Same issue here.

Your case is unique as we discussed on MSN, you are running a 3.6.4 install on a 3.5.4 skin, with a fresh install of 3.6.4. You do not require most if not any edits that I supplied. But you need to be sure that all of your permisions are set properly. Also you need to explain your problem in detail not just quote another thread.

BigJohnny 01-09-2007 01:43 PM

the zip for 2.0 is corrupt... :(

sinisterpain 01-09-2007 08:10 PM

Quote:

Originally Posted by BigJohnny (Post 1154574)
the zip for 2.0 is corrupt... :(

I just downloaded it and it works fine for me

BigJohnny 01-09-2007 09:58 PM

yup your right... it was a problemwith me.


All times are GMT. The time now is 09:04 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.02291 seconds
  • Memory Usage 1,761KB
  • 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
  • (11)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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