Site Name and Green Salad

Permalink
Hey All,
I have been going through the forums and trying what I found to change the name of the site we have. I have deleted code, added code, added a stack, cleared the cache but all has failed.

There are no stacks in the stack area global or otherwise, when I upgrade to the newest version of concrete 5, I have no idea if they were there before because I never used scrapbook I am guessing they were not.

I deleted code, added code from /concrete/themes/default/elements/header.php. I have cleared the cache from my browser. And still the name remains. I also went to concrete/themes/greensalad/elements/header.php and played with that to no avail.

I can add a stack, BUT I can not get it up into the same area as the original name. I add to header use the stack that I made and it adds right under the green area over the slideshow pictures but will not go into the green area where the nav bar is. If I add to the nav bar it will not move over to where the old name is and it's to short for what I want to put in it.

Her is the kicker I went to the site name (which I tried first and left the new name in) in dashboard and changed it. It does not show up in preview in Green salad, Plain Yogurt or Dark Chocolate BUT it does show up in Innovation when I select preview.

I am sure I have just not found the right spot any suggestions would be appreciated.

 
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
Did you clear the cache in concrete5? Just type in Clear Cache in the intelligent search.
css3803 replied on at Permalink Reply
Yes paragraph 1 mentions what I did in concrete 5 I did clear the cache a few times.

Paragraph 3 mentions I cleared the cache in my browser.

I also tried doing this from another computer. First computer is an Apple and the second a windows machine.

Also if it was a cache problem would not innovation also not work? Which it does show the changes.

Thank you for your reply
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
The code that displays the site name is found in default.php, view.php, and full.php in the theme's directory ([root]\concrete\themes\greensalad). It should change automatically but you may be able to hard code it as a last resort or set up a new global area.
This is the code:
<h1 id="logo"><!--
--><a href="<?php echo DIR_REL?>/"><?php 
$block = Block::getByName('My_Site_Name');
if( $block && $block->bID ) $block->display();  
else echo SITE;
?></a><!--
--></h1>


You could also try changing the code to this:
<h1 id="logo"><!--
--><a href="<?php echo DIR_REL?>/"><?php 
$block = Block::getByName('My_Site_Name');
if( $block && $block->bID ) echo "'My_Site_Name' block";  
else echo "'SITE' element";
?></a><!--
--></h1>

This will tell you if you displaying the 'My_Site_Name' block or the 'SITE' element so you at least know what to look for.
css3803 replied on at Permalink Reply
Ok deleted this code
<h1 id="logo"><!--
--><a href="<?php echo DIR_REL?>/"><?php
$block = Block::getByName('My_Site_Name');
if( $block && $block->bID ) $block->display();
else echo SITE;
?></a><!--
--></h1>

From root/concrete/themes/greensalad/default.php and full.php and view.php
I also found the code in home.php in the same directory. Looked in root/concrete/themes/greensalad/elements/header.php it was not in there.

I removed the code from root/concrete/themes/default/elements/header.php
looked for code in root/concrete/themes/default/ default.php and full.php and view.php and it was in there.

I removed the code list above from all the places you listed and the ones I added. Every time I deleted code I clear both caches (concrete 5 and browser) The Heavenly Bars in the header still remains the same, unchanged.
css3803 replied on at Permalink Reply
Added this code to all the locations I removed code from. Nothing has changed.
<h1 id="logo"><!--
--><a href="<?php echo DIR_REL?>/"><?php
$block = Block::getByName('My_Site_Name');
if( $block && $block->bID ) echo "'My_Site_Name' block";
else echo "'SITE' element";
?></a><!--
--></h1>

I do appreciate all your help so far, it at least confirms that I may have been looking in some the right places.
css3803 replied on at Permalink Reply
I looked at the source of the front page of the web site and copied a small portion of the code. Now 5th line down <p>Heavenly Bars</p> because the nav bar follows it I am figuring this is the line that actually puts the name on the site in the header.

<body><div id="page" class="sidebar-left">
<div id="headerSpacer"></div>
<div id="header">
<h1 id="logo"><!--
--><a href="/"><p>Heavenly Bars</p></a><!--
--></h1>
<div class="spacer"></div>

<div id="header-area">
<ul class="nav-header"><li class="nav-selected first"><a class="nav-selected" href="/" >Home</a></li><li class=" "><a href="/about/" >About</a></li><li class=" "><a href="/blog/" >Blog</a></li><li class=" "><a href="/products/" >Products</a></li></ul><div class="ccm-spacer"> </div> </div>


