imnemina Posted January 19, 2013 Report Posted January 19, 2013 Good night In my virtual airline, the pilots only are accepted after passed an examination. The examination module is in other web site. Pilots must register in this site, take the exam and if they do well, a staff member will add to phpvms site manually. I can do to make the option "Register" are only visible to staff memebers? As the admin center option. In the core_navigation.tpl Best regards Quote
edmundk Posted January 19, 2013 Report Posted January 19, 2013 You can do it but then you wouldn't have certain information such as the IP address of your pilots, you never know it might come in handy one day. Quote
Moderators Parkho Posted January 19, 2013 Moderators Report Posted January 19, 2013 Open core_navigation.tpl and find the following line: <li><a href="<?php echo url('/registration'); ?>">Register</a></li> Then find the following lines: <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>'; } ?> Add the first line to it like this: <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>'; echo '<li><a href="<?php echo url('/registration'); ?>">Register</a></li>'; } ?> Now remove the first line you've found and save and upload. The registration link will be only visible to those who are admin. Cheers Quote
imnemina Posted January 19, 2013 Author Report Posted January 19, 2013 Thank you very much for your help. I had already tried that but I get this error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in/nfs/c07/h03/mnt/108529/domains/newaps2012.com.ar/html/core/templates/core_navigation.tpl on line 34 My core_navigation.tpl <li><a href="<?php echo url('/'); ?>">Inicio</a></li> <?php if(!Auth::LoggedIn()) { // Show these if they haven't logged in yet ?> <li><a href="<?php echo url('/login'); ?>">Login</a></li> <li><a href="<?php echo url('/registration'); ?>">Registrarse</a></li> <?php } else { // Show these items only if they are logged in ?> <li><a href="<?php echo url('/profile'); ?>">mi cuenta</a></li> <li><a href="<?php echo url('/Exams') ?>">Examenes</a><li> <?php } ?> <li><a href="<?php echo url('/pilots'); ?>">Roster</a></li> <li><a href="<?php echo url('/schedules/view'); ?>">Vuelos</a></li> <li><a href="<?php echo url('/acars') ?>">Mapa</a></li> <li><a href="<?php echo url('/vStatsCenter') ?>">Estadisticas</a></li> <?php echo $MODULE_NAV_INC;?> <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>'; echo '<li><a href="<?php echo url('/registration'); ?>">Registrarse</a></li>'; } ?> <?php $admin = ExamsData::check_admin(Auth::$userinfo->pilotid); if ($admin->admin_level >= '1') {echo '<li><a href="'.url('/Exams_admin').'">EXAM Admin</a></li>';} ?> <li><a href="<?php echo url('/logout'); ?>">Desconectarse</a></li> <?php } ?> Quote
Moderators Parkho Posted January 19, 2013 Moderators Report Posted January 19, 2013 Change it to this: echo '<li><a href="'.url('/registration').'">Registrarse</a></li>'; 1 Quote
Strider Posted January 19, 2013 Report Posted January 19, 2013 <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>'; echo '<li><a href="<?php echo url('/registration'); ?>">Register</a></li>'; } ?> You forgot to add the line in bold to your code. Imnemina. Quote
imnemina Posted January 19, 2013 Author Report Posted January 19, 2013 Change it to this: echo '<li><a href="'.url('/registration').'">Registrarse</a></li>'; You are the best. Just that. :D Quote
Moderators Parkho Posted January 19, 2013 Moderators Report Posted January 19, 2013 rgr that cptn. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.