thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

Some fixes provided! #36

Open Dragotic opened 10 years ago

Dragotic commented 10 years ago

So i was going through the code of the whole series and i thought how about fixing some issues, which Alan did not notice or did not have time to elaborate on the videos. So here we go:

First in the settings tab inside the admin panel the site title didn't work-changing the value in the setting wouldn't change the site title on the front end-so i found a fix for this.

So go config/setup.php and change:

$site_title
$site_title = data_setting_value($dbc, 'site-title');

this will fix the issue, and i did something similar for the admin panel.

I went inside the phpmyadmin inside the settings table and inserted a new record: id = admin-title label = Admin Site value = Admin Control Panel

and i edited the exact same thing in admin folder admin/config/setup.php:

$site_title

to

$site_title = data_setting_value($dbc, 'admin-title');

Also, if you have noticed in the title of the admin panel we had an error and it didn't show the proper name and from this:

<title><?php echo $page['title'].' | '.$site_title; ?></title>

i did:

<title><?php echo ucfirst($page).' | '.$site_title; ?></title>

and for those who don't know the ucfirst() capitalizes the first letter of the string inside the parenthesis.

I hope i helped you a bit :)

dbashby commented 10 years ago

Dragotic, with the first issue you raised when I go to the home page the title etc displays correctly but when I go to the about and contact page that is where the issue starts. All I get to display then is the pipe and the site title not the page name.

I tried your suggestion for that but I lost the $site_title as well as the page title. I will try the rest of the fixes though. Thanks