I look at index.php and it calls for <?php require('concrete/dispatcher.php'); dispatcher calls header only in one spot and that's external_link.php looking in there I find // canonnical paths do not match requested path
header('Location: ' . Loader::helper('navigation')->getLinkToCollection($c, true), true, 301);
exit;

Pretty much a dead end for me as to what file it's using for the header. Where does concrete 5 store all its information? I can see the pages are created dynamically but the information I have typed into the fields in dashboard are stored some where in a file. Where is that file? And if I can get to it is it encrypted so I could not read it or change it anyway?

Still digging TIA
css3803 replied on at Permalink Reply
Ah! Found it, it is using for the web site. root/updates/concrete5.5.1/concrete/themes/greensalad/default.php I removed the code and the name disappeared from the header. The code right now is still in the other php files in the same directory.
root/updates/concrete5.5.1/concrete/themes/greensalad/default.php

When adding this code it echoes "My_Site_Name Block"
<h1 id="logo"><!--
--><a href="<?php echo DIR_REL?>/"><?php
$block = Block::getByName('My_Site_Name');
if( $block && $block->bID ) echo "'My_Site_Name' block";
else echo "'SITE' element";
?></a><!--
--></h1>

Are the paths in another file pointing to the updates directory to load the web site? Should this be changed?

Should it be using?

root/concrete/themes/greensalad/
css3803 replied on at Permalink Reply
Ok took some time away to clear my head and visited with friends. Came back and edited the file heavenlybars/updates/concrete5.5.1/concrete/themes/greensalad/default.php
removed this code
h1 id="logo"><!--
--><a href="<?php echo DIR_REL?>/"><?php
$block = Block::getByName('My_Site_Name');
if( $block && $block->bID ) $block->display();
else echo SITE;
?></a><!--
--></h1>

and replaced it with the following

<!-- added for logo -->
<?php
$a = new GlobalArea('Site Name');
$a->display();
?>

although this did not make a new global area but an other stack, but it did give me the ability to edit the site name. There were no stacks in there before I added the second code. To edit the font and font size I went to the advanced tool bar in the stack editor. Can even add a logo in there or remove the text and have just a logo. It did however not carry into the ecommerce page I bet I have to take that up with the author of that add-on?
css3803 replied on at Permalink Reply
Ok started to play around some more and changed the code in full.php just the same way as I did in default.php in the update directory and it passed the code onto the ecommerce page. Now need to be able to change the font color of the nav bar, in edit mode, clicking on the nav bar and selecting design I pick font color and font but it does not work I am assuming that the css file is over writing it.

Am I going to run into trouble when the next update comes for concrete? Meaning are all my changes going to be lost to the update because concrete is not using a different directory for the website.

Thanks for all your help so far

Randy
TheRealSean replied on at Permalink Reply
TheRealSean
When you edit these themes, copy them to your root folder,
/root/themes/
(probably best to rename and install it as your custom theme)
that way updates will not over ride your changes made to the core.

Also to not the old getByName('My_Site_Name');
is the old way of referring to the Global Scrapbook, with Stacks this is currently not the case the new method of getting the site name is just

echo SITE;
which is edited /index.php/dashboard/system/basics/site_name/

Regards
Sean
css3803 replied on at Permalink Reply
Thank you for the idea of renaming and installing the theme in root/themes

This is where the whole thread started was that basic/Site Name does not work.
kosmosol replied on at Permalink Reply
Hey Im having a similar issue in 5.5 but I am trying to make the site name into a logo.

You are supposed to be able to change it in 'stacks' and even after clearing the cash it wont change a thing.

I have even tried deleting the code in defalt.php and it doesnt do anything.

I am using Green salad, and gone to Stacks/Site Name as shown in various places, changed the 'sitename' text to a logo that I have already uploaded, saved, cleared the cache and it has not done anything!!!

Tried several times, this should work it isnt am I missing something??
kosmosol replied on at Permalink Reply
Hey Im having a similar issue in 5.5 but I am trying to make the site name into a logo.

You are supposed to be able to change it in 'stacks' and even after clearing the cash it wont change a thing.

I have even tried deleting the code in defalt.php and it doesnt do anything.

I am using Green salad, and gone to Stacks/Site Name as shown in various places, changed the 'sitename' text to a logo that I have already uploaded, saved, cleared the cache and it has not done anything!!!

