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)
-   -   Major Additions - GRPS: Groups Commune 2.0.x (https://vborg.vbsupport.ru/showthread.php?t=127303)

bada_bing 09-27-2006 06:03 PM

Quote:

Originally Posted by sabret00the
would you like me to take a look at your installation as i can't figure it out?

sabret00the

Basically what is happening is the some of the images while within groups point to /groups/imagelocation rather then /forums/imagelocation

serg472 09-27-2006 07:53 PM

The mod fails during the installation with a DB error. Reason - you are trying to use a fulltext index without making sure that the default db engine is MyISAM, not InnoDB as it is on my PC.

It would be a good idea to change this:

PHP Code:

$db->query_write("
    CREATE TABLE `grps_post` (
        `postid` int(10) unsigned NOT NULL auto_increment,
        `threadid` int(10) NOT NULL default '0',
        `groupid` mediumint(9) unsigned NOT NULL default '0',
        `parentid` int(10) unsigned default NULL,
        `username` varchar(50)  NOT NULL default '',
        `userid` int(10) unsigned NOT NULL default '0',
        `title` varchar(250)  NOT NULL default '',
        `dateline` int(10) unsigned NOT NULL default '0',
        `pagetext` mediumtext  NOT NULL,
        `ipaddress` varchar(16)  NOT NULL default '',
        `iconid` smallint(5) unsigned NOT NULL default '0',
        `visible` smallint(6) NOT NULL default '0',
        `attach` smallint(5) unsigned NOT NULL default '0',
        `allowsmilie` enum('1','0')  default NULL,
        `showsignature` enum('0','1')  NOT NULL default '0',
        `edit_username` varchar(50)  default NULL,
        `edit_userid` int(10) default NULL,
        `edit_reason` varchar(200)  default NULL,
        `edit_dateline` int(10) unsigned default NULL,
        `delete_username` varchar(50)  default NULL,
        `delete_userid` int(10) default NULL,
        `delete_reason` varchar(200)  default NULL,
        PRIMARY KEY  (`postid`),
        KEY `threadid` (`threadid`),
        FULLTEXT KEY `title` (`title`,`pagetext`)
    )
"
); 

to this:

PHP Code:

$db->query_write("
    CREATE TABLE `grps_post` (
        `postid` int(10) unsigned NOT NULL auto_increment,
        `threadid` int(10) NOT NULL default '0',
        `groupid` mediumint(9) unsigned NOT NULL default '0',
        `parentid` int(10) unsigned default NULL,
        `username` varchar(50)  NOT NULL default '',
        `userid` int(10) unsigned NOT NULL default '0',
        `title` varchar(250)  NOT NULL default '',
        `dateline` int(10) unsigned NOT NULL default '0',
        `pagetext` mediumtext  NOT NULL,
        `ipaddress` varchar(16)  NOT NULL default '',
        `iconid` smallint(5) unsigned NOT NULL default '0',
        `visible` smallint(6) NOT NULL default '0',
        `attach` smallint(5) unsigned NOT NULL default '0',
        `allowsmilie` enum('1','0')  default NULL,
        `showsignature` enum('0','1')  NOT NULL default '0',
        `edit_username` varchar(50)  default NULL,
        `edit_userid` int(10) default NULL,
        `edit_reason` varchar(200)  default NULL,
        `edit_dateline` int(10) unsigned default NULL,
        `delete_username` varchar(50)  default NULL,
        `delete_userid` int(10) default NULL,
        `delete_reason` varchar(200)  default NULL,
        PRIMARY KEY  (`postid`),
        KEY `threadid` (`threadid`),
        FULLTEXT KEY `title` (`title`,`pagetext`)
    ) ENGINE=MyISAM  
"
); 

in grps_installer.php for future versions.

serg472 09-27-2006 09:02 PM

Another bugs in grps_moderate.php

This piece of code:

PHP Code:

$groups $db->query("
            SELECT grps.groupid, grps.title, grps.description, grps.leaderid, user.username, grps_categories.catid, grps_categories.title AS catname
            FROM grps
            LEFT JOIN user ON (user.userid = grps.leaderid)
            LEFT JOIN grps_categories ON (grps_categories.catid = grps.catid)
            WHERE approved != '1'
        "
); 


should be replaced with:

PHP Code:

$groups $db->query("
            SELECT grps.groupid, grps.title, grps.description, grps.leaderid, " 
TABLE_PREFIX "user.username, grps_categories.catid, grps_categories.title AS catname
            FROM grps
            LEFT JOIN " 
TABLE_PREFIX "user ON (" TABLE_PREFIX "user.userid = grps.leaderid)
            LEFT JOIN grps_categories ON (grps_categories.catid = grps.catid)
            WHERE approved != '1'
        "
); 



And this one:

PHP Code:

$adddata $db->query_first("
                SELECT *
                FROM grps
                LEFT JOIN " 
TABLE_PREFIX "user ON (user.userid = grps.leaderid)
                WHERE groupid = 
$groupid
                LIMIT 1
            "
); 

Should be replaced with:

PHP Code:

$adddata $db->query_first("
                SELECT *
                FROM grps
                LEFT JOIN " 
TABLE_PREFIX "user ON (" TABLE_PREFIX "user.userid = grps.leaderid)
                WHERE groupid = 
$groupid
                LIMIT 1
            "
); 


.Tim 09-27-2006 10:32 PM

The install seems to go fine and I get a "done" message but the groups page still shows up blank. Am I not doing something right?

:Judge: 09-28-2006 12:14 AM

Awesome Add On!!

I have a few minor issues that I cannot find to fix:

1. Group Leader Avatar - Not showing up, the image path is obviously wrong http://www.mysite.com/forums/http://...?u=1&dateline=

2. Invite PM - The link in the PM to accept an invite is going to mysite.com/groups (it should be) mysite.com/forums/groups

3. Should there be an option to upload a groups photos or random is all it gets?

4. How could I go in to edit my navbits? Would like Forums - Groups - Group Name.

5. No Group Info in Member Profile. I am using a bit of the MySpace profile re-write, is this why I am not getting any group info?

Thanks, other then the above it works great for me so far. Im sure these are simple fixes I just am not finding the correct places to make the edits.

ronoxQ 09-28-2006 12:32 AM

Sorry I'm being a pain. X_x

Index:

PHP Code:

<?php

//XXXXXXXXXXXXXXXXXX;,XMMMMMS i7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSXXXXXXSSXXXSXXXXXXSXXXSXSXXSXXSXXSXXXX
//XXXXXXXXXXXXXXXX7:XMM0aaZWMMX.rXXXXXXX77;iiiii;7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXiXMZXXS22XX8M0 rXXXXX7r20@MMMW8;;7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXX7.M8XXXr :0MMMMZ:XXXX72W8S7rrXS8MB;;7XXXXXXXXXXSXXXSXXXXXXSXXXXXXXXXXXSXXXXXXXSXXXXXX
//77777X7777X77XXiSMSXrWMMMBi ,@M XX7rZ8;,,,,i;;;7aMSi777XX77XXX7XX77XXXXX77X7XXX7XX77XX7XXX7XX7XXXXXX
//XXX7777XX777777:BMMMZr     i;ZM 777SZi,:::ii;r;r7S@a:777777777777777X7XX777X7X7XXXXXXX7777XX7XX77X77
//XXXXXXXXXXXXXXX:ZM.     .,:;rZM 77:8,,::..     .:iXMr;XXXXXXXXXXXXX7X7XXXX7X7X77X7XX77XXXXXXXXXXXXXX
//777777777777777iiMX:,,,,::irXMa.7riM,     .;0MMMM8iXM.r777777777777777777777777777777777r777777777r7
//777777777777777r.@MX.,:iiiir2@  ;;7MMMMMMMM@ar:.iX8SMi;777777777777777777777777777777777777777777777
//7777777777777777i MM@r::iir8MMWX   Mi        .ii;;rS@Xi777777777777777777777777777777777777777777777
//rrrrrrrrrrrrrrrrri  iMMMMMMM070MM7 ;Z.,.....,:i;rraZ8X:rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//r77777777rrrrrrrrr rMaW77i :::i;ZMM a;,,,,::i;r77rZ@0:irrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//rr;rr;r;i.      ,. MX:7    BSX7r7aMM.2;iii;;;rX772MMM ;rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//rrrrr;,   ;B@@8:  28;72@   MSXXrrXWMMaMXii;;r7X7SM,  ,rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//;rr;i  XMMMMMMMMMMM:iXX@   M2X2X;SB@M .M0X;;;7a@MM7. ,;rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr;r;rrrrr;
//;;ii  MMM@WWWWWWMMM8.XXZM  MS::arX@Mr 2ZMMMMMMMM7iSMM  :;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;  MM@WWWWWWWWWBM0 7XSM  MSa Z00B; MMBr2SZ8r :rSSSZM2 .i;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;r;;;;;;;;
//ii. MM@WWWWMMMM@WMM22XS2BW M0MBa0.     7MM@8SrS2aZ8Z22MM  :iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
//;; ,MMMM@W@@.  MMM, Za2aZ0.Si;:           MMaWMMMMMMMMMMMZ i;;;;iiiii;;;;;;;iiiiiiiii;;;iiiiiiiiiiii
//i: MM8 8@WWWaMMMX  .rZ    ,r7   ;MMMMMMMW  MMX          .MMS27;;rrr;iiiiiiiiir777r;iiiiiiiiiiiiiiiii
//ii MM  WMWMMMM    ,:iM .i;S,  :MMMMMMMMMMM     :MMMMMZ        ZX;;rSaS7;ii;X2r.  ;SX;iiiiiiiiiiiiiii
//i: MMaZM@MM0    ,,::iM; ;X   MMMMMM    MMM  rMMMMMMMMMMMMMMM           XSXS         X;iiiiiiiiiiiiii
//:: MMM@@MMi  .:,::i;;M; 7   MMMM;       MM MMMMMMMMMMMMMMMMMMM.MMMMMS        MMMMM   7i:::i:::::::::
//::  MM@WMM  :i;ii;;rrM  .  MMMM   XMMM  MM MMMM  MMM      WMMMMMMMMMMMMW   MMMMMMMM  i;iiiiiiiiiiiii
//::  MM@MM  i;77rrrrr2MX8  MMMM              WM2  MMM      MMMMMBMMM:MMMMMMMMMM0  MMM  r,,,,,:,,,,,,:
//:::  MMMM ir;rXrrr78MMMM :MMM        ,7ZMM@a::S 8MM.   MMMMMMM  MM    :MMMMMM    MMM  7:::::::::::::
//,,,   MMM2rX77X7X0MMZ7M  MMM0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM   MMM  7   MMMM  :, MMM  r,,,,,,,,,,,,,
//,,,,   MMMMMMMMMMMW  aM  MMM2MMMMMMMMMMMMMMMMMMMMMMMMMMMMB     MMM .r  MMMMM  ;  MMM  Xrr;i:,,,,,,,,
//,,,,,.   SX.;aM7      M  MMM :88i      MMMr   MMMMMMMMM    :i  MMX    7MMMM                :i,,,,,.,
//,..,.,.  B7i:..2M   , ;i @MMM        @MMMM    MMMMM  MMMM      MMX @MMMMMMMMMMMMMMMMMMMMB   .:......
//..,...  MWSX7772WM2    M  MMMMMMMMMMMMMMMa  ,   MMM   MMMM  MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM  :,,,,,,
//......  M2 S7XSr ,BM    M  MMMMMMMMMMMMZ   ::i. 8MMM   MMMMMMMMMMMMMM2       ;20MMMMMMMMMMMZ .......
//...... MMZ7Z22aBS82@M,  @M   MMMMMMMM     :,.,.  MMM    .MMMMMWMMM         .            MMMB  ,.....
//.,,,,. MMMMMMMMMMMMMMMM: MMM           ::,,,,,,  MMM  ,   0MMMMMMM   :::. MMM  .::::   MMMM  ,,,,,,.
//                                                 :MM@       ;MMMMMMM      MMM         MMMMZ         
//                                                               MMMMM      0MMM      SMMMMM          
//       GRPS: Commune For Groups                                 ,MMMa      MMMMX  MMMMMM            
//             vBulletin Add-On Software                           MMMM       MMMMMMMMMMM             
//                             by sabret00the                       MMM         MMMMMMa               
//                                    Copyright 2005                 M                                


// ################ SET SCRIPT LOCATION ENVIRONMENT ######################
require_once('./includes/config_grps.php');

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''groupshome');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array(
'GROUPS',
'groups_groupshome',
'groups_groupshome_newestbits',
'groups_groupshome_popularbits',
'groups_groupshome_largestbits',
'groups_groupshome_mygroups',
'groups_groupshome_mygroupsbits',
'groups_navbar',
);

