Removing page counter below entries

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
kingofsicily
Regular
Posts: 30
Joined: Thu Jul 29, 2010 4:12 pm
Location: Arnhem, Netherlands

Removing page counter below entries

Post 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.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Removing page counter below entries

Post 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}
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
kingofsicily
Regular
Posts: 30
Joined: Thu Jul 29, 2010 4:12 pm
Location: Arnhem, Netherlands

Re: Removing page counter below entries

Post 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.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Removing page counter below entries

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
kingofsicily
Regular
Posts: 30
Joined: Thu Jul 29, 2010 4:12 pm
Location: Arnhem, Netherlands

Re: Removing page counter below entries

Post by kingofsicily »

Thank you very much! I did it :).

(Now let's tackle the other problem...)
gavindegraw1
Posts: 1
Joined: Thu Dec 15, 2011 2:39 pm

Re: Removing page counter below entries

Post by gavindegraw1 »

what you did ? had you done something special ?
Post Reply