Layout of plugin output positions: Karma Hits, Search

Creating and modifying plugins.
Post Reply
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 6:13 pm
Location: Freiburg/Germany
Contact:

Layout of plugin output positions: Karma Hits, Search

Post by aschlemmer »

Dear all,

I'm asking me how to place the

1.

Code: Select all

<div class="serendipity_karmaVoting serendipity_karmaVoting_images">
inside/on the last position of

Code: Select all

<div class="serendipity_Entry_Date">
without touching the Karma plugin code.

2. search box somewhere in the header instead of the sidebar.tpl.

Forum search didn't help me to find out how to manage these questions.
Both are fundamental S9Y questions that I'm constantly confronted with ... Some help on this issue is very welcome :-)

Thanks and regards,
Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Layout of plugin output positions: Karma Hits, Search

Post by garvinhicking »

Hi!

Can't you move that div through CSS float/absolute positoning within a relative parent container?

To place the search box, simply copy its HTML output into the index.tpl file where you want it. The sidebar plugin has very little PHP that can be dropped, if you want to reposition it...

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/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Layout of plugin output positions: Karma Hits, Search

Post by Don Chambers »

1. - the karma voting div appears wherever this code exists in your template's entries.tpl:

Code: Select all

    {serendipity_hookPlugin hook="entries_footer"}
Your template may not have a custom version of entries.tpl, in which case it will use the version from the default template. If you want to modify the file, I suggest you first copy it to your template's folder. If you do reposition it, keep in mind that anything using the entries_footer hook will also be relocated.

2. You can use the quicksearch code from the bulletproof template. As Garvin mentioned, place it in your template's index.tpl. Here is the code:

Code: Select all

                    <form id="searchform" action="{$serendipityHTTPPath}{$serendipityIndexFile}" method="get">
                        <input type="hidden" name="serendipity[action]" value="search" />
                        <input alt="{$CONST.QUICKSEARCH}" type="text" id="serendipityQuickSearchTermField" name="serendipity[searchTerm]" value="{$CONST.QUICKSEARCH}..." onfocus="if(this.value=='{$CONST.QUICKSEARCH}...')value=''" onblur="if(this.value=='')value='{$CONST.QUICKSEARCH}...';" />
                        <div id="LSResult" style="display: none;"><div id="LSShadow"></div></div>
                    </form>
                    {serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"}
=Don=
aschlemmer
Regular
Posts: 70
Joined: Fri Feb 23, 2007 6:13 pm
Location: Freiburg/Germany
Contact:

Re: Layout of plugin output positions: Karma Hits, Search

Post by aschlemmer »

Hi all,

thanks much for your support.

For (1.) I found this way:

Code: Select all

{$entry.add_footer}
is what I had to reposition in the markup.
Your hints led me the right way :-)

For the positioning of the Search field, it seems to be easy, I will try it this afternoon.

Thanks again and regards,
Achim
www.ms-reporter.de
Pharma-unabhängige Infos für Multiple Sklerose-Betroffene
schnellze.it
Einzigartiges Zusammenspiel aus Popfetcher und s9y
Post Reply