Announcement

Collapse
No announcement yet.

Problem with NavBar at my Forum

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with NavBar at my Forum

    Today i installed vBulletin 3.7.0 Final and i have a problem with my navbar. Every Quick Links or Search the link goes to http://www.xxxxxxxxxxxxxxxx.org/forums/forum.php# and it doesnt load anything. Is there any way to fix it??? Thnx in advance!!!

  • #2
    Remember to revert all your templates, assuming you have upgraded from a previous version of VBulletin.

    Comment


    • #3
      need more help please? sorry my friend im not coder
      i have installed 3.7 + vba (portal) and find this problem

      how to fixed please?

      my problem is every option select to search or quick links add this character "#" and cannot load nothing.

      Comment


      • #4
        We cannot provide support for third-party add-ons and non-vB code.

        To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

        Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

        [Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

        Next, disable all plugins.

        Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

        define('DISABLE_HOOKS', true);

        Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it. Do you have the same problem?
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          I have been having a similar problem...my Search and Quick Links no longer work, but when I hover/click on them, there is a URL above the system tray in the bottom of the browser. When I click, however, nothing happens.

          I have done the Maintenance > Diagnostics > Suspect File Versions thing, and it resulted in this message:

          Unable to read MD5 sums from file includes/md5_sums_vbulletin.php

          Does anyone know what this means? Also, I'm running .php but still have old files with .php3. Can I simply remove them?

          Thanks!
          Mia
          http://MainStreetMom.com

          Comment


          • #6
            i fixed my problem (revert all templates) something on footer template blocked quick tools and search.

            thank you.

            now i have problem with Social Groups cannot create social group

            Code:
             
            http://www.yoursite.com/forums/group.php?do=create Fatal error: Only variables can be passed by reference in /home/xxxxxx/public_html/forums/group.php on line 803
            anyone have idea why give this error on group.php

            running Vbulletin 3.7.0 and Vba 3.0.1

            Code:
            some code from my group.php (fresh download)
            
            <?php
            /*======================================================================*\
            || #################################################################### ||
            || # vBulletin 3.7.0 - Licence Number XXXXXXX
            || # ---------------------------------------------------------------- # ||
            || # Copyright ©2000-2008 Jelsoft Enterprises Ltd. All Rights Reserved. ||
            || # This file may not be redistributed in whole or significant part. # ||
            || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
            || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
            || #################################################################### ||
            \*======================================================================*/
            
            // ####################### SET PHP ENVIRONMENT ###########################
            error_reporting(E_ALL & ~E_NOTICE);
            
            // #################### DEFINE IMPORTANT CONSTANTS #######################
            define('THIS_SCRIPT', 'group');
            define('CSRF_PROTECTION', true);
            define('GET_EDIT_TEMPLATES', 'message,picture');
            
            if ($_POST['do'] == 'message')
            {
                if (isset($_POST['ajax']))
                {
                    define('NOPMPOPUP', 1);
                    define('NOSHUTDOWNFUNC', 1);
                }
                if (isset($_POST['fromquickcomment']))
                {    // Don't update Who's Online for Quick Comments since it will get stuck on that until the user goes somewhere else
                    define('LOCATION_BYPASS', 1);
                }
            }
            
            // ################### PRE-CACHE TEMPLATES AND DATA ######################
            // get special phrase groups
            $phrasegroups = array (
                'socialgroups',
                'search',
                'user',
                'posting',
                'album',
            );
            
            // get special data templates from the datastore
            $specialtemplates = array(
                'smiliecache',
                'bbcodecache'
            );
            
            // pre-cache templates used by all actions
            $globaltemplates = array();
            
            // pre-cache templates used by specific actions
            $actiontemplates = array(
                'grouplist' => array(
                    'SOCIALGROUPS',
                    'socialgroups_grouplist',
                    'socialgroups_mygroups',
                    'socialgroups_mygroups_bit',
                    'socialgroups_grouplist_bit',
                    'forumdisplay_sortarrow'
                ),
                'invitations' => array(
                    'SOCIALGROUPS',
                    'socialgroups_grouplist',
                    'socialgroups_grouplist_bit',
                    'forumdisplay_sortarrow'
                ),
                'requests' => array(
                    'SOCIALGROUPS',
                    'socialgroups_grouplist',
                    'socialgroups_grouplist_bit',
                    'forumdisplay_sortarrow'
                ),
                'moderatedgms' => array(
                    'SOCIALGROUPS',
                    'socialgroups_grouplist',
                    'socialgroups_grouplist_bit',
                    'forumdisplay_sortarrow'
                ),
                'leave' => array(
                    'socialgroups_confirm'
                ),
                'delete' => array(
                    'socialgroups_confirm'
                ),
                'join' => array(
                    'socialgroups_confirm'
                ),
                'edit' => array(
                    'socialgroups_form'
                ),
                'create' => array(
                    'socialgroups_form'
                ),
                'view' => array(
                    'memberinfo_tiny',
                    'socialgroups_group',
                    'editor_css',
                    'editor_clientscript',
                    'editor_jsoptions_font',
                    'editor_jsoptions_size',
                    'showthread_quickreply',
                    'socialgroups_message',
                    'socialgroups_message_deleted',
                    'socialgroups_message_ignored',
                    'socialgroups_picturebit',
                    'socialgroups_css',
                ),
                'viewmembers' => array(
                    'im_aim',
                    'im_icq',
                    'im_msn',
                    'im_skype',
                    'im_yahoo',
                    'memberinfo_small',
                    'memberinfo_css',
                    'postbit_onlinestatus',
                    'socialgroups_memberlist'
                ),
                'search' => array(
                    'socialgroups_search'
                ),
                'message' => array(
                    'socialgroups_editor',
                    'visitormessage_preview',
                ),
                'report' => array(
                    'newpost_usernamecode',
                    'reportitem',
                ),
                'reportpicture' => array(
                    'newpost_usernamecode',
                    'reportitem',
                ),
                'grouppictures' => array(
                    'socialgroups_pictures',
                    'socialgroups_picturebit'
                ),
                'picture' => array(
                    'socialgroups_picture',
                    'picturecomment_commentarea',
                    'picturecomment_css',
                    'picturecomment_form',
                    'picturecomment_message',
                    'picturecomment_message_deleted',
                    'picturecomment_message_ignored',
                    'showthread_quickreply'
                ),
                'addpictures' => array(
                    'socialgroups_addpictures'
                ),
                'insertpictures' => array(
                    'socialgroups_addpictures',
                    'socialgroups_addpicture_invalidurl',
                    'socialgroups_addpicture_messagebit',
                    'socialgroups_addpicture_messages',
                    'socialgroups_addpictures',
                    'socialgroups_picturebit'
                ),
                'manage' => array(
                    'socialgroups_manage',
                    'socialgroups_managebit',
                    'socialgroups_css',
                ),
                'managemembers' => array(
                    'socialgroups_css',
                    'socialgroups_managebit',
                    'socialgroups_managemembers',
                ),
                'sendinvite' => array(
                    'socialgroups_manage',
                    'socialgroups_managebit',
                    'socialgroups_css',
                ),
                'removepicture' => array(
                    'socialgroups_confirm'
                )
            );
            
            
            $action_needs_groupid = array(
                'addpictures',
                'cancelinvites',
                'delete',
                'deletemessage',
                'dodelete',
                'doedit',
                'dojoin',
                'doleave',
                'doremovepicture',
                'edit',
                'grouppictures',
                'insertpictures',
                'join',
                'kickmembers',
                'leave',
                'manage',
                'managemembers',
                'message',
                'pendingmembers',
                'picture',
                'removepicture',
                'report',
                'reportpicture',
                'sendemail',
                'sendinvite',
                'sendpictureemail',
                'view',
                'viewmembers'
            );
            
            if (!$_REQUEST['do'] AND ($_REQUEST['gmid'] OR $_REQUEST['groupid']))
            {
                $actiontemplates['none'] =& $actiontemplates['view'];
            }
            else
            {
                $actiontemplates['none'] =& $actiontemplates['grouplist'];
            }
            
            // ######################### REQUIRE BACK-END ############################
            require_once('./global.php');
            require_once(DIR . '/includes/functions_socialgroup.php');
            require_once(DIR . '/includes/functions_album.php');
            require_once(DIR . '/includes/functions_user.php');
            require_once(DIR . '/includes/class_postbit.php'); // for construct_im_icons
            
            // #######################################################################
            // ######################## START MAIN SCRIPT ############################
            // #######################################################################
            
            $vbulletin->input->clean_array_gpc('r', array(
                'groupid'    => TYPE_UINT,
                'gmid'    => TYPE_UINT,
            ));
            
            ($hook = vBulletinHook::fetch_hook('group_start_precheck')) ? eval($hook) : false;
            
            if (empty($_REQUEST['do']))
            {
                if ($vbulletin->GPC['groupid'] OR $vbulletin->GPC['gmid'])
                {
                    $_REQUEST['do'] = 'view';
                }
                else
                {
                    $_REQUEST['do'] = 'grouplist';
                }
            }
            
            if (
                !($vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_groups'])
                OR !($permissions['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview'])
                OR !($vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canviewgroups'])
                )
            {
                print_no_permission();
            }
            
            // check if there is a valid groupid
            if ($vbulletin->GPC['gmid'])
            {
                $messageinfo = verify_groupmessage($vbulletin->GPC['gmid'], false, false);
                if (!empty($messageinfo['groupid']))
                {
                    $vbulletin->GPC['groupid'] = $messageinfo['groupid'];
                }
            }
            
            // If a group id is specified, but the group doesn't exist, error out
            if ($vbulletin->GPC['groupid'])
            {
                $group = fetch_socialgroupinfo($vbulletin->GPC['groupid']);
            
                if (empty($group))
                {
                    standard_error(fetch_error('invalidid', $vbphrase['social_group'], $vbulletin->options['contactuslink']));
                }
            }
            
            // Error out if no group specified, but a group is needed for the actions
            if (in_array($_REQUEST['do'], $action_needs_groupid) AND empty($group))
            {
                standard_error(fetch_error('invalidid', $vbphrase['social_group'], $vbulletin->options['contactuslink']));
            }
            
            if ($vbulletin->GPC['gmid'])
            {
                if ($messageinfo['state'] == 'deleted' AND !fetch_socialgroup_modperm('canviewdeleted', $group))
                {
                    standard_error(fetch_error('invalidid', $vbphrase['message'], $vbulletin->options['contactuslink']));
                }
                else if ($messageinfo['state'] == 'moderation' AND !fetch_socialgroup_modperm('canmoderategroupmessages', $group) AND $messageinfo['postuserid'] != $vbulletin->userinfo['userid'])
                {
                    standard_error(fetch_error('invalidid', $vbphrase['message'], $vbulletin->options['contactuslink']));
                }
            }
            
            ($hook = vBulletinHook::fetch_hook('group_start_postcheck')) ? eval($hook) : false;
            
            // #######################################################################
            if ($_REQUEST['do'] == 'grouplist' OR $_REQUEST['do'] == 'invitations' OR $_REQUEST['do'] == 'requests' OR $_REQUEST['do'] == 'moderatedgms')
            {
                require_once(DIR . '/includes/class_socialgroup_search.php');
                $socialgroupsearch = new vB_SGSearch($vbulletin);
            
                switch ($_REQUEST['do'])
                {
                    case 'invitations':
                    {
                        if (!$vbulletin->userinfo['userid'])
                        {
                            print_no_permission();
                        }
            
                        $socialgroupsearch->add('member', $vbulletin->userinfo['userid']);
                        $socialgroupsearch->add('membertype', 'invited');
                        $grouplisttitle = $navphrase = $vbphrase['your_invites'];
                        $doaction = 'invitations';
                    }
                    break;
            
                    case 'requests':
                    {
                        $socialgroupsearch->add('creator', $vbulletin->userinfo['userid']);
                        $socialgroupsearch->add('pending', true);
                        $grouplisttitle = $navphrase = $vbphrase['your_groups_in_need_of_attention'];
                        $doaction = 'requests';
                    }
                    break;
            
                    case 'moderatedgms':
                    {
                        if (!$vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canmanageowngroups'])
                        {
                            print_no_permission();
                        }
            
                        $socialgroupsearch->add('creator', $vbulletin->userinfo['userid']);
                        $socialgroupsearch->add('moderatedgms', true);
                        $grouplisttitle = $navphrase = $vbphrase['your_groups_with_moderated_messages'];
                        $doaction = 'moderatedgms';
                    }
                    break;
                }
            
                $dobreadcrumb = $navphrase ? true : false;
                $doaction = $doaction ? $doaction : 'grouplist';
                $navphrase = $navphrase ? $navphrase : $vbphrase['social_groups'];
            
            
                $vbulletin->input->clean_array_gpc('r', array(
                    'perpage'    => TYPE_UINT,
                    'pagenumber' => TYPE_UINT,
                    'sortfield'  => TYPE_NOHTML,
                    'sortorder'  => TYPE_NOHTML
                ));
            
                $vbulletin->input->clean_array_gpc('r', array(
                    'dofilter'   => TYPE_BOOL
                ));
            
                if (empty($vbulletin->GPC['dofilter']) AND !($vbulletin->GPC['pagenumber'] > 1) AND $vbulletin->userinfo['userid'] AND $_REQUEST['do'] == 'grouplist')
                {
                    // find list of groups that I'm in
                    $mygroups = $vbulletin->db->query_read("
                        SELECT socialgroup.*, socialgroup.dateline AS createdate,
                            socialgroupmember.dateline AS joindate, socialgroupmember.type AS membertype
                        FROM " . TABLE_PREFIX . "socialgroupmember AS socialgroupmember
                        INNER JOIN " . TABLE_PREFIX ."socialgroup AS socialgroup ON (socialgroup.groupid = socialgroupmember.groupid)
                        WHERE socialgroupmember.userid = " . $vbulletin->userinfo['userid'] . " AND socialgroupmember.type = 'member'
                        ORDER BY socialgroupmember.dateline DESC
                    ");
            
                    $mygroup_bits = '';
                    $hasnormalgroups = false;
            
                    while ($mygroup = $vbulletin->db->fetch_array($mygroups))
                    {
                        $mygroup = prepare_socialgroup($mygroup);
                        $show['delete_group'] = can_delete_group($mygroup);
                        $show['edit_group'] = can_edit_group($mygroup);
                        $show['leave_group'] = can_leave_group($mygroup);
                        $show['group_options'] = ($show['delete_group'] OR $show['edit_group'] OR $show['leave_group']);
            
                        ($hook = vBulletinHook::fetch_hook('group_list_mygroupsbit')) ? eval($hook) : false;
            
                        eval('$mygroup_bits .= "' . fetch_template('socialgroups_mygroups_bit') . '";');
                    }
            
                    $vbulletin->db->free_result($mygroups);
                }
            
                if (empty($grouplisttitle))
                {
                    if (empty($mygroup_bits))
                    {
                        $grouplisttitle = $vbphrase['social_groups'];
                    }
                    else
                    {
                        $grouplisttitle = $vbphrase['available_groups'];
                    }
                }
            
                // start processing group list
                $sortfield  = $vbulletin->GPC['sortfield'];
                $perpage    = $vbulletin->GPC['perpage'];
                $pagenumber = $vbulletin->GPC['pagenumber'];
            
                if (empty($sortfield))
                {
                    $sortfield = 'lastpost';
                }
            
                $perpage = $perpage ? $perpage : 20;
            
                $socialgroupsearch->set_sort($sortfield, $vbulletin->GPC['sortorder']);
            
                if ($vbulletin->GPC['dofilter'])
                {
                    $vbulletin->input->clean_array_gpc('r', array(
                        'filtertext'       => TYPE_NOHTML,
                        'memberlimit'      => TYPE_UINT,
                        'memberless'       => TYPE_UINT,
                        'messagelimit'     => TYPE_UINT,
                        'messageless'      => TYPE_UINT,
                        'picturelimit'     => TYPE_UINT,
                        'pictureless'      => TYPE_UINT,
                        'filter_date_gteq' => TYPE_UNIXTIME,
                        'filter_date_lteq' => TYPE_UNIXTIME,
                    ));
            
                    $filters = array();
            
                    if (!empty($vbulletin->GPC['filtertext']))
                    {
                        $filters['text'] = $vbulletin->GPC['filtertext'];
                     }
            
                     if (!empty($vbulletin->GPC['filter_date_lteq']))
                    {
                        $filters['date_lteq'] = $vbulletin->GPC['filter_date_lteq'];
                     }
            
                     if (!empty($vbulletin->GPC['filter_date_gteq']))
                    {
                        $filters['date_gteq'] = $vbulletin->GPC['filter_date_gteq'];
                     }
            
                     if (!empty($vbulletin->GPC['memberlimit']))
                    {
                        if ($vbulletin->GPC['memberless'] == 1)
                        {
                            $filters['members_lteq'] = $vbulletin->GPC['memberlimit'];
                        }
                        else
                        {
                            $filters['members_gteq'] = $vbulletin->GPC['memberlimit'];
                        }
                        $memberlessselected[$vbulletin->GPC['memberless']] = 'selected="selected"';
                        $memberlimit = $vbulletin->GPC['memberlimit'];
                     }
            
                     if (!empty($vbulletin->GPC['messagelimit']))
                    {
                        if ($vbulletin->GPC['messageless'] == 1)
                        {
                            $filters['message_lteq'] = $vbulletin->GPC['messagelimit'];
                        }
                        else
                        {
                            $filters['message_gteq'] = $vbulletin->GPC['messagelimit'];
                        }
                        $messagelessselected[$vbulletin->GPC['messageless']] = 'selected="selected"';
                        $messagelimit = $vbulletin->GPC['messagelimit'];
                     }
            
                      if (!empty($vbulletin->GPC['picturelimit']))
                    {
                        if ($vbulletin->GPC['pictureless'] == 1)
                        {
                            $filters['picture_lteq'] = $vbulletin->GPC['picturelimit'];
                        }
                        else
                        {
                            $filters['picture_gteq'] = $vbulletin->GPC['picturelimit'];
                        }
                        $picturelessselected[$vbulletin->GPC['pictureless']] = 'selected="selected"';
                        $picturelimit = $vbulletin->GPC['picturelimit'];
                     }
            
                     foreach ($filters AS $key => $value)
                     {
                         $socialgroupsearch->add($key, $value);
                     }
                 }
            
                 ($hook = vBulletinHook::fetch_hook('group_list_filter')) ? eval($hook) : false;
            
                $totalgroups = $socialgroupsearch->execute(true);
                $grouplist = '';
                if ($socialgroupsearch->has_errors())
                {
                    $errorlist = '';
                    foreach($socialgroupsearch->generator->errors AS $error)
                    {
                        $errorlist .= "<li>$error</li>";
                    }
                    $show['errors'] = $vbulletin->GPC['dofilter']; // don't show the error box if we didn't actually do a search
                }
                else
                {
                    sanitize_pageresults($totalgroups, $pagenumber, $perpage);
            
                    $socialgroupsearch->limit(($pagenumber - 1) * $perpage, $perpage);
            
                    $groups = $socialgroupsearch->fetch_results();
            
                    $show['gminfo'] = $vbulletin->options['socnet_groups_msg_enabled'];
                    $show['pictureinfo'] = ($vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_albums'] AND $vbulletin->options['socnet_groups_albums_enabled']) ? true : false;
            
                    $picturealt = ($show['gminfo'] ? 'alt2' : 'alt1');
                    $lastpostalt = ($show['pictureinfo'] ? 'alt1' : 'alt2');
            
                    if (is_array($groups))
                    {
                        foreach ($groups AS $group)
                        {
                            $group = prepare_socialgroup($group);
            
                            $show['pending_link'] = (fetch_socialgroup_modperm('caninvitemoderatemembers', $group) AND $group['moderatedmembers'] > 0);
                            $show['lastpostinfo'] = ($group['lastpost']);
            
                            ($hook = vBulletinHook::fetch_hook('group_list_groupbit')) ? eval($hook) : false;
            
                            eval('$grouplist .= "' . fetch_template("socialgroups_grouplist_bit") . '";');
                        }
                    }
            
                    $sorturl = 'group.php?' . $vbulletin->session->vars['sessionurl'] . "do=$doaction" . ($perpage != 20 ? "&amp;pp=$perpage" : '');
                    if ($vbulletin->GPC['dofilter'])
                    {
                        $sorturl .= '&amp;dofilter=1' .
                        ($vbulletin->GPC['filtertext'] ? '&amp;filtertext=' . $vbulletin->GPC['filtertext'] : '') .
                        ($vbulletin->GPC['memberlimit'] ? '&amp;memberlimit=' . $vbulletin->GPC['memberlimit'] : '') .
                        ($vbulletin->GPC['memberless'] ? '&amp;memberless=' . $vbulletin->GPC['memberless'] : '') .
                        ($vbulletin->GPC['messagelimit'] ? '&amp;messagelimit=' . $vbulletin->GPC['messagelimit'] : '') .
                        ($vbulletin->GPC['messageless'] ? '&amp;messageless=' . $vbulletin->GPC['messageless'] : '') .
                        ($vbulletin->GPC['picturelimit'] ? '&amp;picturelimit=' . $vbulletin->GPC['picturelimit'] : '') .
                        ($vbulletin->GPC['pictureless'] ? '&amp;pictureless=' . $vbulletin->GPC['pictureless'] : '') .
                        ($vbulletin->GPC['filter_date_gteq'] ? '&amp;filter_date_gteq=' . $vbulletin->GPC['filter_date_gteq'] : '') .
                        ($vbulletin->GPC['filter_date_lteq'] ? '&amp;filter_date_lteq=' . $vbulletin->GPC['filter_date_lteq'] : '');
                    }
            
                    $pagenav = construct_page_nav($pagenumber, $perpage, $totalgroups,
                        $sorturl . "&amp;sort=$sortfield" .
                            (!empty($vbulletin->GPC['sortorder']) ? "&amp;order=" . $vbulletin->GPC['sortorder'] : '')
                    );
            
                    $oppositesort = ($vbulletin->GPC['sortorder'] == 'asc' ? 'desc' : 'asc');
            
                    eval('$sortarrow["$sortfield"] = "' . fetch_template('forumdisplay_sortarrow') . '";');
                }
            
                $show['creategroup'] = ($vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['cancreategroups']);
            
                $templatename = 'SOCIALGROUPS';
            
                $navbits = array();
                if ($dobreadcrumb)
                {
                    $navbits['group.php' . $vbulletin->session->vars['sessionurl_q']] = $vbphrase['social_groups'];
                }
                $navbits[''] = $navphrase;
            }
            
            // #######################################################################
            if ($_REQUEST['do'] == 'leave' OR $_REQUEST['do'] == 'delete' OR $_REQUEST['do'] == 'join')
            {
                if (!$vbulletin->userinfo['userid'])
                {
                    print_no_permission();
                }
            }
            
            // #######################################################################
            if ($_REQUEST['do'] == 'leave')
            {
                if (!can_leave_group($group))
                {
                    if ($group['is_owner'])
                    {
                        standard_error(fetch_error('cannot_leave_group_if_owner'));
                    }
                    else
                    {
                        standard_error(fetch_error('invalidid', $vbphrase['social_group'], $vbulletin->options['contactuslink']));
                    }
                }
            
                $confirmdo = 'doleave';
                $confirmaction = 'group.php?do=doleave';
            
                if ($group['membertype'] == 'moderated')
                {
                    $question_phrase = construct_phrase($vbphrase['confirm_cancel_join_group_x'], $group['name']);
                    $title_phrase = $vbphrase['cancel_join_request_question'];
                    $navphrase = $vbphrase['cancel_join_request'];
                }
                else if ($group['membertype'] == 'invited')
                {
                    $question_phrase = construct_phrase($vbphrase['confirm_decline_join_group_x'], $group['name']);
                    $title_phrase = $vbphrase['decline_join_invitation_question'];
                    $navphrase = $vbphrase['decline_join_invitation'];
                }
                else
                {
                    $question_phrase = construct_phrase($vbphrase['confirm_leave_group_x'], $group['name']);
                    $title_phrase = $vbphrase['leave_group_question'];
                    $navphrase = $vbphrase['leave_social_group'];
                }
            
                $navbits = array(
                    'group.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['social_groups'],
                    'group.php?' . $vbulletin->session->vars['sessionurl'] . 'groupid=' . $group['groupid'] => $group['name'],
                    '' => $navphrase
                );
            
                $url =& $vbulletin->url;
                $templatename = 'socialgroups_confirm';
            }
            
            // #######################################################################
            if ($_REQUEST['do'] == 'delete')
            {
                if (!can_delete_group($group))
                {
                    print_no_permission();
                }
            
                $confirmdo = 'dodelete';
                $question_phrase = construct_phrase($vbphrase['confirm_delete_group_x'], $group['name']);
                $title_phrase = $vbphrase['delete_group_question'];
                $confirmaction = 'group.php?do=dodelete';
            
                $navbits = array(
                    'group.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['social_groups'],
                    'group.php?' . $vbulletin->session->vars['sessionurl'] . 'groupid=' . $group['groupid'] => $group['name'],
                    '' => $vbphrase['delete_group']
                );
            
                $url =& $vbulletin->url;
                $templatename = 'socialgroups_confirm';
            }
            
            // #######################################################################
            if ($_REQUEST['do'] == 'join')
            {
                if (!can_join_group($group))
                {
                    print_no_permission();
                }
            
                $confirmdo = 'dojoin';
                $question_phrase = construct_phrase($vbphrase['confirm_join_group_x'], $group['name']);
                $title_phrase = $vbphrase['join_group_question'];
                $confirmaction = 'group.php?do=dojoin';
            
                $extratext = empty($vbphrase['join_' . $group['type'] . '_extratext']) ? '' : $vbphrase['join_' . $group['type'] . '_extratext'];
            
                $navbits = array(
                    'group.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['social_groups'],
                    'group.php?' . $vbulletin->session->vars['sessionurl'] . 'groupid=' . $group['groupid'] => $group['name'],
                    '' => $vbphrase['join_group']
                );
            
                $url =& $vbulletin->url;
                $templatename = 'socialgroups_confirm';
            }
            
            // #######################################################################
            if ($_POST['do'] == 'doleave' OR $_POST['do'] == 'dodelete' OR $_POST['do'] == 'dojoin')
            {
                $vbulletin->input->clean_array_gpc('p', array(
                     'deny'  => TYPE_NOHTML
                ));
            
                // You either clicked no or you're a guest
                if ($vbulletin->GPC['deny'])
                {
                    eval(print_standard_redirect('action_cancelled'));
                }
            
                if ($vbulletin->userinfo['userid'] == 0)
                {
                    print_no_permission();
                }
            
                if ($vbulletin->url == $vbulletin->options['forumhome'] . '.php')
                {
                    $vbulletin->url = 'group.php?' . $vbulletin->session->vars['sessionurl'] . "groupid=$group[groupid]";
                }
            }
            
            // #######################################################################
            if ($_POST['do'] == 'doleave')
            {
                if (!can_leave_group($group))
                {
                    if ($group['is_owner'])
                    {
                        standard_error(fetch_error('cannot_leave_group_if_owner'));
                    }
                    else
                    {
                        standard_error(fetch_error('invalidid', $vbphrase['social_group'], $vbulletin->options['contactuslink']));
                    }
                }
            
                if (!empty($group['membertype']))
                {
                    $currentmemberentry = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "socialgroupmember WHERE userid = " . $vbulletin->userinfo['userid'] . " AND groupid = " . $vbulletin->GPC['groupid']);
            
                    // remove us from the group if we're still in it
                    if ($currentmemberentry)
                    {
                        $socialgroupmemberdm = datamanager_init('SocialGroupMember', $vbulletin);
                        $socialgroupmemberdm->set_existing($currentmemberentry);
                        $socialgroupmemberdm->delete();
                    }
                }
            
                eval(print_standard_redirect('successfully_left_group'));
            }
            
            // #######################################################################
            if ($_POST['do'] == 'dodelete')
            {
                if (!can_delete_group($group))
                {
                    print_no_permission();
                }
            
                $socialgroupdm = datamanager_init('SocialGroup', $vbulletin);
                $socialgroupdm->set_existing($group);
                 $socialgroupdm->delete();
            
                 if (!$group['is_owner'] AND can_moderate(0, 'candeletesocialgroups'))
                {
                    require_once(DIR . '/includes/functions_log_error.php');
                    log_moderator_action($group, 'social_group_x_deleted',
                        array($group['name'])
                    );
                }
            
                $vbulletin->url = 'group.php' . $vbulletin->session->vars['sessionurl_q'];
            
                eval(print_standard_redirect('successfully_deleted_group'));
            }
            
            // #######################################################################
            if ($_POST['do'] == 'dojoin')
            {
                if (!can_join_group($group))
                {
                    print_no_permission();
                }
            
                $jointype = array(
                    'public'     => 'member',
                    'moderated'  => 'moderated',
                    'inviteonly' => 'member'
                );
            
                $socialgroupmemberdm = datamanager_init('SocialGroupMember', $vbulletin);
            
                if (!empty($group['membertype']))
                {
                    $socialgroupmemberdm->set_existing($vbulletin->db->query_first("
                        SELECT * FROM " . TABLE_PREFIX . "socialgroupmember WHERE userid=" . $vbulletin->userinfo['userid'] . "  AND groupid = " . $group['groupid']
                    ));
                }
            
                $socialgroupmemberdm->set('userid', $vbulletin->userinfo['userid']);
                $socialgroupmemberdm->set('groupid', $vbulletin->GPC['groupid']);
                $socialgroupmemberdm->set('dateline', TIMENOW);
                $socialgroupmemberdm->set('type', $jointype["$group[type]"]);
            
                ($hook = vBulletinHook::fetch_hook('group_dojoin')) ? eval($hook) : false;
            
                $socialgroupmemberdm->save();
            
                eval(print_standard_redirect('successfully_joined_group'));
            }
            
            // ############# Do we need group owner info? ############################
            if ($_REQUEST['do'] == 'edit' OR $_POST['do'] == 'doedit' OR $_REQUEST['do'] == 'create' OR $_POST['do'] == 'docreate')
            {
                if (!empty($group))
                {
                    $groupowner = fetch_userinfo($group['creatoruserid']);
                    cache_permissions($groupowner);
                }
                else
                {
                    $groupowner = $vbulletin->userinfo;
                }
            }
            
            // #######################################################################
            if ($_REQUEST['do'] == 'create' OR $_REQUEST['do'] == 'edit')
            {
                switch($_REQUEST['do'])
                {
                    case 'create':
                    {
                        if (!($vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['cancreategroups']))
                        {
                            print_no_permission();
                        }
                        $phrase =  $vbphrase['create_group'];
                        $action = 'docreate';
            
                        $checked['enable_group_messages'] = ' checked="checked"';
                        $checked['enable_group_albums'] = ' checked="checked"';
                    }
                    break;
                    case 'edit':
                    {
                        if (!can_edit_group($group))
                        {
                            print_no_permission();
                        }
            
                        $typeselected["$group[type]"] = ' selected="selected"';
            
                        $phrase =  $vbphrase['edit_group'];
                        $action = 'doedit';
            
                        $checked['enable_group_messages'] = ($group['options'] & $vbulletin->bf_misc_socialgroupoptions['enable_group_messages']) ? ' checked="checked"' : '';
                        $checked['enable_group_albums'] = ($group['options'] & $vbulletin->bf_misc_socialgroupoptions['enable_group_albums']) ? ' checked="checked"' : '';
                        $checked['mod_queue'] = ($group['options'] & $vbulletin->bf_misc_socialgroupoptions['owner_mod_queue']) ? ' checked="checked"' : '';
                        $checked['join_to_view'] = ($group['options'] & $vbulletin->bf_misc_socialgroupoptions['join_to_view']) ? ' checked="checked"' : '';
                    }
                    break;
                }
            
                $navbits = array(
                    'group.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['social_groups']
                );
            
                if ($_REQUEST['do'] == 'edit')
                {
                    $navbits['group.php?' . $vbulletin->session->vars['sessionurl'] . 'groupid=' . $group['groupid']] = $group['name'];
                }
            
                 $navbits[''] = $phrase;
            
                if ($_REQUEST['do'] == 'edit')
                {
                    $show['title'] = (can_moderate(0, 'caneditsocialgroups') OR $group['members'] <= 1);
                }
                else
                {
                    $show['title'] = true;
                }
            
                $show['mod_queue'] = (
                    $vbulletin->options['sg_allow_owner_mod_queue']
                    AND !$vbulletin->options['social_moderation']
                    AND $groupowner['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canmanageowngroups']
                    AND $vbulletin->options['socnet_groups_msg_enabled']
                );
            
                $show['join_to_view'] = (
                    $vbulletin->options['sg_allow_join_to_view']
                    AND (
                        $vbulletin->options['socnet_groups_msg_enabled']
                        OR $vbulletin->options['socnet_groups_albums_enabled']
                    )
                );
            
                $show['enable_group_messages'] = $vbulletin->options['socnet_groups_msg_enabled'];
                $show['enable_group_albums'] = $vbulletin->options['socnet_groups_albums_enabled'];
            
                $show['options'] = ($show['mod_queue'] OR $show['join_to_view'] OR $show['enable_group_albums'] OR $show['enable_group_messages']);
            
                $url =& $vbulletin->url;
                $templatename = 'socialgroups_form';
            }
            
            // #######################################################################
            if ($_POST['do'] == 'docreate')
            {
                if (!($vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['cancreategroups']))
                {
                    print_no_permission();
                }
            
                $vbulletin->input->clean_array_gpc('p', array(
                     'groupname'        => TYPE_NOHTML,
                     'groupdescription' => TYPE_NOHTML,
                     'grouptype'        => TYPE_STR,
                     'options'          => TYPE_ARRAY_BOOL,
                ));
            
                $groupdm = datamanager_init('SocialGroup', $vbulletin, ERRTYPE_STANDARD);
            
                $groupdm->set('name', $vbulletin->GPC['groupname']);
                $groupdm->set('description', $vbulletin->GPC['groupdescription']);
                $groupdm->set('creatoruserid', $vbulletin->userinfo['userid']);
                $groupdm->set('type', $vbulletin->GPC['grouptype']);
            
                foreach (array_keys($vbulletin->bf_misc_socialgroupoptions) AS $key)
                {
                    switch ($key)
                    {
                        case 'owner_mod_queue':
                        {
                            $permcheck = (
                                $vbulletin->options['sg_allow_owner_mod_queue']
                                AND !$vbulletin->options['social_moderation']
                                AND $groupowner['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canmanageowngroups']
                                AND $vbulletin->options['socnet_groups_msg_enabled']
                            ) ? true : false;
                        }
                        break;
            
                        case 'join_to_view':
                        {
                            $permcheck = (
                                $vbulletin->options['sg_allow_join_to_view']
                                AND (
                                    $vbulletin->options['socnet_groups_msg_enabled']
                                    OR $vbulletin->options['socnet_groups_albums_enabled']
                                )
                            ) ? true : false;
                        }
                        break;
            
                        case 'enable_group_messages':
                        {
                            $permcheck = $vbulletin->options['socnet_groups_msg_enabled'] ? true : false;
                        }
                        break;
            
                        case 'enable_group_albums':
                        {
                            $permcheck = $vbulletin->options['socnet_groups_albums_enabled'] ? true : false;
                        }
                        break;
            
                        default:
                        {
                            $permcheck = false;
                        }
                    }
            
                    $value = $permcheck ? isset($vbulletin->GPC['options']["$key"]) : false;
            
                    $groupdm->set_bitfield('options', $key, $value);
                }
            
                ($hook = vBulletinHook::fetch_hook('group_docreate')) ? eval($hook) : false;
            
                $groupid = $groupdm->save();
            
                $vbulletin->url = 'group.php?' . $vbulletin->session->vars['sessionurl'] . 'groupid=' . $groupid;
            
                eval(print_standard_redirect('successfully_created_group'));
            }
            
            // #######################################################################
            if ($_POST['do'] == 'doedit')
            {
                $vbulletin->input->clean_array_gpc('p', array(
                     'groupname'        => TYPE_NOHTML,
                     'groupdescription' => TYPE_NOHTML,
                     'grouptype'        => TYPE_STR,
                     'options'          => TYPE_ARRAY_BOOL,
                ));
            
                if (!can_edit_group($group))
                {
                    print_no_permission();
                }
            
                $groupdm = datamanager_init('SocialGroup', $vbulletin, ERRTYPE_STANDARD);
            
                $groupdm->set_existing($group);
                if (can_moderate(0, 'caneditsocialgroups') OR $group['members'] == 1)
                {
                    $groupdm->set('name', $vbulletin->GPC['groupname']);
                }
                $groupdm->set('description', $vbulletin->GPC['groupdescription']);
                $groupdm->set('type', $vbulletin->GPC['grouptype']);
            
                foreach (array_keys($vbulletin->bf_misc_socialgroupoptions) AS $key)

            Comment


            • #7
              Thank You!

              That fixed it! I've been messing with this for months, and this is the first time they've worked! I reverted my footer file, and that did it!!!

              I don't know if I can ever edit the footer file again to run my info, but in the meantime I'll know what to do if I mess up my tools again.

              THANKS AGAIN!
              Mia
              http://MainStreetMom.com

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X