// ######################### REQUIRE BACK-END ############################
require_once("./global.php");
require_once(
"./includes/functions_grps.php");

// pre-cache templates used by all actions
$globaltemplates = array();

// globalize variables
$vbulletin->input->clean_array_gpc('r', array(
    
'perpage' => TYPE_INT,
    
'pagenumber' => TYPE_INT,
    
'do' => TYPE_STR,
    
'goto' => TYPE_STR,

));

// globalize variables
$vbulletin->input->clean_array_gpc('p', array(
    
'action' => TYPE_STR,
    
'do' => TYPE_STR,
    
'grps_submit' => TYPE_STR,
    
'grps_title' => TYPE_STR,
    
'grps_description' => TYPE_STR,
    
'grps_leader' => TYPE_INT,
    
'grps_cat' => TYPE_INT,
));

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

// temp admin options
// url of the grps
$groupurl $vbulletin->options['homeurl'] . "/groups/?groupid=$groupid";

$grps_rin rand(1,$vbulletin->options['grpsnumrandimages']); //random image to provide some variation

// this switch handles the right column
switch ($_GET['do']) 

    case 
"creategroup"
        
// ###################### lets lock out non-members and make em log-in
        
if (!$vbulletin->userinfo['userid'])
        {
            
//print_no_permission();
        
}

        
// ###################### lets make sure they have permission to make groups
        
if (!($vbulletin->userinfo['permissions']['grpspermissions'] & $vbulletin->bf_ugp_grpspermissions['groupscreate']))
        {
            
print_no_permission();
        }

        
// ###################### lets make sure they can afford it
        
if ($vbulletin->options['grpsstoreintegration'])
        {
            if (
$vbulletin->userinfo[$vbulletin->options[uttpoints_pointsfield]] < $vbulletin->options['grpsmakegroupcost'])
            {
                eval(
print_standard_error("grps_notenoughpoints"));
            }
        }

        
// add's page title
         
$grps_pagetitle "Create A Group"

        
// creates category drop down box
        
$grps_cats $db->query("
            SELECT *
            FROM grps_categories
            ORDER BY catid ASC
        "
);

        if (
$db->num_rows($grps_cats))
        {
            while (
$grps_catsoptions $db->fetch_array($grps_cats))
            {
                
$dropoption .= "<option value=\"$grps_catsoptions[catid]\">$grps_catsoptions[title]</option>\n";
            }
        }

        
$cat_drop "<select name=\"grps_cat\">\n" $dropoption "</select>";

        
// calls the template for creating groups.
        
eval("\$grps_main .= \"".fetch_template("groups_creategroup")."\";");
 
    break; 
    default:
         
// page title for grouphome.
         //$grps_pagetitle = "Groups @ " . $vbulletin->options['hometitle']; 

        // selects the number of validated groups for group home
        
$total $db->query_read("
            SELECT groupid 
            FROM grps
            WHERE approved = '1'
        "
);

          
$num $db->num_rows($total);

        
$grps_limit 10;

        
$grps_getcats $db->query_read("
            SELECT catid, title
            FROM grps_categories
        "
);

        while (
$grps_makecats $db->fetch_array($grps_getcats))
        {
            
$grps_makecats['title'] = trim(stripslashes($grps_makecats['title']));

            
$grps_cats .= "<li id=\"catbullets\"><strong><a href=\"browse.php?c=" $grps_makecats['catid'] . "\">" $grps_makecats['title'] . "</a></strong></li>\n";
        }

        if (
$vbulletin->options['grps_moderation'] == "1")
        {
            
$grps_moderation="WHERE grps.visible = '1'";
        }

// ###################### extracts newest groups for main grps page
            
$grps_newest $db->query_read("
                SELECT grps.groupid, grps.title, grps.description, grps.approved, grps.leaderid, grps_setting.hidden_group, user.username
                FROM grps
                LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = grps.leaderid)
                LEFT JOIN grps_setting ON (grps_setting.groupid = grps.groupid)
                WHERE grps.approved = '1' AND grps_setting.hidden_group != '1'
                GROUP BY grps.groupid
                ORDER BY grps.groupid DESC
                LIMIT 5
            "
);

            if (!
$db->num_rows($grps_newest))
            { 
// no groups, this becomes obselete after the first group gets created
                        
$grps_newestbits .= "<tr><td class=\"alt1\" align=\"center\">no groups found at this time</td></tr>";
            }
            else
            { 
// display the information
                
while ($grps_newestinfo $db->fetch_array($grps_newest))
                {
                    
$grps_newestinfo['title'] = stripslashes($grps_newestinfo['title']);
                    
$grps_newestinfo['description'] = nl2br(stripslashes($grps_newestinfo['description']));
                    
extract($grps_newestinfo);

                     eval(
'$grps_newestbits .= "' fetch_template("groups_groupshome_newestbits") . '";');
                    
                } 
//now echo the date into the template
            
}

// ###################### extracts largest (most members) groups for main grps page
            
$grps_largest $db->query_read("
                SELECT COUNT(*) AS totalmembers, grps.groupid, grps.title, grps.description, grps.approved, grps_setting.hidden_group, user.username, grps_user.join_date
                FROM grps_user
                LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = grps_user.userid)
                LEFT JOIN grps ON (grps.groupid = grps_user.groupid)
                LEFT JOIN grps_setting ON (grps_setting.groupid = grps.groupid)
                WHERE grps.approved = '1' AND grps_setting.hidden_group != '1'
                GROUP BY grps.groupid
                ORDER BY totalmembers DESC, grps.groupid DESC, grps_user.join_date DESC
                LIMIT 5 
            "
);

            if (!
$db->num_rows($grps_largest))
            { 
// no groups, this becomes obselete after the first group gets created
                        
$grps_largestbits .= "<tr><td class=\"alt1\" align=\"center\">no groups found at this time</td></tr>";
            }
            else
            { 
// display the information
                
$totalmembers $grps_largestinfo['totalmembers'];
                while (
$grps_largestinfo $db->fetch_array($grps_largest))
                {
                    
$grps_largestinfo['title'] = nl2br(stripslashes($grps_largestinfo['title']));
                    
$grps_largestinfo['description'] = nl2br(stripslashes($grps_largestinfo['description']));
                    
$grps_largestinfo['membercount'] = number_format($grps_largestinfo['membercount']);
                    
extract($grps_largestinfo);
                    
                    eval(
'$grps_largestbits .= "' fetch_template("groups_groupshome_largestbits") . '";');
                }
            }


// ###################### extracts popular (most messages) groups for main grps page
            
$grps_popular $db->query_read("
                SELECT COUNT(*) AS totalposts, grps.groupid, grps.title, grps.description, grps.approved, grps_setting.hidden_group, user.username
                FROM grps_post
                LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = grps_post.userid)
                LEFT JOIN grps ON (grps.groupid = grps_post.groupid)
                LEFT JOIN grps_setting ON (grps_setting.groupid = grps.groupid)
                WHERE grps.approved = '1' AND grps_setting.hidden_group != '1'
                GROUP BY grps.groupid
                ORDER BY totalposts DESC, grps.groupid DESC
                LIMIT 5 
            "
);

            if (!
$db->num_rows($grps_popular))
            { 
// no groups, this becomes obselete after the first group gets created
                        
$grps_popularbits .= "<tr><td class=\"alt1\" align=\"center\">no groups found at this time</td></tr>";
            }
            else
            { 
// display the information
                
$totalposts $grps_popularinfo['totalposts'];
                while (
$grps_popularinfo $db->fetch_array($grps_popular))
                {
                    
$grps_popularinfo['title'] = nl2br(stripslashes($grps_popularinfo['title']));
                    
$grps_popularinfo['description'] = nl2br(stripslashes($grps_popularinfo['description']));
                    
$grps_popularinfo['postcount'] = number_format($grps_popularinfo['postcount']);
                    
extract($grps_popularinfo);
                    
                    eval(
'$grps_popularbits .= "' fetch_template("groups_groupshome_popularbits") . '";');
                 }
            }
        eval(
"\$grps_main = \"".fetch_template("groups_groupshome")."\";");
    } 

// ###################### processing action actions
    
if ($_POST['action'] == "docreategroup")
    { 
// start process for creating a group
        
if ($vbulletin->GPC['grps_submit'] && trim($vbulletin->GPC['grps_title']) != "" && trim($vbulletin->GPC['grps_description']) != "" && !empty($vbulletin->userinfo['userid']))
        { 
//make sure theirs everything you need to submit a form 

            // lets enter it into the database
            
$db->query_read("
                INSERT INTO grps(title, description, catid, approved, leaderid, membercount)
                VALUES ('" 
addslashes($vbulletin->GPC['grps_title']) . "', '" addslashes($vbulletin->GPC['grps_description']) . "', " intval($vbulletin->GPC['grps_cat']) . ", '0', " $vbulletin->userinfo['userid'] . ", 1)
            "
);

            
// ###################### lets do the transaction
            
if ($vbulletin->options['grpsstoreintegration'])
            {
                if (
$vbulletin->userinfo[$vbulletin->options[uttpoints_pointsfield]] >= $vbulletin->options['grpsmakegroupcost'])
                {
                    
$chching intval($vbulletin->userinfo[$vbulletin->options[uttpoints_pointsfield]] - $vbulletin->options['grpsmakegroupcost']);
                    
$db->query_read("
                        UPDATE " 
TABLE_PREFIX "user
                        SET " 
$vbulletin->options[uttpoints_pointsfield] . " = $chching
                        WHERE userid = " 
$vbulletin->userinfo[userid] . "
                    "
);
                }
            }

            if (
$vbulletin->options['grps_notifyadminnewgroup'])
            {
                
vbmail($vbulletin->options['webmasteremail'], $vbulletin->userinfo['username'] . " has created a new group"$vbulletin->userinfo['username'] . " has created a new group on your site, please could you go and moderate this group from within the Admin Control Panel.""From: \"" $this->vbulletin->options['hometitle'] . " Mailer\" <" $vbulletin->options['webmasteremail'] . ">");
            }

            
// thanks for submitting the form send you to index
            
$vbulletin->url "/groups/index.php?" $vbulletin->session->vars['sessionurl'];
            eval(
print_standard_redirect("grps_thanks"));
        }
        else
        { 
//they ++++ed up
            // submission error make em retake
            
$vbulletin->url $vbulletin->options[groupsurl] . $vbulletin->session->vars['sessionurl'] . "?do=creategroup";
            eval(
print_standard_redirect("grps_formerror"));
        } 
//form submitted either way
    
// end the process for creating a group


    
$navbits = array();
    
$navbits[$parent] = 'Groups';
    
$navbits construct_navbits($navbits);

    
//handles the rest of the page and layout.
    
eval('$grps_navbar = "' fetch_template('groups_navbar') . '";');
    eval(
'$headinclude = "' fetch_template('headinclude') . '";');
    
$headinclude grps_rewrite_links($headinclude);
    eval(
'$navbar = "' fetch_template('navbar') . '";');
    
$navbar grps_rewrite_links($navbar);
    eval(
'$footer = "' fetch_template('footer') . '";');
    
$footer grps_rewrite_links($footer);
    eval(
"print_output(\"".fetch_template("GROUPS")."\");");

?>

Config:

PHP Code:

<?php

//XXXXXXXXXXXXXXXXXX;,XMMMMMS i7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSXXXXXXSSXXXSXXXXXXSXXXSXSXXSXXSXXSXXXX
//XXXXXXXXXXXXXXXX7:XMM0aaZWMMX.rXXXXXXX77;iiiii;7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXiXMZXXS22XX8M0 rXXXXX7r20@MMMW8;;7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXX7.M8XXXr :0MMMMZ:XXXX72W8S7rrXS8MB;;7XXXXXXXXXXSXXXSXXXXXXSXXXXXXXXXXXSXXXXXXXSXXXXXX
//77777X7777X77XXiSMSXrWMMMBi ,@M XX7rZ8;,,,,i;;;7aMSi777XX77XXX7XX77XXXXX77X7XXX7XX77XX7XXX7XX7XXXXXX
//XXX7777XX777777:BMMMZr     i;ZM 777SZi,:::ii;r;r7S@a:777777777777777X7XX777X7X7XXXXXXX7777XX7XX77X77
//XXXXXXXXXXXXXXX:ZM.     .,:;rZM 77:8,,::..     .:iXMr;XXXXXXXXXXXXX7X7XXXX7X7X77X7XX77XXXXXXXXXXXXXX
//777777777777777iiMX:,,,,::irXMa.7riM,     .;0MMMM8iXM.r777777777777777777777777777777777r777777777r7
//777777777777777r.@MX.,:iiiir2@  ;;7MMMMMMMM@ar:.iX8SMi;777777777777777777777777777777777777777777777
//7777777777777777i MM@r::iir8MMWX   Mi        .ii;;rS@Xi777777777777777777777777777777777777777777777
//rrrrrrrrrrrrrrrrri  iMMMMMMM070MM7 ;Z.,.....,:i;rraZ8X:rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//r77777777rrrrrrrrr rMaW77i :::i;ZMM a;,,,,::i;r77rZ@0:irrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//rr;rr;r;i.      ,. MX:7    BSX7r7aMM.2;iii;;;rX772MMM ;rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//rrrrr;,   ;B@@8:  28;72@   MSXXrrXWMMaMXii;;r7X7SM,  ,rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//;rr;i  XMMMMMMMMMMM:iXX@   M2X2X;SB@M .M0X;;;7a@MM7. ,;rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr;r;rrrrr;
//;;ii  MMM@WWWWWWMMM8.XXZM  MS::arX@Mr 2ZMMMMMMMM7iSMM  :;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;  MM@WWWWWWWWWBM0 7XSM  MSa Z00B; MMBr2SZ8r :rSSSZM2 .i;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;r;;;;;;;;
//ii. MM@WWWWMMMM@WMM22XS2BW M0MBa0.     7MM@8SrS2aZ8Z22MM  :iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
//;; ,MMMM@W@@.  MMM, Za2aZ0.Si;:           MMaWMMMMMMMMMMMZ i;;;;iiiii;;;;;;;iiiiiiiii;;;iiiiiiiiiiii
//i: MM8 8@WWWaMMMX  .rZ    ,r7   ;MMMMMMMW  MMX          .MMS27;;rrr;iiiiiiiiir777r;iiiiiiiiiiiiiiiii
//ii MM  WMWMMMM    ,:iM .i;S,  :MMMMMMMMMMM     :MMMMMZ        ZX;;rSaS7;ii;X2r.  ;SX;iiiiiiiiiiiiiii
//i: MMaZM@MM0    ,,::iM; ;X   MMMMMM    MMM  rMMMMMMMMMMMMMMM           XSXS         X;iiiiiiiiiiiiii
//:: MMM@@MMi  .:,::i;;M; 7   MMMM;       MM MMMMMMMMMMMMMMMMMMM.MMMMMS        MMMMM   7i:::i:::::::::
//::  MM@WMM  :i;ii;;rrM  .  MMMM   XMMM  MM MMMM  MMM      WMMMMMMMMMMMMW   MMMMMMMM  i;iiiiiiiiiiiii
//::  MM@MM  i;77rrrrr2MX8  MMMM              WM2  MMM      MMMMMBMMM:MMMMMMMMMM0  MMM  r,,,,,:,,,,,,:
//:::  MMMM ir;rXrrr78MMMM :MMM        ,7ZMM@a::S 8MM.   MMMMMMM  MM    :MMMMMM    MMM  7:::::::::::::
//,,,   MMM2rX77X7X0MMZ7M  MMM0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM   MMM  7   MMMM  :, MMM  r,,,,,,,,,,,,,
//,,,,   MMMMMMMMMMMW  aM  MMM2MMMMMMMMMMMMMMMMMMMMMMMMMMMMB     MMM .r  MMMMM  ;  MMM  Xrr;i:,,,,,,,,
//,,,,,.   SX.;aM7      M  MMM :88i      MMMr   MMMMMMMMM    :i  MMX    7MMMM                :i,,,,,.,
//,..,.,.  B7i:..2M   , ;i @MMM        @MMMM    MMMMM  MMMM      MMX @MMMMMMMMMMMMMMMMMMMMB   .:......
//..,...  MWSX7772WM2    M  MMMMMMMMMMMMMMMa  ,   MMM   MMMM  MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM  :,,,,,,
//......  M2 S7XSr ,BM    M  MMMMMMMMMMMMZ   ::i. 8MMM   MMMMMMMMMMMMMM2       ;20MMMMMMMMMMMZ .......
//...... MMZ7Z22aBS82@M,  @M   MMMMMMMM     :,.,.  MMM    .MMMMMWMMM         .            MMMB  ,.....
//.,,,,. MMMMMMMMMMMMMMMM: MMM           ::,,,,,,  MMM  ,   0MMMMMMM   :::. MMM  .::::   MMMM  ,,,,,,.
//                                                 :MM@       ;MMMMMMM      MMM         MMMMZ         
//                                                               MMMMM      0MMM      SMMMMM          
//       GRPS: Commune For Groups                                 ,MMMa      MMMMX  MMMMMM            
//             vBulletin Add-On Software                           MMMM       MMMMMMMMMMM             
//                             by sabret00the                       MMM         MMMMMMa               
//                                    Copyright 2005                 M                                

// ## Changes Directory so it can accesss vBulletin IF we are outside the forums folder, if not this is not nessary ##
chdir("../");

// ## Set GRPS to rewrite links and images automatically
$rewrite_links TRUE;

?>


bada_bing 09-28-2006 01:33 AM

Quote:

Originally Posted by :Judge:
Awesome Add On!!

I have a few minor issues that I cannot find to fix:

1. Group Leader Avatar - Not showing up, the image path is obviously wrong http://www.mysite.com/forums/http://...?u=1&dateline=

2. Invite PM - The link in the PM to accept an invite is going to mysite.com/groups (it should be) mysite.com/forums/groups

3. Should there be an option to upload a groups photos or random is all it gets?

4. How could I go in to edit my navbits? Would like Forums - Groups - Group Name.

5. No Group Info in Member Profile. I am using a bit of the MySpace profile re-write, is this why I am not getting any group info?

Thanks, other then the above it works great for me so far. Im sure these are simple fixes I just am not finding the correct places to make the edits.

YEs I am having simular issues also with the avator not showing up because it point to /groups instead of /forums/

I also have vbpager installed and the pager link point to /groups/bla/bla/bla

Need to fix this ...

TheBlackPoet 09-28-2006 03:20 AM

i never could get hacks like this to work on my forum.. it must be something set up in my dbase that prevents it... try try try... no success...
not your fault though...

sabret00the 09-28-2006 08:19 AM

Quote:

Originally Posted by bada_bing
Can you please... You have my info still?

sure thing, i'll do it sometime today.

sabret00the 09-28-2006 08:21 AM

Quote:

Originally Posted by soletrader
I just need to overwrite the functions_grps.php only when upgrading from rc4?

nope, all files. just the functions_grps.php was for a problem with the first RC5 zip i threw up. there at atleast two changed instances in index.php in RC5 i can't recall whatelse.

sabret00the 09-28-2006 08:22 AM

Quote:

Originally Posted by serg472
Another bugs in grps_moderate.php

This piece of code:

PHP Code:

$groups $db->query("
            SELECT grps.groupid, grps.title, grps.description, grps.leaderid, user.username, grps_categories.catid, grps_categories.title AS catname
            FROM grps
            LEFT JOIN user ON (user.userid = grps.leaderid)
            LEFT JOIN grps_categories ON (grps_categories.catid = grps.catid)
            WHERE approved != '1'
        "
); 


should be replaced with:

PHP Code:

$groups $db->query("
            SELECT grps.groupid, grps.title, grps.description, grps.leaderid, " 
TABLE_PREFIX "user.username, grps_categories.catid, grps_categories.title AS catname
            FROM grps
            LEFT JOIN " 
TABLE_PREFIX "user ON (" TABLE_PREFIX "user.userid = grps.leaderid)
            LEFT JOIN grps_categories ON (grps_categories.catid = grps.catid)
            WHERE approved != '1'
        "
); 



And this one:

PHP Code:

$adddata $db->query_first("
                SELECT *
                FROM grps
                LEFT JOIN " 
TABLE_PREFIX "user ON (user.userid = grps.leaderid)
                WHERE groupid = 
$groupid
                LIMIT 1
            "
); 

Should be replaced with:

PHP Code:

$adddata $db->query_first("
                SELECT *
                FROM grps
                LEFT JOIN " 
TABLE_PREFIX "user ON (" TABLE_PREFIX "user.userid = grps.leaderid)
                WHERE groupid = 
$groupid
                LIMIT 1
            "
); 


thanks for the heads up, though if you've made the changes yourself, they should be
[php] LEFT JOIN " . TABLE_PREFIX . "user ON[php] becomes
PHP Code:

                LEFT JOIN " . TABLE_PREFIX . "user user ON 


sabret00the 09-28-2006 08:25 AM

Quote:

Originally Posted by .Tim
The install seems to go fine and I get a "done" message but the groups page still shows up blank. Am I not doing something right?

if you'd like me to take a look at your installtion, then drop me a pm with your ftp details and an admin login to your forums.

sabret00the 09-28-2006 08:33 AM

Quote:

Originally Posted by :Judge:
Awesome Add On!!

I have a few minor issues that I cannot find to fix:

1. Group Leader Avatar - Not showing up, the image path is obviously wrong http://www.mysite.com/forums/http://...?u=1&dateline=

2. Invite PM - The link in the PM to accept an invite is going to mysite.com/groups (it should be) mysite.com/forums/groups

3. Should there be an option to upload a groups photos or random is all it gets?

4. How could I go in to edit my navbits? Would like Forums - Groups - Group Name.

5. No Group Info in Member Profile. I am using a bit of the MySpace profile re-write, is this why I am not getting any group info?

Thanks, other then the above it works great for me so far. Im sure these are simple fixes I just am not finding the correct places to make the edits.

Awesome Add On!!

I have a few minor issues that I cannot find to fix:

1. Please see the first post of this thread

2. You'll have to edit that manually, this was designed to run adjacent to your forums directory and not within it. the file you need to edit is groups/invitation.php. i would've posted the code but it's too long lines and very straight forward. just find
PHP Code:

$vbulletin->options['homeurl'] . "/groups/ 

and replace with
PHP Code:

$vbulletin->options['bburl'] . "/groups/ 

3. It's an unreleased add-on.

4. Hopefully someone will release an add on for that, in short it requires you finding each instance of
PHP Code:

$navbits = array(); 

and replace that with
PHP Code:

$navbits = array();
$navbits["index.php?" $vbulletin->session->vars['sessionurl']] = 'Groups Home'

5. I wasn't aware there was supposed to be groups info in a members profile at all. there is a link to a users group from the drop down in the postbit, thus sadly it'd require an add-on as it's not part of the stock release.

sorry if this isn't too helpful.

sabret00the 09-28-2006 08:35 AM

Quote:

Originally Posted by bada_bing
YEs I am having simular issues also with the avator not showing up because it point to /groups instead of /forums/

I also have vbpager installed and the pager link point to /groups/bla/bla/bla

Need to fix this ...

your vBpageer thing is either gonna require customisation of the php file or a template conditional to hide it within groups. as for your images not working problem, it's different to his ones.

sabret00the 09-28-2006 08:36 AM

Quote:

Originally Posted by TheBlackPoet
i never could get hacks like this to work on my forum.. it must be something set up in my dbase that prevents it... try try try... no success...
not your fault though...

what's the problem?

sabret00the 09-28-2006 08:43 AM

Quote:

Originally Posted by ronoxQ
Sorry I'm being a pain. X_x

Index:

PHP Code:

<?php

//XXXXXXXXXXXXXXXXXX;,XMMMMMS i7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSXXXXXXSSXXXSXXXXXXSXXXSXSXXSXXSXXSXXXX
//XXXXXXXXXXXXXXXX7:XMM0aaZWMMX.rXXXXXXX77;iiiii;7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXiXMZXXS22XX8M0 rXXXXX7r20@MMMW8;;7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXX7.M8XXXr :0MMMMZ:XXXX72W8S7rrXS8MB;;7XXXXXXXXXXSXXXSXXXXXXSXXXXXXXXXXXSXXXXXXXSXXXXXX
//77777X7777X77XXiSMSXrWMMMBi ,@M XX7rZ8;,,,,i;;;7aMSi777XX77XXX7XX77XXXXX77X7XXX7XX77XX7XXX7XX7XXXXXX
//XXX7777XX777777:BMMMZr     i;ZM 777SZi,:::ii;r;r7S@a:777777777777777X7XX777X7X7XXXXXXX7777XX7XX77X77
//XXXXXXXXXXXXXXX:ZM.     .,:;rZM 77:8,,::..     .:iXMr;XXXXXXXXXXXXX7X7XXXX7X7X77X7XX77XXXXXXXXXXXXXX
//777777777777777iiMX:,,,,::irXMa.7riM,     .;0MMMM8iXM.r777777777777777777777777777777777r777777777r7
//777777777777777r.@MX.,:iiiir2@  ;;7MMMMMMMM@ar:.iX8SMi;777777777777777777777777777777777777777777777
//7777777777777777i MM@r::iir8MMWX   Mi        .ii;;rS@Xi777777777777777777777777777777777777777777777
//rrrrrrrrrrrrrrrrri  iMMMMMMM070MM7 ;Z.,.....,:i;rraZ8X:rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//r77777777rrrrrrrrr rMaW77i :::i;ZMM a;,,,,::i;r77rZ@0:irrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//rr;rr;r;i.      ,. MX:7    BSX7r7aMM.2;iii;;;rX772MMM ;rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//rrrrr;,   ;B@@8:  28;72@   MSXXrrXWMMaMXii;;r7X7SM,  ,rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//;rr;i  XMMMMMMMMMMM:iXX@   M2X2X;SB@M .M0X;;;7a@MM7. ,;rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr;r;rrrrr;
//;;ii  MMM@WWWWWWMMM8.XXZM  MS::arX@Mr 2ZMMMMMMMM7iSMM  :;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;  MM@WWWWWWWWWBM0 7XSM  MSa Z00B; MMBr2SZ8r :rSSSZM2 .i;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;r;;;;;;;;
//ii. MM@WWWWMMMM@WMM22XS2BW M0MBa0.     7MM@8SrS2aZ8Z22MM  :iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
//;; ,MMMM@W@@.  MMM, Za2aZ0.Si;:           MMaWMMMMMMMMMMMZ i;;;;iiiii;;;;;;;iiiiiiiii;;;iiiiiiiiiiii
//i: MM8 8@WWWaMMMX  .rZ    ,r7   ;MMMMMMMW  MMX          .MMS27;;rrr;iiiiiiiiir777r;iiiiiiiiiiiiiiiii
//ii MM  WMWMMMM    ,:iM .i;S,  :MMMMMMMMMMM     :MMMMMZ        ZX;;rSaS7;ii;X2r.  ;SX;iiiiiiiiiiiiiii
//i: MMaZM@MM0    ,,::iM; ;X   MMMMMM    MMM  rMMMMMMMMMMMMMMM           XSXS         X;iiiiiiiiiiiiii
//:: MMM@@MMi  .:,::i;;M; 7   MMMM;       MM MMMMMMMMMMMMMMMMMMM.MMMMMS        MMMMM   7i:::i:::::::::
//::  MM@WMM  :i;ii;;rrM  .  MMMM   XMMM  MM MMMM  MMM      WMMMMMMMMMMMMW   MMMMMMMM  i;iiiiiiiiiiiii
//::  MM@MM  i;77rrrrr2MX8  MMMM              WM2  MMM      MMMMMBMMM:MMMMMMMMMM0  MMM  r,,,,,:,,,,,,:
//:::  MMMM ir;rXrrr78MMMM :MMM        ,7ZMM@a::S 8MM.   MMMMMMM  MM    :MMMMMM    MMM  7:::::::::::::
//,,,   MMM2rX77X7X0MMZ7M  MMM0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM   MMM  7   MMMM  :, MMM  r,,,,,,,,,,,,,
//,,,,   MMMMMMMMMMMW  aM  MMM2MMMMMMMMMMMMMMMMMMMMMMMMMMMMB     MMM .r  MMMMM  ;  MMM  Xrr;i:,,,,,,,,
//,,,,,.   SX.;aM7      M  MMM :88i      MMMr   MMMMMMMMM    :i  MMX    7MMMM                :i,,,,,.,
//,..,.,.  B7i:..2M   , ;i @MMM        @MMMM    MMMMM  MMMM      MMX @MMMMMMMMMMMMMMMMMMMMB   .:......
//..,...  MWSX7772WM2    M  MMMMMMMMMMMMMMMa  ,   MMM   MMMM  MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM  :,,,,,,
//......  M2 S7XSr ,BM    M  MMMMMMMMMMMMZ   ::i. 8MMM   MMMMMMMMMMMMMM2       ;20MMMMMMMMMMMZ .......
//...... MMZ7Z22aBS82@M,  @M   MMMMMMMM     :,.,.  MMM    .MMMMMWMMM         .            MMMB  ,.....
//.,,,,. MMMMMMMMMMMMMMMM: MMM           ::,,,,,,  MMM  ,   0MMMMMMM   :::. MMM  .::::   MMMM  ,,,,,,.
//                                                 :MM@       ;MMMMMMM      MMM         MMMMZ         
//                                                               MMMMM      0MMM      SMMMMM          
//       GRPS: Commune For Groups                                 ,MMMa      MMMMX  MMMMMM            
//             vBulletin Add-On Software                           MMMM       MMMMMMMMMMM             
//                             by sabret00the                       MMM         MMMMMMa               
//                                    Copyright 2005                 M                                


// ################ SET SCRIPT LOCATION ENVIRONMENT ######################
require_once('./includes/config_grps.php');

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''groupshome');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array(
'GROUPS',
'groups_groupshome',
'groups_groupshome_newestbits',
'groups_groupshome_popularbits',
'groups_groupshome_largestbits',
'groups_groupshome_mygroups',
'groups_groupshome_mygroupsbits',
'groups_navbar',
);

// ######################### REQUIRE BACK-END ############################
require_once("./global.php");
require_once(
"./includes/functions_grps.php");

// pre-cache templates used by all actions
$globaltemplates = array();

// globalize variables
$vbulletin->input->clean_array_gpc('r', array(
    
'perpage' => TYPE_INT,
    
'pagenumber' => TYPE_INT,
    
'do' => TYPE_STR,
    
'goto' => TYPE_STR,

));

// globalize variables
$vbulletin->input->clean_array_gpc('p', array(
    
'action' => TYPE_STR,
    
'do' => TYPE_STR,
    
'grps_submit' => TYPE_STR,
    
'grps_title' => TYPE_STR,
    
'grps_description' => TYPE_STR,
    
'grps_leader' => TYPE_INT,
    
'grps_cat' => TYPE_INT,
));

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

// temp admin options
// url of the grps
$groupurl $vbulletin->options['homeurl'] . "/groups/?groupid=$groupid";

$grps_rin rand(1,$vbulletin->options['grpsnumrandimages']); //random image to provide some variation

// this switch handles the right column
switch ($_GET['do']) 

    case 
"creategroup"
        
// ###################### lets lock out non-members and make em log-in
        
if (!$vbulletin->userinfo['userid'])
        {
            
//print_no_permission();
        
}

        
// ###################### lets make sure they have permission to make groups
        
if (!($vbulletin->userinfo['permissions']['grpspermissions'] & $vbulletin->bf_ugp_grpspermissions['groupscreate']))
        {
            
print_no_permission();
        }

        
// ###################### lets make sure they can afford it
        
if ($vbulletin->options['grpsstoreintegration'])
        {
            if (
$vbulletin->userinfo[$vbulletin->options[uttpoints_pointsfield]] < $vbulletin->options['grpsmakegroupcost'])
            {
                eval(
print_standard_error("grps_notenoughpoints"));
            }
        }

        
// add's page title
         
$grps_pagetitle "Create A Group"

        
// creates category drop down box
        
$grps_cats $db->query("
            SELECT *
            FROM grps_categories
            ORDER BY catid ASC
        "
);

        if (
$db->num_rows($grps_cats))
        {
            while (
$grps_catsoptions $db->fetch_array($grps_cats))
            {
                
$dropoption .= "<option value=\"$grps_catsoptions[catid]\">$grps_catsoptions[title]</option>\n";
            }
        }

        
$cat_drop "<select name=\"grps_cat\">\n" $dropoption "</select>";

        
// calls the template for creating groups.
        
eval("\$grps_main .= \"".fetch_template("groups_creategroup")."\";");
 
    break; 
    default:
         
// page title for grouphome.
         //$grps_pagetitle = "Groups @ " . $vbulletin->options['hometitle']; 

        // selects the number of validated groups for group home
        
$total $db->query_read("
            SELECT groupid 
            FROM grps
            WHERE approved = '1'
        "
);

          
$num $db->num_rows($total);

        
$grps_limit 10;

        
$grps_getcats $db->query_read("
            SELECT catid, title
            FROM grps_categories
        "
);

        while (
$grps_makecats $db->fetch_array($grps_getcats))
        {
            
$grps_makecats['title'] = trim(stripslashes($grps_makecats['title']));

            
$grps_cats .= "<li id=\"catbullets\"><strong><a href=\"browse.php?c=" $grps_makecats['catid'] . "\">" $grps_makecats['title'] . "</a></strong></li>\n";
        }

        if (
$vbulletin->options['grps_moderation'] == "1")
        {
            
$grps_moderation="WHERE grps.visible = '1'";
        }

// ###################### extracts newest groups for main grps page
            
$grps_newest $db->query_read("
                SELECT grps.groupid, grps.title, grps.description, grps.approved, grps.leaderid, grps_setting.hidden_group, user.username
                FROM grps
                LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = grps.leaderid)
                LEFT JOIN grps_setting ON (grps_setting.groupid = grps.groupid)
                WHERE grps.approved = '1' AND grps_setting.hidden_group != '1'
                GROUP BY grps.groupid
                ORDER BY grps.groupid DESC
                LIMIT 5
            "
);

            if (!
$db->num_rows($grps_newest))
            { 
// no groups, this becomes obselete after the first group gets created
                        
$grps_newestbits .= "<tr><td class=\"alt1\" align=\"center\">no groups found at this time</td></tr>";
            }
            else
            { 
// display the information
                
while ($grps_newestinfo $db->fetch_array($grps_newest))
                {
                    
$grps_newestinfo['title'] = stripslashes($grps_newestinfo['title']);
                    
$grps_newestinfo['description'] = nl2br(stripslashes($grps_newestinfo['description']));
                    
extract($grps_newestinfo);

                     eval(
'$grps_newestbits .= "' fetch_template("groups_groupshome_newestbits") . '";');
                    
                } 
//now echo the date into the template
            
}

// ###################### extracts largest (most members) groups for main grps page
            
$grps_largest $db->query_read("
                SELECT COUNT(*) AS totalmembers, grps.groupid, grps.title, grps.description, grps.approved, grps_setting.hidden_group, user.username, grps_user.join_date
                FROM grps_user
                LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = grps_user.userid)
                LEFT JOIN grps ON (grps.groupid = grps_user.groupid)
                LEFT JOIN grps_setting ON (grps_setting.groupid = grps.groupid)
                WHERE grps.approved = '1' AND grps_setting.hidden_group != '1'
                GROUP BY grps.groupid
                ORDER BY totalmembers DESC, grps.groupid DESC, grps_user.join_date DESC
                LIMIT 5 
            "
);

            if (!
$db->num_rows($grps_largest))
            { 
// no groups, this becomes obselete after the first group gets created
                        
$grps_largestbits .= "<tr><td class=\"alt1\" align=\"center\">no groups found at this time</td></tr>";
            }
            else
            { 
// display the information
                
$totalmembers $grps_largestinfo['totalmembers'];
                while (
$grps_largestinfo $db->fetch_array($grps_largest))
                {
                    
$grps_largestinfo['title'] = nl2br(stripslashes($grps_largestinfo['title']));
                    
$grps_largestinfo['description'] = nl2br(stripslashes($grps_largestinfo['description']));
                    
$grps_largestinfo['membercount'] = number_format($grps_largestinfo['membercount']);
                    
extract($grps_largestinfo);
                    
                    eval(
'$grps_largestbits .= "' fetch_template("groups_groupshome_largestbits") . '";');
                }
            }


