thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

Admin interface - Title bar error - Only shows first letter of each nav button #164

Closed dbashby closed 8 years ago

dbashby commented 8 years ago

Upon completion of the project, video 112, I noticed that the title bar only displays the first letter of any of the hard coded navigation buttons but also the site title does not carry over.

In the form on the Settings form if I change the title, it saves to the database but in the title bar it is still taking the title from the hard coded site title on setup.php on the admin side.

I noticed in the final video that Alan had the same issue as far as the navigation bar only displaying the first letter of each button.

Has anyone else experienced this? If you did how did you fix one or both issues?

Thanks for any help.

screenshot1 screenshot2 screenshot3

creptor commented 8 years ago

you should really post code here. Place the setup.php and the index.php code, use http://pastebin.com/ .

dbashby commented 8 years ago

Pastebin url - http://pastebin.com/raw/RcnknBmM

creptor commented 8 years ago

You have the site title as an static variable... in line 23 in setup.php. ($site_title = "My Site";) Change it to $site_title = data_setting_value($dbcon, site-title'); and it should be fixed.

dbashby commented 8 years ago

Thanks for that, $site_title = data_setting_value($dbcon, 'site-title'); Resolved the one issue but the issue regarding the navigation only displaying the 1st letter in the hard coded navigation bar is still baffling. As the screenshots above the page title is only showing the first letter and it is in lower case despite the Navigation as below.

Thanks

`

`

creptor commented 8 years ago

To help you with that I need the header.php file, please. Of the admin section of course.

dbashby commented 8 years ago

header.php

`<?php

# Start the session
session_start();

if(!isset($_SESSION['username'])){

    header('Location: login.php');

}

?>

<?php //require('php/connection/conx.php'); require('config/setup.php'); ?> <!DOCTYPE HTML>

<?php echo $page['title'] . ' | ' . $site_title; ?>
``` ``` Thanks for your help Creptor`
dbashby commented 8 years ago

After looking at the code again I see the lower case letter but still unsure why only the first letter is showing

creptor commented 8 years ago

that code looks not complete, but you can change the <?php echo $page['title'] . ' | ' . $site_title; ?> with <title><?php echo $page. ' | ' . $site_title; ?></title>. It'll make an acceptable result.

dbashby commented 8 years ago

I am starting to get the feeling that I have missed out on 1 or more videos. Thanks for your help with all of the above though.