quick goto page selector

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Noelb
Regular
Posts: 52
Joined: Wed Jul 27, 2011 7:16 am

quick goto page selector

Post by Noelb » Mon Feb 01, 2021 3:44 am

In a time and theme version gone by, at the bottom of the page there was ability IIRC through a plugin, to have a quick go-to page number, but all i can get now is

<<previous Page 2 of 7, totaling 32 entries next >>

but i'm sure the previous old theme/version/plugin had a dropdown on the "2" listing all page numbers so we could for example select page 5 and go right to it, rather than clicking next/next/next etc, anyone know what happened to that function?

Am I just missing a plugin, or missing the option.... kind of looking for it so long, like they say, maybe I just "cant see the forest for the trees"

Cheers

User avatar
onli
Regular
Posts: 2485
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: quick goto page selector

Post by onli » Mon Feb 01, 2021 5:33 pm

Hi! :)
That feature is called pagination and it might have been provided by the theme you used at the time. I sadly am not sure which themes did or do provide it, but have a look in the settings of the one you use to make sure it's not just not enabled. Maybe you changed themes somewhat recently and remember the name?

On the other hand, do you really think that this is an important funktion for your visitors? How is someone browsing through your blog supposed to know that while he is on page 3 right now, the article he searches is on page 18? So while I hope someone else can give you more support on how to enable the function (absolutely possible that there was a plugin I don't know!), I'd not put too much importance into it.

Noelb
Regular
Posts: 52
Joined: Wed Jul 27, 2011 7:16 am

Re: quick goto page selector

Post by Noelb » Tue Feb 02, 2021 1:43 am

Hi Onli,

Thanks, I used to use bulletproof I think it was, but are now using 2k11, I'll have a look for pagination

cheers

User avatar
Don Chambers
Regular
Posts: 3646
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: quick goto page selector

Post by Don Chambers » Tue Feb 02, 2021 6:48 am

Timeline theme uses pagination. The relevant section of code in entries.tpl looks like this:

Code: Select all

{if $footer_info or $footer_prev_page or $footer_next_page}
    <div class='serendipity_pageSummary'>
        {if $footer_info}
            <p class="summary serendipity_center">{$footer_info}</p>
        {/if}
            
        {if $footer_totalPages >1 }
            <nav class="pagination">
                {assign var="paginationStartPage" value="`$footer_currentPage-3`"}
                {if $footer_currentPage+3 > $footer_totalPages}
                    {assign var="paginationStartPage" value="`$footer_totalPages-4`"}
                {/if}
                {if $paginationStartPage <= 0}
                    {assign var="paginationStartPage" value="1"}
                {/if}
                {if $footer_prev_page}
                    <a class="btn btn-md btn-default btn-theme" title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"><i class="fas fa-arrow-left" aria-hidden="true"></i><span class="sr-only">{$CONST.PREVIOUS_PAGE}</span></a>
                {/if}
                {if $paginationStartPage > 1}
                    <a class="btn btn-md btn-default btn-theme" href="{'1'|string_format:$footer_pageLink}">1</a>
                {/if}
                {if $paginationStartPage > 2}
                    &hellip;
                {/if}
                {section name=i start=$paginationStartPage loop=$footer_totalPages+1 max=5}
                    {if $smarty.section.i.index != $footer_currentPage}
                        <a class="btn btn-md btn-default btn-theme" href="{$smarty.section.i.index|string_format:$footer_pageLink}">{$smarty.section.i.index}</a>
                    {else}
                        <span class="thispage btn btn-md btn-default btn-theme disabled">{$smarty.section.i.index}</span>
                    {/if}
                {/section}
                {if $smarty.section.i.index < $footer_totalPages}
                    &hellip;
                {/if}
                {if $smarty.section.i.index <= $footer_totalPages}
                    <a class="btn btn-md btn-default btn-theme" href="{$footer_totalPages|string_format:$footer_pageLink}">{$footer_totalPages}</a>
                {/if}
                {if $footer_next_page}
                    <a class="btn btn-md btn-default btn-theme" title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}"><i class="fas fa-arrow-right" aria-hidden="true"></i><span class="sr-only">{$CONST.NEXT_PAGE}</span></a>
                {/if}
            </nav>
        {/if}
    </div>
{/if}
I have not actively participated in s9y development in quite some time so do not know if this still works or not.

User avatar
Don Chambers
Regular
Posts: 3646
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: quick goto page selector

Post by Don Chambers » Wed Feb 03, 2021 7:22 pm

Pagination exists in the Bulletproof theme as well:

Code: Select all

        <div class="pagination">
            {assign var="paginationStartPage" value="`$footer_currentPage-3`"}
            {if $footer_currentPage+3 > $footer_totalPages}
                {assign var="paginationStartPage" value="`$footer_totalPages-6`"}
            {/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="{$footer_pageLink|replace:'%s':'1'}">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="{$footer_pageLink|replace:'%s':$smarty.section.i.index}">{$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_pageLink|replace:'%s':$footer_totalPages}">{$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>

Noelb
Regular
Posts: 52
Joined: Wed Jul 27, 2011 7:16 am

Re: quick goto page selector

Post by Noelb » Thu Feb 04, 2021 1:54 pm

Hi Don,

Yes it was bulletproof we used to use, now using 2k11, might give it a whirl sometime but knowing me i'll end up breaking it :) I do love my backups tho haha

User avatar
Don Chambers
Regular
Posts: 3646
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: quick goto page selector

Post by Don Chambers » Sat Feb 06, 2021 5:51 am

You can fork a local copy of whatever theme you are using and make changes there without losing the original theme. Let us know if you need assistance doing that.

Noelb
Regular
Posts: 52
Joined: Wed Jul 27, 2011 7:16 am

Re: quick goto page selector

Post by Noelb » Sun Feb 07, 2021 1:57 am

Don Chambers wrote:
Sat Feb 06, 2021 5:51 am
You can fork a local copy of whatever theme you are using and make changes there without losing the original theme. Let us know if you need assistance doing that.
Ahh yes that's a better way to go, ok I'll give it a try next week, and if I hit hurdles I'll let you know.

thanks.

Post Reply