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

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2003, 11:18 AM
Leo[GR]'s Avatar
Leo[GR] Leo[GR] is offline
 
Join Date: May 2002
Location: Finland
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Calling a custom template

]I have made a group called "Inactive users". In this group I move all the users that have been inactive for a long time (of course ). Now at my question, if I make a custom template named "error_inactiveusers" how I call it when an inactive user tries to login ? (I don't let them see the forum). I just want to tell them to contact the admin if they want their account to be active again.
Reply With Quote
  #2  
Old 02-15-2003, 11:23 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
eval("standarderror(\"".gettemplate("error_inactiveusers")."\");");
Reply With Quote
  #3  
Old 02-15-2003, 11:26 AM
Leo[GR]'s Avatar
Leo[GR] Leo[GR] is offline
 
Join Date: May 2002
Location: Finland
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx Xenon, where do I insert this code ? I mean which .php file do I edit ?
Reply With Quote
  #4  
Old 02-15-2003, 12:07 PM
Leo[GR]'s Avatar
Leo[GR] Leo[GR] is offline
 
Join Date: May 2002
Location: Finland
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I think I must edit member.php If my $usergroupid=140 what exactly are the changes that I must make ?
Reply With Quote
  #5  
Old 02-15-2003, 12:24 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find in member.php:

PHP Code:
if ($action=="login") { 
Below it add:

PHP Code:
if ($bbuserinfo['usergroupid']=140) {
eval(
"standarderror(\"".gettemplate("error_inactiveusers")."\");"); 
Not tested but should work

- miSt
Reply With Quote
  #6  
Old 02-15-2003, 12:42 PM
Leo[GR]'s Avatar
Leo[GR] Leo[GR] is offline
 
Join Date: May 2002
Location: Finland
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

]Gives me a parse error. And if I change it to another location it works but gives all users the inactivity error
Reply With Quote
  #7  
Old 02-15-2003, 01:15 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Eek i didn't close the statement. use this instead:

PHP Code:
if ($bbuserinfo['usergroupid']=140) {
eval(
"standarderror(\"".gettemplate("error_inactiveusers")."\");");

Regards

- miSt
Reply With Quote
  #8  
Old 02-15-2003, 01:26 PM
Leo[GR]'s Avatar
Leo[GR] Leo[GR] is offline
 
Join Date: May 2002
Location: Finland
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

]Thx but parse error again
Reply With Quote
  #9  
Old 02-15-2003, 01:31 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
if ($bbuserinfo['usergroupid']=[high]=[/high]140) {
eval("standarderror(\"".gettemplate("error_inactiveusers")."\");");
}
have forgotten an == that's why it occurs for all users..

also i'd put this at the end of global.php so every file is protected
Reply With Quote
  #10  
Old 02-15-2003, 02:19 PM
Leo[GR]'s Avatar
Leo[GR] Leo[GR] is offline
 
Join Date: May 2002
Location: Finland
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

aaaah, are you sure guys it's the right place to insert the code ? I still get the default "no permission to access this page" error.
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 03:59 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04103 seconds
  • Memory Usage 2,255KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_code
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete