Andreas 08 theme - couple questions

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
holysjit
Regular
Posts: 131
Joined: Sun Apr 08, 2007 9:47 am

Andreas 08 theme - couple questions

Post by holysjit »

Hi, I'm using Andreas08 theme, and it has got a button-menu. There are a couple thing I want to change:





1. I want to change the button text when you vote on a poll, you chose a category.

2. - Change the text on the button. When you click on the button, you go to the frontpage. I want to change that text. I cant change it in the adminmenu.


3. I want to change the date. APR 28 is wrong. I want 28 APR.


- I want to remove trackback completely. I dont want them ever back...

Hopefully someone can help me with one of these questions...



You can find numbers in the image. That are the numbers of my questions.
Image: http://img132.imageshack.us/img132/9016/naamloosvw3.png
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi
2. - Change the text on the button. When you click on the button, you go to the frontpage. I want to change that text. I cant change it in the adminmenu.
You can edit this in
/lang/serendipity_lang_nl.inc.php
or
/lang/utf8/serendipity_lang_nl.inc.php
if utf8 is set for the language for your blog.
If you're not sure you can change both.
Search for 'homepage' and change 'webpagina' to whatever you want.
3. I want to change the date. APR 28 is wrong. I want 28 APR.
You can edit this in templates/andreas08/lang_en.inc.php.
Change the line
@define('DATE_FORMAT_ENTRY_ANDREAS', '%b %e:');
to
@define('DATE_FORMAT_ENTRY_ANDREAS', '%e %b:');

HTH

Dave
holysjit
Regular
Posts: 131
Joined: Sun Apr 08, 2007 9:47 am

Post by holysjit »

Dude, you are great. I solved both problems. Thanks a lot.
Maybe you know how to delete the Trackbacks bar in the comments?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You can remove refeerence to trackbacks in the entries.tpl file. Search for 'trackback' there and you should see what to remove?

HTH,
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/
u1amo01
Regular
Posts: 273
Joined: Fri Sep 28, 2007 3:55 pm
Location: Kurpfalz, Germany
Contact:

Post by u1amo01 »

The search form is shown in the header; how could I put it into the sidebar?

(OT: looks like I should learn more about PHP, I think - any book recommendations?)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

That's a specific feature of the bulletproof template. Usually the searchform is part of the sidebars. You will need to check the sidebar.tpl template file to remove that output-removal of the searchbar. Maybe yellowled can tell you the specifics about it - but generally, it might be better to use the search form in the place where it's meant to be in the template? :)

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/
u1amo01
Regular
Posts: 273
Joined: Fri Sep 28, 2007 3:55 pm
Location: Kurpfalz, Germany
Contact:

Post by u1amo01 »

:-)

I try to make my blog look like my homepage. So I use the Andreas 0.8 template as base (see my blog) and try to modificate only the css (see my testblog).

Maybe I should stay with Andreas 0.8 but it's fun and I learn a lot about s9y ;-)

Meanwhile I used some css to move the search form - but that's not the best solution.

[edit] I'll have a look at the bulletproof theme[/edit]
Last edited by u1amo01 on Wed Oct 24, 2007 5:10 pm, edited 1 time in total.
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi

if you use the bulletproof template to try to reproduce your homepage you can enable/disable the navbar search box so that it shows in the sidebar in the template config (manage styles)

HTH

Dave
u1amo01
Regular
Posts: 273
Joined: Fri Sep 28, 2007 3:55 pm
Location: Kurpfalz, Germany
Contact:

Post by u1amo01 »

I give it a try.

Thank you :-)
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

As Garvin mentioned, the search form is usually a sidebar item. Andreas08, as well as other templates force it to appear in the navigation bar. Bulletproof is unique in that it is an option - you can select whether you want it in the sidebar or the navigation bar.

For Andreas08 you need to edit 2 files to remove it from the navigation bar and restore it to the sidebar.

In the file index.tpl, remove (or comment out) the following:

Code: Select all

<form id="searchform" action="{$serendipityBaseURL}" method="get"><input type="hidden" name="serendipity[action]" value="search" /><input alt="Quicksearch" type="text" name="serendipity[searchTerm]" value="{$CONST.QUICKSEARCH}..." onFocus="if(this.value=='{$CONST.QUICKSEARCH}...')value=''" onBlur="if(this.value=='')value='{$CONST.QUICKSEARCH}...';">
</form>
In sidebar.tpl, FIND this:

Code: Select all

{foreach from=$plugindata item=item}{if $item.class == "serendipity_quicksearch_plugin"}{else}
    <div class="serendipitySideBarItem container_{$item.class}">
        {if $item.title != ""}<h2 class="serendipitySideBarTitle {$item.class}">{$item.title}</h2>{/if}
        <div class="serendipitySideBarContent">{$item.content}</div>
    </div>{/if}
{/foreach}
Remove (or comment out) this:

Code: Select all

{if $item.class == "serendipity_quicksearch_plugin"}{else}
and remove the final {/if} just before the {/foreach}.

As long as you have the quicksearch plugin placed into your sidebar (not hidden) via the plugin manager, it should appear there.

You can remove the styles for #searchform from your stylesheet.
=Don=
u1amo01
Regular
Posts: 273
Joined: Fri Sep 28, 2007 3:55 pm
Location: Kurpfalz, Germany
Contact:

Post by u1amo01 »

That's great (-: Thank you, Don.

Ahem, I tried to change the sidebar.tpl as you wrote but it didn't work. For sure I made a little mistake.

But I remembered Garvins article were he wrote you only have to change the files you need, all others will be used from the default. So I deleted sidebar.tpl and that's it ;-)

s9y is really surprising.

And now I go I learn some PHP ;-)
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Glad to hear everything worked out. Yes - you probably do not need a custom sidebar.tpl since the only difference between the default and the andreas08 theme was that bit of code to hide the sidebar search form.

BTW - When you modify tpls, it is a good idea to delete everything from the folder templates_c EXCEPT the file named .empty. This will make sure your latest changes are being loaded.
=Don=
Post Reply