Page 1 of 1

Removing page counter below entries

Posted: Tue Aug 30, 2011 2:11 am
by kingofsicily
Hi there!

I've built my website(s) with Serendipity. Generally I only have one entry on several pages, except for one. This single page I use to publish articles every now and then.

Now, below the bottom entry on a page there is a counter displaying number of pages and entries (for example, 'page 1 of 1, totaling 1 entries'). Is it possible to remove this counter on the webpages with only one entry, but to keep it on the page that is edited regularly?

This is the website:
http://www.woordvoorwoord.com
And this is the page in which I publish articles regularly:
http://www.woordvoorwoord.com/serendipi ... -Portfolio

Thanks very much!

Rogier.

Re: Removing page counter below entries

Posted: Tue Aug 30, 2011 10:13 am
by Timbalu
Yes. Say Smarty to count the pages in the entries.tpl pagination section by using

Code: Select all

{if $footer_totalPages > 1}
    show serendipity pagination
{/if}

Re: Removing page counter below entries

Posted: Tue Aug 30, 2011 12:28 pm
by kingofsicily
Ah yes, thank you for your quick reply, Ian. I was thinking it had to be something like that. Unfortunately :( , my programming skills are only quite basic, I'm afraid. I believe I have found the pagination section in the entries.tpl, but now I'm not sure where I have to copy/paste your code:

Code: Select all

{if $footer_totalPages > 1}
    show serendipity pagination
{/if}
There is a section in the entries.tpl (at the bottom) that goes like this:

Code: Select all

    {if $template_option.show_pagination == 'true' && $footer_totalPages > 1}
        <div class="pagination">
            {eval var=$footer_currentPage-3 assign="paginationStartPage"}
            {if $footer_currentPage+3 > $footer_totalPages}
                {eval var=$footer_totalPages-6 assign="paginationStartPage"}
            {/if}
            {if $paginationStartPage <= 0}
                {assign var="paginationStartPage" value="1"}
            {/if}
            {if $footer_prev_page}
                <a title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"><span class="pagearrow">&#9668;</span></a>
            {/if}
            {if $paginationStartPage > 1}
                <a href="{'1'|string_format:$footer_pageLink}">1</a>
            {/if}
            {if $paginationStartPage > 2}
                &hellip;
            {/if}
            {section name=i start=$paginationStartPage loop=$footer_totalPages+1 max=7}
                {if $smarty.section.i.index != $footer_currentPage}
                    <a href="{$smarty.section.i.index|string_format:$footer_pageLink}">{$smarty.section.i.index}</a>
                {else}
                    <span id="thispage">{$smarty.section.i.index}</span>
                {/if}
            {/section}
            {if $smarty.section.i.index < $footer_totalPages}
                &hellip;
            {/if}
            {if $smarty.section.i.index <= $footer_totalPages}
                <a href="{$footer_totalPages|string_format:$footer_pageLink}">{$footer_totalPages}</a>
            {/if}
            {if $footer_next_page}
                <a title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}"><span class="pagearrow">&#9658;</span></a>
            {/if}
        </div>
    {/if}
Should your code be pasted somewhere in here and, if so, where?

Could you help me with that?

Thanks again!

Rogier.

Re: Removing page counter below entries

Posted: Tue Aug 30, 2011 3:03 pm
by Timbalu
kingofsicily wrote:Should your code be pasted somewhere in here and, if so, where?
No. The pasted code already has it set, as your are using bulletproof, but not using bulletproofs own pagination defined in the templates config. Set it here:

Code: Select all

{if $footer_totalPages > 1}
<div class='serendipity_pageFooter' style="text-align: center">
    ..."big block depending serendipity and bulletproof pagination"...
    {serendipity_hookPlugin hook="entries_footer"}
</div>
{/if}
<!-- ENTRIES END -->
Also you should urgently upgrade to Serendipity 1.5.5, while your version Serendipity v.1.5.4 has a vulnerable in the third party /htmlarea code.

Re: Removing page counter below entries

Posted: Tue Aug 30, 2011 9:53 pm
by kingofsicily
Thank you very much! I did it :).

(Now let's tackle the other problem...)

Re: Removing page counter below entries

Posted: Mon Dec 19, 2011 1:08 am
by gavindegraw1
what you did ? had you done something special ?