vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Calling a custom template (https://vborg.vbsupport.ru/showthread.php?t=48936)

Leo[GR] 02-15-2003 11:18 AM

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.

Xenon 02-15-2003 11:23 AM

Code:

eval("standarderror(\"".gettemplate("error_inactiveusers")."\");");

Leo[GR] 02-15-2003 11:26 AM

Thx Xenon, where do I insert this code ? I mean which .php file do I edit ?

Leo[GR] 02-15-2003 12:07 PM

Ok, I think I must edit member.php If my $usergroupid=140 what exactly are the changes that I must make ?

Dean C 02-15-2003 12:24 PM

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

Leo[GR] 02-15-2003 12:42 PM

]Gives me a parse error. And if I change it to another location it works but gives all users the inactivity error :(

Dean C 02-15-2003 01:15 PM

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

PHP Code:

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


Regards

- miSt

Leo[GR] 02-15-2003 01:26 PM

]Thx but parse error again :(

Xenon 02-15-2003 01:31 PM

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 :)

Leo[GR] 02-15-2003 02:19 PM

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.

Xenon 02-15-2003 04:17 PM

well if you put it directly after
PHP Code:

checkipban();
$logincode=makelogincode(); 

in global.php it would work.

Leo[GR] 02-15-2003 05:32 PM

]Ok it works now :) One last question, what's the code for a user to logout ? I want to insert it in my template. Thx for your help :)

Edit: I have tried the "action logout" but it doesn't work. It just sits there without login out. I would like to logout and clear the cookies.

Xenon 02-16-2003 10:09 AM

hmm, you can do it with a javascript redirect to call the logoutpage :)


All times are GMT. The time now is 03:44 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.01076 seconds
  • Memory Usage 1,734KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete