Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2012, 07:17 PM
OakleyBoss OakleyBoss is offline
 
Join Date: Jul 2011
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Copy "Forum Leaders" for different user group?

I have a usergroup for paid subscribers on my forum, and I would like to make a list similar to "Forum Leaders" with the names of the people in this usergroup. I copied the template and the php file for ShowGroups and renamed them. However the problem I am having now is that it still shows the same forum leaders as the original. How would I go about changing the usergroups on the new file while still leaving the old forum leaders page the same?

Thanks.
Reply With Quote
  #2  
Old 08-04-2012, 11:32 PM
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On your new page (the showgroups.php that you copied and renamed), change the following line:

Code:
WHERE (usergroup.genericoptions & " . $vbulletin->bf_ugp_genericoptions['showgroup'] . ")
to

Code:
WHERE usergroup.usergroupid=12345
Change 12345 to whatever the ID for your new group is.



Also, change this line:
PHP Code:
define('THIS_SCRIPT''showgroups'); 
Change showgroups to whatever the page is called.


No need to use your copied template, unless you made changes to it.

--------------- Added [DATE]1344126854[/DATE] at [TIME]1344126854[/TIME] ---------------

Oh, also take out the whole IF block for showing Moderators. Begins with:
PHP Code:
if ($vbulletin->options['forumleaders'] == 1
Reply With Quote
  #3  
Old 08-05-2012, 01:59 PM
OakleyBoss OakleyBoss is offline
 
Join Date: Jul 2011
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a million! That worked great. Only one more question! When on the page above the page title it still says "Show Groups". It seems that it references a 'showgroups' phrace somewhere, so I don't really know how to change it.



I think I would have to copy the template and rename it to change the bottom "Show Groups", but the really hard one is in the navbar. I have no clue how to go about this?

Thanks,
Reply With Quote
  #4  
Old 08-06-2012, 09:50 AM
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change the line
PHP Code:
$navbits construct_navbits(array('' => $vbphrase['show_groups'])); 
, to:
PHP Code:
$navbits construct_navbits(array('' => 'My freaking cool Page Title')); 
--------------- Added [DATE]1344250391[/DATE] at [TIME]1344250391[/TIME] ---------------

Oh, oh, that might be quicknav, now that I think about it. X3


You'd wanna alter this instead:
PHP Code:
$navpopup = array(
    
'id'    => 'showgroups_navpopup',
    
'title' => $vbphrase['show_groups'],
    
'link'  => 'showgroups.php' $vbulletin->session->vars['sessionurl_q'],
);
construct_quick_nav($navpopup); 
Probably to something like this:
PHP Code:
$navpopup = array(
    
'id'    => THIS_SCRIPT.'_navpopup',
    
'title' => 'My Freaking Cool page Title',
    
'link'  => THIS_SCRIPT.'.php' $vbulletin->session->vars['sessionurl_q'],
);
construct_quick_nav($navpopup); 
But tbh, I'm not really sure atm. X3 Try one or the other or both. I think the first example I gave just changes the actual title shown in the browser's Title Bar.
Reply With Quote
  #5  
Old 08-06-2012, 11:31 PM
OakleyBoss OakleyBoss is offline
 
Join Date: Jul 2011
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks fixed some of it the "Show Groups" under new posts in the screen cap from before is still there. But I'll play around with it to figure it out. It's pretty good for now.

Thanks a million for the very helpful and fast response!
Reply With Quote
  #6  
Old 08-07-2012, 02:19 AM
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All right. Let us know here if you still have the problem, and I'll see what I can do about hunting down the right stuff. X3
Reply With Quote
  #7  
Old 08-07-2012, 03:10 PM
qpurser qpurser is offline
 
Join Date: Jul 2011
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hope I may jump in in this thread

Sarteck,

I wanted to achieve similar for several of my usergroups to show.
I modified my showgroups.php with the instructions you gave by replacing
Code:
WHERE (usergroup.genericoptions & " . $vbulletin->bf_ugp_genericoptions['showgroup'] . ")
into
Code:
WHERE usergroup.usergroupid=12
I left the " . $vbulletin->bf_ugp_genericoptions['showgroup'] ." out. Is that correct?

After changing the code I renamed the usergroups.php into usergroupspremium.php.
Works fine and it shows exactly all the members from user group 12.

Now I wanted to do the same for another usergroup and replaced this time the 12 with 9 and called the file usergroupspremium2.php
I changed also the "define('THIS_SCRIPT', 'showgroups');" accordingly to point to the different php files

However when I call the usergroupspermium2.php it only shows the users from usergroup 12.

Does vBulletin keeps a cache somewhere or the template instructs it to do this and it doesn't get emptied?

Any help greatly appreciated
Michael
Reply With Quote
  #8  
Old 08-08-2012, 04:12 AM
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Michael,

As far as I know, no--your second page should be working just fine. :hmm:




Ah, wait. XD It's right there in the page. Dunno how I missed it.

PHP Code:
// VBIV-6689 Caching.
$groupcache = array();
if (
$vbulletin->options['flcache']) 
{
    require_once(
DIR '/includes/class_bootstrap_framework.php'); 
    
vB_Bootstrap_Framework::init();
    
$groupcache vB_Cache::instance()->read('showgroups.groupcache');

Just change that to:
PHP Code:
$groupcache = array(); 
Are you going to be doing this for several groups? If so, it might actually be better altogether to use a plugin for it and just use the original vBulletin stuff. I mean if it's only one or two groups, I guess that'd be fine, but if you plan on adding more at a later date, I'll just make a plugin sometime the next few days, let ya test it out.
Reply With Quote
  #9  
Old 08-08-2012, 09:41 AM
qpurser qpurser is offline
 
Join Date: Jul 2011
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sarteck View Post
Michael,

As far as I know, no--your second page should be working just fine. :hmm:
Ah, wait. XD It's right there in the page. Dunno how I missed it.
PHP Code:
// VBIV-6689 Caching.
$groupcache = array();
if (
$vbulletin->options['flcache']) 
{
    require_once(
DIR '/includes/class_bootstrap_framework.php'); 
    
vB_Bootstrap_Framework::init();
    
$groupcache vB_Cache::instance()->read('showgroups.groupcache');

Just change that to:
PHP Code:
$groupcache = array(); 
Are you going to be doing this for several groups? If so, it might actually be better altogether to use a plugin for it and just use the original vBulletin stuff. I mean if it's only one or two groups, I guess that'd be fine, but if you plan on adding more at a later date, I'll just make a plugin sometime the next few days, let ya test it out.

Thanks so much again for you help. I had something different in the file but removed it and now it works great.
I had (running vB 4.2.0):
Code:
// VBIV-6689 Caching.
$groupcache = array();
if ($vbulletin->options['flcache']) 
{
	$groupcache = vB_Cache::instance()->read('showgroups.groupcache');
}
I am not a coder by any means but do a lot of reading here (especially the excellent articles here on the forum) and try to learn from a lot of coding stuff posted here. For now I manage to add some conditionals or use examples to put something together but that's it for now.
Definitely not a PRO like you and others here.

I am just going to use it for 2 or 3 groups and really wouldn't know so far how to put a plugin together but as you mentioned just for a couple groups it works for me the way it is.

Once again really appreciate your help
Michael
Reply With Quote
  #10  
Old 08-08-2012, 10:51 AM
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, okay; I use 4.1.11, so yeah, that's the reason for the difference. And yup, that's what you'd have to remove to disable the caching on that page. :3

Also, I'm no pro by any means. X3 I'm pretty decent at cobbling stuff together, but that's about it. I started off knowing a bit of PHP, and only learned by making mistake after mistake after mistake. XD Best way to learn, heh.

And all right, if it's just two or three groups, then I guess you'd be fine. Since it seems to be something other vB owners want, though, I might make a product for it, anyways.

And no prob. That's what this forum is for--to find out how to modify your vBulletin to do what you want it to do. :3
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:32 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.05019 seconds
  • Memory Usage 2,286KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (10)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete