vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   FlashChat : Integration upgrades for vBulletin. (https://vborg.vbsupport.ru/showthread.php?t=74613)

pgowder 05-13-2005 12:12 PM

Little confused! I'm just starting to install flashchat, do i start with this hack?

Paul M 05-13-2005 02:27 PM

No, Install flashchat and get it working first, then you can install this hack. :)

pgowder 05-13-2005 02:37 PM

Quote:

Originally Posted by Paul M
No, Install flashchat and get it working first, then you can install this hack. :)

Where is Flash Chat hack?? Or download?

Paul M 05-13-2005 03:19 PM

<a href="http://www.tufat.com" target="_blank">www.tufat.com</a> - it costs $5.

Paul M 05-14-2005 02:22 AM

Version 1.55 released (for FlashChat 4.0.1 or above).

This adds a 4th new feature - an optional welcome message when a member first joins the chat. :)

snotek 05-16-2005 09:54 PM

vulture> Are you going to post that addition? I too could use something like that.

Paul M 05-17-2005 01:13 AM

snotek

Make the following changes to your vbulletinCMS file (whichever one you are using).

Find;
PHP Code:

$this->getUserStmt = new Statement("SELECT userid AS id, username AS login, usergroupid FROM {$GLOBALS['tableprefix']}user WHERE userid=?"); 

Replace with;
PHP Code:

$this->getUserStmt = new Statement("SELECT userid AS id, username AS login, usergroupid, membergroupids FROM {$GLOBALS['tableprefix']}user WHERE userid=?"); 

Find;
PHP Code:

$rec['roles'] = $this->getRoles($rec['usergroupid']); 

Replace with;
PHP Code:

$rec['usergroupid'] .= ",".$rec['membergroupids'] ; //added by Paul M
$rec['roles'] = $this->getRoles($rec['usergroupid']); 

Find the getRoles function ;
PHP Code:

function getRoles($usergroupid) {

# current block of code # >



Replace it with a new version ;
PHP Code:

  // Paul M Version - Edit to set user roles for different vB usergroups 
  
function getRoles($usergroupid) {

    
// Set default access
    
$userrole ROLE_NOBODY ;

    
$groups explode(',',$usergroupid);

    
// Set Allowed groups
    
if (in_array(2,$groups)) $userrole ROLE_USER;
    if (
in_array(7,$groups)) $userrole ROLE_USER;

    
//Set Staff groups
    
if (in_array(5,$groups)) $userrole ROLE_ADMIN;
    if (
in_array(6,$groups)) $userrole ROLE_ADMIN;

    
//Set Banned groups
    
if (in_array(8,$groups)) $userrole ROLE_NOBODY;
    if (
in_array(9,$groups)) $userrole ROLE_NOBODY;

    return 
$userrole;
  } 

Edit the above function for your usergroups. This is working fine on my test system.

This version assigns access in the following priority based on both primary and secondary groups.

1. Assign default access (which is set to NO access).
2. If they are a member of an allowed group, grant USER access.
3. If they are a member of a staff group, grant ADMIN access.
4. If they are a member of a banned group, grant NO access.

:)

plateau 05-18-2005 10:54 AM

well done!

installed clicked!!!

dsboyce8624 05-18-2005 11:16 AM

It doesn't look like the stuff from post #57 (waste of space to quote it) is included in the instructions, unless I somehow missed it.

Is that on purpose, or just lack of time?

Once bitten twice shy, screwed up things before and don't wanna do it again.

Thanks

Paul M 05-18-2005 10:27 PM

Quote:

Originally Posted by dsboyce8624
It doesn't look like the stuff from post #57 (waste of space to quote it) is included in the instructions, unless I somehow missed it.

Is that on purpose, or just lack of time?

It will be in the next release when I have time to update the instructions. :)


All times are GMT. The time now is 07:24 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.03072 seconds
  • Memory Usage 1,756KB
  • 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
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete