Jump to content

Some codes doesn't work at layout.tpl


FlyingMachine

Recommended Posts

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,

Link to comment
Share on other sites

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 />

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...