// ###################### extracts popular (most messages) groups for main grps page
            
$grps_popular $db->query_read("
                SELECT COUNT(*) AS totalposts, grps.groupid, grps.title, grps.description, grps.approved, grps_setting.hidden_group, user.username
                FROM grps_post
                LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = grps_post.userid)
                LEFT JOIN grps ON (grps.groupid = grps_post.groupid)
                LEFT JOIN grps_setting ON (grps_setting.groupid = grps.groupid)
                WHERE grps.approved = '1' AND grps_setting.hidden_group != '1'
                GROUP BY grps.groupid
                ORDER BY totalposts DESC, grps.groupid DESC
                LIMIT 5 
            "
);

            if (!
$db->num_rows($grps_popular))
            { 
// no groups, this becomes obselete after the first group gets created
                        
$grps_popularbits .= "<tr><td class=\"alt1\" align=\"center\">no groups found at this time</td></tr>";
            }
            else
            { 
// display the information
                
$totalposts $grps_popularinfo['totalposts'];
                while (
$grps_popularinfo $db->fetch_array($grps_popular))
                {
                    
$grps_popularinfo['title'] = nl2br(stripslashes($grps_popularinfo['title']));
                    
$grps_popularinfo['description'] = nl2br(stripslashes($grps_popularinfo['description']));
                    
$grps_popularinfo['postcount'] = number_format($grps_popularinfo['postcount']);
                    
extract($grps_popularinfo);
                    
                    eval(
'$grps_popularbits .= "' fetch_template("groups_groupshome_popularbits") . '";');
                 }
            }
        eval(
"\$grps_main = \"".fetch_template("groups_groupshome")."\";");
    } 

// ###################### processing action actions
    
