Can someone help me out?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Bizmal
Regular
Posts: 23
Joined: Tue Jul 24, 2007 8:54 pm

Can someone help me out?

Post by Bizmal »

When people click on specific articles on my site it puts the title over my banner. It's so annoying I can't find where it's at or how to remove it.

http://www.wayofthegamer.com/serendipit ... 0-PSN.html
Anyting Goes But Cheats...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Can someone help me out?

Post by garvinhicking »

Hi!

Yeah, the entry title gets placed in the top banner for better indexing and because it's common in blogs.

You can change that by editing the index.tpl template file. There, look out for $blogTitle and/or $blogDescription and remove it.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Bizmal
Regular
Posts: 23
Joined: Tue Jul 24, 2007 8:54 pm

Thanks

Post by Bizmal »

Thank you, However I cannot locate the index.tpl file can someone tell me where to find it?
Anyting Goes But Cheats...
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Thanks

Post by Don Chambers »

Bizmal wrote:Thank you, However I cannot locate the index.tpl file can someone tell me where to find it?
Based on what I see in your css, odds are that your index.tpl file is located in /templates/tabacco_s9y_07/

If there is no such file there, then you are using the default index.tpl. If so, unless you know what you are doing, do not edit the default file. Instead, copy /templates/default/index.tpl to your actual template folder, which I believe to be /templates/tabacco_s9y_07/. Make the changes to index.tpl that Garvin mentioned once the file has been copied to your actual template folder. Do not do any of this unless you have a full backup of your s9y install, or at least, the /template/ folder and all of its sub folders.
=Don=
Bizmal
Regular
Posts: 23
Joined: Tue Jul 24, 2007 8:54 pm

Post by Bizmal »

When I attempt to remove those lines it gives me this error.
Fatal error: Smarty error: [in /home/content/d/a/v/daviscody/html/serendipity/templates/default/index.tpl line 12]: syntax error: unrecognized tag: $head_title|@default: (Smarty_Compiler.class.php, line 439) in /home/content/d/a/v/daviscody/html/serendipity/bundled-libs/Smarty/libs/Smarty.class.php on line 1095

Could some one look at this and tell what I need to change to get the affect I want?

http://www.wayofthegamer.com/Copyofindex.txt
Anyting Goes But Cheats...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

In your first lines you made a change:

Code: Select all

<title>{$head_title|@default:} {if $head_subtitle} - {$head_subtitle}{/if}</title>
that isinvalid Smartymarkup, you are notallow to use "default:" without a following variable.So instead use this:

Code: Select all

<title>{$head_title} {if $head_subtitle} - {$head_subtitle}{/if}</title>
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Bizmal
Regular
Posts: 23
Joined: Tue Jul 24, 2007 8:54 pm

Post by Bizmal »

I changed the line you told me to change and nothing happend. Am I missing something? I checked it twice.

<title>{$head_title|@default:} {if $head_subtitle} - {$head_subtitle}{/if}</title>

to this

<title>{$head_title} {if $head_subtitle} - {$head_subtitle}{/if}</title>

Nothing happend so I also changed

<h1><a class="homelink1" href="{$serendipityBaseURL}">{$head_title|@default:$blogTitle}</a></h1>

<h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2>

to this

<h1><a class="homelink1" href="{$serendipityBaseURL}">{$head_title}</a></h1>

<h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle}</a></h2>

And the title on the site is still there. So I returned the Index.tpl as it was.

Heres the code again, What did I do wrong?

http://www.wayofthegamer.com/Copyofindex.txt
Anyting Goes But Cheats...
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

If you ALWAYS want your blog title and blog description to be in the banner, use this:

Code: Select all

<h1><a class="homelink1" href="{$serendipityBaseURL}">{$blogTitle}</a></h1>
    
<h2><a class="homelink2" href="{$serendipityBaseURL}">{$blogDescription}</a></h2>
=Don=
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Sorry if I'm being obtuse, here, but... I visited your blog, and I don't get the error. When I load the text file, it still shows the error where you try to use {$head_title|default:}. That's up in the HTML <title>, which doesn't have any affect on the banner. Put that line back the way it was, or fix as described above (just {$head_title} will do).

When I read the entire thread, it looks like you just want to remove the bit that prints your single entry's title in the banner. That's lines 31 through 34. It creates the whole banner div and its contents. To keep the div, but remove the single-entry text, just remove line 32 (the bit with the <h1>). To also remove the blog title (which you don't seem to have, somehow), remove line 33 as well (the bit with the <h2>).

One thing to watch out for: your logo seems to be in the banner div. In that case, you'll want *some* content there, even just a <br />, or the whole div could be optimized away. To keep the existing <h1> and <h2> tags and links, but avoid any text, just edit lines 32 and 34 to look like this:

Code: Select all

    <h1><a class="homelink1" href="{$serendipityBaseURL}"></a></h1>
    <h2><a class="homelink2" href="{$serendipityBaseURL}"></a></h2>
Judebert
---
Website | Wishlist | PayPal
Bizmal
Regular
Posts: 23
Joined: Tue Jul 24, 2007 8:54 pm

Post by Bizmal »

Yah I'm sorry the code is how it is when it works. I changed it back after getting the error. I posted the link to the text so maybe someone could show me the exact changes I need to make for the overlay titles to go away. It works fine like that.
Anyting Goes But Cheats...
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

find these 2 pieces of code in your style.css file:

Code: Select all

a.homelink1,
a.homelink1:hover,
a.homelink1:link,
a.homelink1:visited,
#serendipity_banner h1 {
	color: #FFFFFF;
	letter-spacing: -1px;
	text-decoration: none;
	font-size: xx-large;
	font-weight: bold;
}

a.homelink2,
a.homelink2:hover,
a.homelink2:link,
a.homelink2:visited,
#serendipity_banner h2 {
	color: #FFFFFF;
    padding-left: 15px;
    font-size: x-large;
    text-decoration: none;
	font-weight: bold;
}
Add display: none; to each homelink1 and homelink2:

Code: Select all

a.homelink1,
a.homelink1:hover,
a.homelink1:link,
a.homelink1:visited,
#serendipity_banner h1 {
    color: #FFFFFF;
    letter-spacing: -1px;
    text-decoration: none;
    font-size: xx-large;
    font-weight: bold;
    display: none;
}

a.homelink2,
a.homelink2:hover,
a.homelink2:link,
a.homelink2:visited,
#serendipity_banner h2 {
    color: #FFFFFF;
    padding-left: 15px;
    font-size: x-large;
    text-decoration: none;
    font-weight: bold;
    display:none;
}
No banner links will ever be shown using this method, but the information is still in your HTML source, which can be valuable from a search engine perspective. Since it is not displaying at all, all the other rules COULD be removed as well.... but you could leave them intact just in case you change your mind sometime in the future.
=Don=
Post Reply