Tried several times, this should work it isnt am I missing something??
css3803 replied on at Permalink Reply
Look in your update folder and your newest update mine is 5.5.1 and change default.phphttp://www.heavenlybars.com I have a name and a logo.

root/updates/concrete5.5.1/concrete/themes/greensalad/default.php

removed this code

h1 id="logo"><!--
--><a href="<?php echo DIR_REL?>/"><?php
$block = Block::getByName('My_Site_Name');
if( $block && $block->bID ) $block->display();
else echo SITE;
?></a><!--
--></h1>

and replaced it with the following

<!-- added for logo -->
<?php
$a = new GlobalArea('Site Name');
$a->display();
?>
kosmosol replied on at Permalink Reply
Hi Thanks for that, I dont have anything in the root/updates folder, nothing in the root/concrete5.5.1 folder but I do have root/concrete/themes/greensalad/default.php and I copied in

<<!-- added for logo -->
<?php
$a = new GlobalArea('Site Name');
$a->display();
?>

But it hasnt done anything.

Any ideas?
css3803 replied on at Permalink Reply
Below are the three places I have found or put themes. Can you search your server for default.php to see if it shows up somewhere else. Basically I am just a customer that had to figure out how to fix the trouble I was having if I can help I will. I don't understand why a coder or someone else from concrete does not answer the questions. I have no idea who netjunky is or if he works for concrete or if he just cut and pasted form another thread and then left town or the real sean for that matter. Both seemed to just post and run with no real help.

I don't know if you know what root means sorry if you do. root is at least on my server is where your website resides. my full path would be
/public_html/heavenlybars/updates/concrete5.5.1/concrete/themes/greensalad/
for example.
heavenlybars is the root. replace root with your website or look under your websites name on the server. I don't know if any of that helps or not. And again sorry if you knew that.

root/themes/
root/concrete/themes/greensalad/
root/updates/concrete5.5.1/concrete/themes/
kosmosol replied on at Permalink Reply
Thanks for that.
I do have
home/kosmosol/public_html/updates but there is nothing in it.

It all seems a bit odd really. I have done a search for default.php and this is what was found.


home/kosmosol/public_html/concrete/themes/greensalad
home/kosmosol/public_html/concrete/themes/dark_chocolate
home/kosmosol/public_html/concrete/themes/default
home/kosmosol/public_html/concrete/themes/greek_yogurt
home/kosmosol/public_html/concrete/libraries/3rdparty/Zend/Search/Lucene/Search/Similarity
home/kosmosol/public_html/concrete/libraries/3rdparty/Zend/Search/Lucene/Search/Highlighter
css3803 replied on at Permalink Reply
Now go to each folder one at a time and change the code in the default.php and checking your website after every code change until you see the change.

EDIT: Hopefully you have not started, But I forgot to mention when I did this I cleared the cache of concrete and my browser so that the website had to refresh every time I wanted to check it.
bgriffin replied on at Permalink Reply
With Stacks...

create a stack named 'Site Name' and add your logo to it.

That should be all that is required if the theme if coded for stacks.
kosmosol replied on at Permalink Reply
Unfortunatly adding another block in stacks does nothing, and neither does changing the code in all the default phps I really dont inderstand it as in the demo video for this new version of C5, the guy does exactly what I am trying to do, and it doesnt work for me, so I am thinking I may try and just reinstall it as somthing is not right somewhere.
EGFStech replied on at Permalink Reply
Has this been resolved? This thread talks about a lot of background code editing to fix what should be functioning within the normal dashboard areas. Is there a fix for this as I'm experiencing the same issues and do NOT want to be messing around with the backend PHP to find a solution.

I am new to Concrete5. It looked like a good solution to use for our internal corporate website and I've been happy with it so far. I am using one of the default themes, Plain Yogurt, and running Concrete 5.6.0.1.

The website I am starting to setup still says 'My Site' in the top left of the header area. From my searching on the C5 website, it appears that this should be controlled from Stacks > Global Areas > Site Name and Header Nav. This makes sense. There should be a block in each that control these global areas. This is logical and what I've come to happily expect from C5. Unfortunately, it is NOT the case. While there is a Site Name and Header Nav stack in Global Areas, neither of them has any blocks, so there is nothing to edit/modify. Additionally, adding new blocks to these Global Area stacks makes no difference on the published website.

This would seem to me to be a bug. This thread was initially started in Feb 2012, it is now Nov 2012. Has anything changed or been updated regarding this, that does not involve rewriting the built-in C5 code?