FlyingMachine Posted April 2, 2015 Report Share Posted April 2, 2015 Hello everybody again, i hope this topic finds you well, after editing the default layout.tpl i get this code <p><strong>Welcome back<?php echo $userinfo->firstname . ' ' . $userinfo->lastname; ?>!</strong></p> from the template profile_main.tpl and put it in the layout.tpl seems nothing happen only Welcome Back! but regarding the user firstname ... not. for information i tried many codes doesn't work too in this templat which is layout.tpl looking forward, Quote Link to comment Share on other sites More sharing options...
t_bergman Posted April 2, 2015 Report Share Posted April 2, 2015 You must define the variable, use this: <?php echo Auth::$userinfo->firstname ?> Quote Link to comment Share on other sites More sharing options...
MC1028 Posted April 2, 2015 Report Share Posted April 2, 2015 Take a look at this - http://forum.phpvms.net/topic/21049-phpvms-database-call-sheet/ Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted April 4, 2015 Author Report Share Posted April 4, 2015 Thank your for help this one the same problem <?php echo $pilotid ; ?> Quote Link to comment Share on other sites More sharing options...
t_bergman Posted April 4, 2015 Report Share Posted April 4, 2015 Thank your for help this one the same problem <?php echo $pilotid ; ?> See this thread (http://forum.phpvms.net/topic/21049-phpvms-database-call-sheet/) Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted April 5, 2015 Author Report Share Posted April 5, 2015 Hey dear Bergman this code doesn't work well Quote Link to comment Share on other sites More sharing options...
t_bergman Posted April 5, 2015 Report Share Posted April 5, 2015 Thank your for help this one the same problem <?php echo $pilotid ; ?> hmmmm, I've got that working in my layout.php file. What pages are you trying to display it on? Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted April 5, 2015 Author Report Share Posted April 5, 2015 hmmmm, I've got that working in my layout.php file. What pages are you trying to display it on? In default layout, Welcome Back <strong><?php echo Auth::$userinfo->firstname ?> <?php echo Auth::$userinfo->lastname ?></strong> !<br /> Pilot ID: <strong><?php echo $pilotid ; ?> </strong><br /> Total Hours: <strong><?php echo Auth::$userinfo->totalhours;?></strong><br /> You RAM Rank: <strong><?php echo Auth::$userinfo->rank;?></strong><br /> Quote Link to comment Share on other sites More sharing options...
t_bergman Posted April 5, 2015 Report Share Posted April 5, 2015 Hmmm, thats very weird. Does it just not show the pilotid, is it wrong, blank? Turn the debug setting to TRUE (core/local.config.php line 14) and in the core/logs/errors.txt or core/logs/log.txt does it give an error. Before trying to find the error make sure to delete all of the text within those two documents, save, and refresh your site. This makes sure we are only going to see errors that are currently happening. Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted April 5, 2015 Author Report Share Posted April 5, 2015 Time: 04.04.15 20:37:48 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Auth::ProcessLogin > Login->ProcessLogin > Login->login > Login->index > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvmsramnewone_pilots SET `lastlogin`=NOW(), `lastip`='41.140.133.243' WHERE `pilotid`= Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ===== i got this error Quote Link to comment Share on other sites More sharing options...
t_bergman Posted April 5, 2015 Report Share Posted April 5, 2015 Time: 04.04.15 20:37:48 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Auth::ProcessLogin > Login->ProcessLogin > Login->login > Login->index > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvmsramnewone_pilots SET `lastlogin`=NOW(), `lastip`='41.140.133.243' WHERE `pilotid`= Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ===== i got this error Time: 04.04.15 20:37:48 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Auth::ProcessLogin > Login->ProcessLogin > Login->login > Login->index > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvmsramnewone_pilots SET `lastlogin`=NOW(), `lastip`='41.140.133.243' WHERE `pilotid`= Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ===== i got this error Well, the error is saying that phpVMS cannot update the ipaddress of your account from which it was last edited. One thing I notice is that your database prefix is non standard, did you change it? If you did thats ok, its just not how phpvms installs the database. It also doesn't know your pilot id, this is most likely the cause of your layout.php file not being able to display it as html for the browser. It's possible its a corrupt file. You can verify this by going to the install/checkinstall.php page, you'll have to upload the install folder again to your server as you should have deleted it after your install. One thing to note, if your host has PHP v5.3.29 installed try that first. It may solve your problem, I'm hosting under Windows and this version of PHP solves all of my issues. Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted April 5, 2015 Author Report Share Posted April 5, 2015 Well, the error is saying that phpVMS cannot update the ipaddress of your account from which it was last edited. One thing I notice is that your database prefix is non standard, did you change it? If you did thats ok, its just not how phpvms installs the database. It also doesn't know your pilot id, this is most likely the cause of your layout.php file not being able to display it as html for the browser. It's possible its a corrupt file. You can verify this by going to the install/checkinstall.php page, you'll have to upload the install folder again to your server as you should have deleted it after your install. One thing to note, if your host has PHP v5.3.29 installed try that first. It may solve your problem, I'm hosting under Windows and this version of PHP solves all of my issues. Hello sir, indeed the prefix changed however, i edited two files after uploading checkinstall.php i got [Checksum failed] /core/modules/Logout/Logout.php did not match, possibly corrupt or out of date [Checksum failed] /core/templates/profile_edit.tpl did not match, possibly corrupt or out of date theses files modified that's all Quote Link to comment Share on other sites More sharing options...
t_bergman Posted April 5, 2015 Report Share Posted April 5, 2015 Reupload those two files again, and then run the check. You should only have edited files in your skins folder. This way if you make a mistake you can always delete and start over very easily. If this doesn't work I'm out of ideas, hopefully someone else will have something. Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted April 5, 2015 Author Report Share Posted April 5, 2015 i think this matter have no effect logout was modified to redirect to specified page header('Location: '.url('../../../')); and profile_edit.tpl some modifications on the structures looking forwards, Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted April 21, 2015 Author Report Share Posted April 21, 2015 any other solution please i need it asap if possible thanks Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted April 21, 2015 Author Report Share Posted April 21, 2015 Issue resolved by adding the following code in layout.tpl <?php $pilotid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid); ?> Quote Link to comment Share on other sites More sharing options...
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.