if ($_POST['action'] == "docreategroup")
    { 
// start process for creating a group
        
if ($vbulletin->GPC['grps_submit'] && trim($vbulletin->GPC['grps_title']) != "" && trim($vbulletin->GPC['grps_description']) != "" && !empty($vbulletin->userinfo['userid']))
        { 
//make sure theirs everything you need to submit a form 

            // lets enter it into the database
            
$db->query_read("
                INSERT INTO grps(title, description, catid, approved, leaderid, membercount)
                VALUES ('" 
addslashes($vbulletin->GPC['grps_title']) . "', '" addslashes($vbulletin->GPC['grps_description']) . "', " intval($vbulletin->GPC['grps_cat']) . ", '0', " $vbulletin->userinfo['userid'] . ", 1)
            "
);

            
// ###################### lets do the transaction
            
if ($vbulletin->options['grpsstoreintegration'])
            {
                if (
$vbulletin->userinfo[$vbulletin->options[uttpoints_pointsfield]] >= $vbulletin->options['grpsmakegroupcost'])
                {
                    
$chching intval($vbulletin->userinfo[$vbulletin->options[uttpoints_pointsfield]] - $vbulletin->options['grpsmakegroupcost']);
                    
$db->query_read("
                        UPDATE " 
TABLE_PREFIX "user
                        SET " 
$vbulletin->options[uttpoints_pointsfield] . " = $chching
                        WHERE userid = " 
$vbulletin->userinfo[userid] . "
                    "
);
                }
            }

            if (
$vbulletin->options['grps_notifyadminnewgroup'])
            {
                
vbmail($vbulletin->options['webmasteremail'], $vbulletin->userinfo['username'] . " has created a new group"$vbulletin->userinfo['username'] . " has created a new group on your site, please could you go and moderate this group from within the Admin Control Panel.""From: \"" $this->vbulletin->options['hometitle'] . " Mailer\" <" $vbulletin->options['webmasteremail'] . ">");
            }

            
// thanks for submitting the form send you to index
            
$vbulletin->url "/groups/index.php?" $vbulletin->session->vars['sessionurl'];
            eval(
print_standard_redirect("grps_thanks"));
        }
        else
        { 
//they ++++ed up
            // submission error make em retake
            
$vbulletin->url $vbulletin->options[groupsurl] . $vbulletin->session->vars['sessionurl'] . "?do=creategroup";
            eval(
print_standard_redirect("grps_formerror"));
        } 
//form submitted either way
    
// end the process for creating a group


    
$navbits = array();
    
$navbits[$parent] = 'Groups';
    
$navbits construct_navbits($navbits);

    
//handles the rest of the page and layout.
    
eval('$grps_navbar = "' fetch_template('groups_navbar') . '";');
    eval(
'$headinclude = "' fetch_template('headinclude') . '";');
    
$headinclude grps_rewrite_links($headinclude);
    eval(
'$navbar = "' fetch_template('navbar') . '";');
    
$navbar grps_rewrite_links($navbar);
    eval(
'$footer = "' fetch_template('footer') . '";');
    
$footer grps_rewrite_links($footer);
    eval(
"print_output(\"".fetch_template("GROUPS")."\");");

?>

Config:

PHP Code:

<?php

//XXXXXXXXXXXXXXXXXX;,XMMMMMS i7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSXXXXXXSSXXXSXXXXXXSXXXSXSXXSXXSXXSXXXX
//XXXXXXXXXXXXXXXX7:XMM0aaZWMMX.rXXXXXXX77;iiiii;7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXXXiXMZXXS22XX8M0 rXXXXX7r20@MMMW8;;7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//XXXXXXXXXXXXXXX7.M8XXXr :0MMMMZ:XXXX72W8S7rrXS8MB;;7XXXXXXXXXXSXXXSXXXXXXSXXXXXXXXXXXSXXXXXXXSXXXXXX
//77777X7777X77XXiSMSXrWMMMBi ,@M XX7rZ8;,,,,i;;;7aMSi777XX77XXX7XX77XXXXX77X7XXX7XX77XX7XXX7XX7XXXXXX
//XXX7777XX777777:BMMMZr     i;ZM 777SZi,:::ii;r;r7S@a:777777777777777X7XX777X7X7XXXXXXX7777XX7XX77X77
//XXXXXXXXXXXXXXX:ZM.     .,:;rZM 77:8,,::..     .:iXMr;XXXXXXXXXXXXX7X7XXXX7X7X77X7XX77XXXXXXXXXXXXXX
//777777777777777iiMX:,,,,::irXMa.7riM,     .;0MMMM8iXM.r777777777777777777777777777777777r777777777r7
//777777777777777r.@MX.,:iiiir2@  ;;7MMMMMMMM@ar:.iX8SMi;777777777777777777777777777777777777777777777
//7777777777777777i MM@r::iir8MMWX   Mi        .ii;;rS@Xi777777777777777777777777777777777777777777777
//rrrrrrrrrrrrrrrrri  iMMMMMMM070MM7 ;Z.,.....,:i;rraZ8X:rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//r77777777rrrrrrrrr rMaW77i :::i;ZMM a;,,,,::i;r77rZ@0:irrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//rr;rr;r;i.      ,. MX:7    BSX7r7aMM.2;iii;;;rX772MMM ;rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//rrrrr;,   ;B@@8:  28;72@   MSXXrrXWMMaMXii;;r7X7SM,  ,rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
//;rr;i  XMMMMMMMMMMM:iXX@   M2X2X;SB@M .M0X;;;7a@MM7. ,;rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr;r;rrrrr;
//;;ii  MMM@WWWWWWMMM8.XXZM  MS::arX@Mr 2ZMMMMMMMM7iSMM  :;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;;;  MM@WWWWWWWWWBM0 7XSM  MSa Z00B; MMBr2SZ8r :rSSSZM2 .i;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;r;;;;;;;;
//ii. MM@WWWWMMMM@WMM22XS2BW M0MBa0.     7MM@8SrS2aZ8Z22MM  :iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
//;; ,MMMM@W@@.  MMM, Za2aZ0.Si;:           MMaWMMMMMMMMMMMZ i;;;;iiiii;;;;;;;iiiiiiiii;;;iiiiiiiiiiii
//i: MM8 8@WWWaMMMX  .rZ    ,r7   ;MMMMMMMW  MMX          .MMS27;;rrr;iiiiiiiiir777r;iiiiiiiiiiiiiiiii
//ii MM  WMWMMMM    ,:iM .i;S,  :MMMMMMMMMMM     :MMMMMZ        ZX;;rSaS7;ii;X2r.  ;SX;iiiiiiiiiiiiiii
//i: MMaZM@MM0    ,,::iM; ;X   MMMMMM    MMM  rMMMMMMMMMMMMMMM           XSXS         X;iiiiiiiiiiiiii
//:: MMM@@MMi  .:,::i;;M; 7   MMMM;       MM MMMMMMMMMMMMMMMMMMM.MMMMMS        MMMMM   7i:::i:::::::::
//::  MM@WMM  :i;ii;;rrM  .  MMMM   XMMM  MM MMMM  MMM      WMMMMMMMMMMMMW   MMMMMMMM  i;iiiiiiiiiiiii
//::  MM@MM  i;77rrrrr2MX8  MMMM              WM2  MMM      MMMMMBMMM:MMMMMMMMMM0  MMM  r,,,,,:,,,,,,:
//:::  MMMM ir;rXrrr78MMMM :MMM        ,7ZMM@a::S 8MM.   MMMMMMM  MM    :MMMMMM    MMM  7:::::::::::::
//,,,   MMM2rX77X7X0MMZ7M  MMM0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM   MMM  7   MMMM  :, MMM  r,,,,,,,,,,,,,
//,,,,   MMMMMMMMMMMW  aM  MMM2MMMMMMMMMMMMMMMMMMMMMMMMMMMMB     MMM .r  MMMMM  ;  MMM  Xrr;i:,,,,,,,,
//,,,,,.   SX.;aM7      M  MMM :88i      MMMr   MMMMMMMMM    :i  MMX    7MMMM                :i,,,,,.,
//,..,.,.  B7i:..2M   , ;i @MMM        @MMMM    MMMMM  MMMM      MMX @MMMMMMMMMMMMMMMMMMMMB   .:......
//..,...  MWSX7772WM2    M  MMMMMMMMMMMMMMMa  ,   MMM   MMMM  MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM  :,,,,,,
//......  M2 S7XSr ,BM    M  MMMMMMMMMMMMZ   ::i. 8MMM   MMMMMMMMMMMMMM2       ;20MMMMMMMMMMMZ .......
//...... MMZ7Z22aBS82@M,  @M   MMMMMMMM     :,.,.  MMM    .MMMMMWMMM         .            MMMB  ,.....
//.,,,,. MMMMMMMMMMMMMMMM: MMM           ::,,,,,,  MMM  ,   0MMMMMMM   :::. MMM  .::::   MMMM  ,,,,,,.
//                                                 :MM@       ;MMMMMMM      MMM         MMMMZ         
//                                                               MMMMM      0MMM      SMMMMM          
//       GRPS: Commune For Groups                                 ,MMMa      MMMMX  MMMMMM            
//             vBulletin Add-On Software                           MMMM       MMMMMMMMMMM             
//                             by sabret00the                       MMM         MMMMMMa               
//                                    Copyright 2005                 M                                

// ## Changes Directory so it can accesss vBulletin IF we are outside the forums folder, if not this is not nessary ##
chdir("../");

// ## Set GRPS to rewrite links and images automatically
$rewrite_links TRUE;

?>


sorry RonoxQ, it's unbeleivably hard to follow a conversation in this thread, your problem is the on about it linking to everything wrongly right? someone else had that problem and it was the Zoints SEO mod. if that's not your problem (i'll get a chance to read back through the thread in about half hour) then just hold tight, this message will be edited.

soletrader 09-28-2006 08:59 AM

Is it possible for each group to have its own picture?

sabret00the 09-28-2006 09:10 AM

Quote:

Originally Posted by soletrader
Is it possible for each group to have its own picture?

not within the confines of the stock installation.

Lionel 09-28-2006 09:55 AM

Are you sure you updated rc5? It still does not redirect and templates have not changed too

sabret00the 09-28-2006 10:04 AM

Quote:

Originally Posted by Lionel
Are you sure you updated rc5? It still does not redirect and templates have not changed too

what templates were supposed to change?

you're right, i forgot to copy the new index.php over into the zip. sadly that'll have to wait till RC6

in the meanwhile, consider this a patch. for the groups/index.php replace:
PHP Code:

            // thanks for submitting the form send you to index
            
$vbulletin->url "/groups/index.php?" $vbulletin->session->vars['sessionurl'];
            eval(
print_standard_redirect("grps_thanks"));
        }
        else
        { 
//they ++++ed up
            // submission error make em retake
            
$vbulletin->url $vbulletin->options[groupsurl] . $vbulletin->session->vars['sessionurl'] . "?do=creategroup";
            eval(
print_standard_redirect("grps_formerror"));
        } 
//form submitted either way 

with:
PHP Code:

            // thanks for submitting the form send you to index
            
$vbulletin->url "index.php?" $vbulletin->session->vars['sessionurl'];
            eval(
print_standard_redirect("grps_thanks"TRUETRUE));
        }
        else
        { 
//they ++++ed up
            // submission error make em retake
            
$vbulletin->url "index.php" $vbulletin->session->vars['sessionurl'] . "?do=creategroup";
            eval(
print_standard_redirect("grps_formerror"TRUETRUE));
        } 
//form submitted either way 


Lionel 09-28-2006 01:20 PM

Thanks, all is fine now, just the phrase I had to create... By templates, I meant that I customized the templates and at every upgrade, vbulletin ask me to revert, and it did not this time.

In the patch, you forgot the closing bracket

} // end the process for creating a group

