Page 1 of 1

Andreas 08 theme - couple questions

Posted: Sat Apr 28, 2007 1:35 pm
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

Posted: Sat Apr 28, 2007 11:03 pm
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

Posted: Sun Apr 29, 2007 11:56 am
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?

Posted: Sun Apr 29, 2007 12:52 pm
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

Posted: Wed Oct 24, 2007 4:15 pm
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?)

Posted: Wed Oct 24, 2007 4:33 pm
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

Posted: Wed Oct 24, 2007 4:54 pm
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]

Posted: Wed Oct 24, 2007 5:10 pm
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

Posted: Wed Oct 24, 2007 5:13 pm
by u1amo01
I give it a try.

Thank you :-)

Posted: Wed Oct 24, 2007 5:19 pm
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.

Posted: Wed Oct 24, 2007 5:46 pm
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 ;-)

Posted: Wed Oct 24, 2007 6:13 pm
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.