Can't get the C5 bar working.

Permalink
Hello,

I'm new to concrete5 and I just wrote a html5 site and made a theme out of it, it all worked, but I can't get the c5 bar working.

I can't login at concrete5/index.php?login just links to the main page so I can't edit anything...

This is my <head> code:
<!DOCTYPE html>
<html>
<head>
<meta http:-equiv="Content-Type" content="text/html"; charset="utf-8" />
<!--[if lt IE 9]-->
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<!--[endif]-->
<? Loader::element('header_required'); ?>
<link rel="stylesheet" href="<?=$this->getThemePath()?>/default.css">


</head>

What stupid little mistake did I make?

Thanks in advance!

Zlao
 
VidalThemes replied on at Permalink Reply
VidalThemes
Just a thought but try this instead

<?php   Loader::element('header_required'); ?>


might be the php shortcode not playing ball.
Zlao replied on at Permalink Reply
Zlao
Not working either unfortunately...
VidalThemes replied on at Permalink Reply
VidalThemes
You are missing this by the looks of things

<?php   defined('C5_EXECUTE') or die(_("Access Denied.")); ?>


put it right at the top of your page, before your doc type declaration.
Zlao replied on at Permalink Reply
Zlao
Hmm that wasn't even explained in the concrete5 Developer Screencast 1 video ... it's not working either. This is what I got now:

<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!DOCTYPE html>
<html>
<head>
    <meta http:-equiv="Content-Type" content="text/html"; charset="utf-8" />
    <!--[if lt IE 9]-->
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <!--[endif]-->
   <?php Loader::element('header_required'); ?>
   <link rel="stylesheet" href="<?=$this->getThemePath()?>/default.css">
    </head>
VidalThemes replied on at Permalink Reply
VidalThemes
ok, cant say I have ever had this problem but i would go with this


<?php   defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<?php   Loader::element('header_required'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo $this->getStyleSheet('style.css')?>" />
</head>
<body>



Sometimes the placement of the Loader::element can be an issue, give this a try.
Zlao replied on at Permalink Reply
Zlao
It seems the site can't get to his .css file that way, even with the correct name.

I don't get what the hell is going on...the code should work like this right?

I even cleaned it up to this but that's not giving me a bar either:

<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <? Loader::element('header_required'); ?>
   <link rel="stylesheet" href="<?=$this->getThemePath()?>/default.css">
    </head>
VidalThemes replied on at Permalink Reply
VidalThemes
the site should be able to access the site css that way its just that I assume you have your css in a folder so you would just do the following:

<link rel="stylesheet" type="text/css" href="<?php echo $this->getStyleSheet('/default.css')?>" />



it is quite strange, can you post the entire page? I assume you have a default.php and view.php and have tried login manually yoursite.com/index.php/login
Zlao replied on at Permalink Reply
Zlao
No it's not in a seperate folder, it's in de same one as default.php

I can actually log in at the link you gave my (my own URL) but when I'm logged in I get redirected to the site ... without a bar.

Ah I can reach the Dashboard aswell...the standard themes are working fine ...

Using your latest code I got:
<?php   defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<?php   Loader::element('header_required'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo $this->getStyleSheet('/default.css')?>" />
</head>


With that I got no CSS whatsoever. Images are working though. The whole echo getstylesheet thing doesn't seem to be working for me.
VidalThemes replied on at Permalink Reply
VidalThemes
that is pretty odd I have always referenced my style sheets that way and never had a problem, if your style sheet is not in a folder just remove the / before default.css.

Have you tried clearing your Concrete5 cache log out and back in?
Zlao replied on at Permalink Reply
Zlao
Well ... it gets weirder!

I didn't add the 'main' area yet, so I just did, with some typo's ... and the bar appeared!

I got the code right now ... so news is on the page ... but now the bar is gone again...

W T F

I'm gonna keep replacing lines of code ...
Zlao replied on at Permalink Reply
Zlao
Oh and no, I don't have a view.php

Just a default.php, default.css and an image folder.
VidalThemes replied on at Permalink Reply
VidalThemes
I would suggest putting in a view.php, it can be the same as default.php but instead of your main editable area containing:

<?php  
$a = new Area('Main');
$a->display($c);
?>


it should be replaced with:

<?php print $innerContent; ?>


Frankly this shouldnt have an impact on your missing edit bar problem, but its a good idea to have it.
VidalThemes replied on at Permalink Reply
VidalThemes
well at least we are making progress, if you want i can send you a blank default.php, I have just had a theme approved so i know the code works as its been through the peer board and approved by people who know Concrete5 inside out, you are welcome to have that template if you like?
Zlao replied on at Permalink Reply
Zlao
Sure I'd like anything right now, I've been at this for hours now ...
VidalThemes replied on at Permalink Reply
VidalThemes
Ok no problems I will do that for you now.
Zlao replied on at Permalink Reply
Zlao
Thanks, just noticed I needed one.

Ok, when I type:
<?php
$a = new Area('Main');
$a->display($c);
?>

I get no bar,but the news is Concrete 5 welcome message is showing up.

When I type:

<?php
$a = ('Main');
$a->display($c);
?>


I get a fatal error (obviously) where the messages are supposed to be but I can see my Concrete5 Bar!
VidalThemes replied on at Permalink Reply 1 Attachment
VidalThemes
Ok, unzip the file, place the BareBones folder into your "themes" folder, dont put it in "concrete/themes".

Then go to "pages and themes" in your dashboard and hit install, then return to pages and themes and activate and you should have a very basic starting point obviously there is no css in the file, but you should have a functioning theme in its most basic sense, hope that helps.
Zlao replied on at Permalink Reply
Zlao
Hmmk...any explanation why I actually can see the bar when I make a typo? It just doesn't make any sense ...
VidalThemes replied on at Permalink Reply
VidalThemes
Sorry dont have an answer for that one.
Zlao replied on at Permalink Reply
Zlao
I FOUND IT!

I had this on the bottom, just in case I needed some scripts, it's linked to Google's Content Delivery Network:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>


Son of a .... that was freaking annoying. Thanks for the help!
VidalThemes replied on at Permalink Best Answer Reply
VidalThemes
Ah yer Concrete calls its own Jquery so no need to reference it, sorry i couldnt get to the bottom of it for you, but glad its sorted.
Zlao replied on at Permalink Reply
Zlao
You couldn't know, I was 2 seconds away from sending the page when it suddenly hit me that it would interfere, stupid enough: I disabled every other script on the page before

/slams head against the wall

Ah well, it's all fixed and I can finally use Concrete =D