sabret00the 09-28-2006 03:37 PM

Quote:

Originally Posted by Lionel
Thanks, all is fine now, just the phrase I had to create... By templates, I meant that I customized the templates and at every upgrade, vbulletin ask me to revert, and it did not this time.

In the patch, you forgot the closing bracket

} // end the process for creating a group

what templates did you customize and why?

and thanks, fixed :)

Lionel 09-28-2006 05:15 PM

just a little cosmetic change, a matter of taste

Lionel 09-28-2006 05:20 PM

It'll be nice to have a cron job to auto delete inactive groups (with zero posts) after 30 days :-)

Lionel 09-29-2006 02:54 PM

I altered the the description column in grps_categories to make it mediumtxt. It did not make sense that nice big editor box for varchar (250). Indeed my first real group got created and the description got cut-off, making it very brief next to a large group image.

Lionel 09-29-2006 03:48 PM

I changed [homeurl] to [bburl] in the usercp plugin.
Why would it display a group that I am not subscribed to in the usercp?

Lionel 09-29-2006 03:59 PM

in viewthread.php, I also made
Quote:

$stylevar['imgdir_button'] . '/infraction.gif"'
into

Quote:

'src="$stylevar[imgdir_button]/infraction.gif"'
and that stopped displaying the broken image for reputation.gif

and i changed the url into bburl instead of homeurl in same viewthread

Quote:

// temp admin options
// url of the grps
$groupurl = "$vbulletin->options[bburl]/groups/?g=$groupid";

Snake 09-29-2006 04:42 PM

I get this error while running the installer file. Any idea?

Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/golf1663/public_html/forums/groups/tools/grps_installer.php on line 45

Warning: main(./global.php) [function.main]: failed to open stream: No such file or directory in /home/golf1663/public_html/forums/groups/tools/grps_installer.php on line 65

Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/golf1663/public_html/forums/groups/tools/grps_installer.php on line 65

sabret00the 09-29-2006 04:46 PM

Quote:

Originally Posted by Lionel
I changed [homeurl] to [bburl] in the usercp plugin.
Why would it display a group that I am not subscribed to in the usercp?

it definately shouldn't do that.

are you sure it's (the groupid) not within the grps array within the user table?

sabret00the 09-29-2006 04:49 PM

Quote:

Originally Posted by Lionel
in viewthread.php, I also made into



and that stopped displaying the broken image for reputation.gif

and i changed the url into bburl instead of homeurl in same viewthread

i had no idea that broken image even existed. thanks for the heads up.

sabret00the 09-29-2006 04:50 PM

Quote:

Originally Posted by Lionel
I altered the the description column in grps_categories to make it mediumtxt. It did not make sense that nice big editor box for varchar (250). Indeed my first real group got created and the description got cut-off, making it very brief next to a large group image.

originally i had that field set at 500 but upon installing it on my liveboard, it appears MySQL 4 isn't in favour of that.

sabret00the 09-29-2006 04:51 PM

Quote:

Originally Posted by Snake
I get this error while running the installer file. Any idea?

Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/golf1663/public_html/forums/groups/tools/grps_installer.php on line 45

Warning: main(./global.php) [function.main]: failed to open stream: No such file or directory in /home/golf1663/public_html/forums/groups/tools/grps_installer.php on line 65

Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/golf1663/public_html/forums/groups/tools/grps_installer.php on line 65

did you edit your grps_installer.php?

if your config.php is set to
PHP Code:

chdir('../forums'); 

then your grps_installer.php should be set to
PHP Code:

chdir('../../forums'); 


Lionel 09-29-2006 05:43 PM

Quote:

Originally Posted by sabret00the
it definately shouldn't do that.

are you sure it's (the groupid) not within the grps array within the user table?


I also had to change invitations url in invitations.php

homeurl points to www.site.com
bburl correctly points to www.site.com/forums/ where the group folder is located

In all instances I was getting www.site.com/groups/ cannot find

Lionel 09-29-2006 05:45 PM

I hope you don't mind all my reportings. I am not trying to be smart. I simply love your hack and am trying to help.

Lionel 09-29-2006 06:12 PM

While putting a padding around image in groups_display_main, I saw this

Quote:

<if condition="$grps_plugin[gallery]"><div$grps_gallery[style]>
What is the group gallery?

Snake 09-29-2006 07:17 PM

Quote:

Originally Posted by sabret00the
did you edit your grps_installer.php?

if your config.php is set to
PHP Code:

chdir('../forums'); 

then your grps_installer.php should be set to
PHP Code:

chdir('../../forums'); 


It is set to that already.

Quote:

// ################ SET SCRIPT LOCATION ENVIRONMENT ######################
chdir('../../forums/groups/tools/grps_installer.php');
Still getting the same error.

:Judge: 09-29-2006 07:44 PM

Ok my issues are taken care of, thank you for the help. Can't wait to see some addons, it's nice as is but it could be a hell of alot better.

If your charging for addons let me know what you have and what they are running.

Thanks

ChurchMedia 09-29-2006 08:37 PM

I'm still getting a few DB errors in admincp -- missing table prefixes.

This hack is a great idea. My members are going to love it when I get it up and running! :)

Lionel 09-29-2006 08:39 PM

Please, although it is saying username all over on the invitation form, I already have people trying to put email addresses and of course, they get

Quote:

Fatal error: Unable to proceed with save while $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 779
is there a way to verify a username in the below and display a vb error if not found?

Thanks.

PHP Code:

 foreach ($vbulletin->GPC['invite_username'] as $key => $invite)
 {
  if (!empty(
$invite))
  {
   
// create the DM to do error checking and insert the new PM
   
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);
   
$pmdm->set('fromuserid'$vbulletin->userinfo['userid']);
   
$pmdm->set('fromusername'$vbulletin->userinfo['username']);
   
$pmdm->set('title'$newpmtitle);
   
$pmdm->set('message'$message);
   
$pmdm->set_recipients($invite$botpermissions);
   
$pmdm->set('dateline'TIMENOW);
   
$pmdm->save();  
  }
 } 


whitetigergrowl 09-29-2006 10:26 PM

Quote:

Originally Posted by sabret00the
what's the exact database error? and what's the url or the 404?

url:

http://www.powerrangerempire.com/com....php?do=groups

^^^ Its to moderate the groups.

database error:

Quote:

Database error in vBulletin 3.6.1:

Invalid SQL:

SELECT grps.groupid, grps.title, grps.description, grps.leaderid, user.username, grps_categories.catid, grps_categories.title AS catname
FROM grps
LEFT JOIN user ON (user.userid = grps.leaderid)
LEFT JOIN grps_categories ON (grps_categories.catid = grps.catid)
WHERE approved != '1';

MySQL Error : Table 'powerran_vb.user' doesn't exist
Error Number : 1146
Date : Friday, September 29th 2006 @ 06:25:22 PM
Script : http://www.powerrangerempire.com/com....php?do=groups
Referrer : http://www.powerrangerempire.com/groups/index.php?
IP Address : xxxxxxxxxxxxxxxxx
Username :xxxxxxxx
Classname : vB_Database


All times are GMT. The time now is 02:22 PM.

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.02952 seconds
  • Memory Usage 2,386KB
  • 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
  • (26)bbcode_php_printable
  • (27)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
  • (40)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