Textpattern Forum

You are not logged in. Register | Login | Help

#31 2011-11-15 10:49:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,982
Website

Re: smd_browse_by: browse articles, images, files and links by category

sacripant wrote:

I never understood why there is a pagination?

Speed. Displaying thousands of articles takes time and requires lots of scrolling. Also, on mobile devices we don’t want to send squillions of bytes over the wire.

Granted, Txp should allow you to define the limits instead of them being hard-coded at 15, 25, 50 and 100. If that was possible you could remove the limits yourself based on your application. I think that’s the way I’d prefer to go in future.

It’s easier to just scroll to find. Rather than combine “next page” + scroll, “next page” scroll, etc..

You can jump to page, although that can be hit and miss if you have a lot of results! Certainly in modern browsers, the find-in-page feature is very handy, but some people just don’t like typing so we need to cater for the point ‘n’ clickers and, as mentioned above, mobile users.

It is possible to filter with Javascript (jQuery) without server request. It is possible to filter with multiple criteria (allways with jquery).

True and true. But it makes the page heavy. I know people with a few thousand articles. Waiting to load the list and then filtering in jQuery with that amount of data is s-l-o-w. I’ve done that kind of filtering with smd_featured: version one had a live search. In the second version I added a paginated result option because, even with 500 articles, the find operation took a significant time — some seconds. That may not seem a lot, but it’s everything to the perceived speed of the app. Frustrated users are unhappy users.

[EDIT: That’s no disrespect to jQuery: I may have been using a slow approach to filtering and could probably improve things if I re-ordered the data into a Binary Tree or something, instead of a straight list]

I wish this plugin provides an option to remove the pagination and return all results.

That’s not going to happen. The 15, 25, 50 and 100 are so ingrained in the current Txp core that it’s not possible to circumvent it. Sorry.

Last edited by Bloke (2011-11-15 10:52:59)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#32 2011-11-15 16:04:55

sacripant
Plugin Author
From: Dakar – Sénégal – Africa
Registered: 2008-06-01
Posts: 358
Website

Re: smd_browse_by: browse articles, images, files and links by category

Little test:
list with 15 results: index.php = 6.6ko
list with 50 results: index.php = 9.4 KB
1 result = (9.4-6.6) / 35 = 0.08kb
500 results = 40KB
1000 results = 80KB

Speed. Displaying thousands of articles takes time and requires lots of scrolling. Also, on mobile devices we don’t want to send squillions of bytes over the wire.

In fact (I don’t no if 40kb or 80kb = squillions of bytes :-p)…
I thought to bring a complete list was not so heavy. Just a few extra KB, only code.
And that this would provide a best usability and less server requests.
A single query server, and the page is cached (Edit : No, the browser does not cache the page).

finaly, it’s a bad idea.

Offline

#33 2011-11-15 19:03:56

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,119

Re: smd_browse_by: browse articles, images, files and links by category

I must admit that I tend to set my list prefs to the highest possible values, be it Google search results, be it forum entries, be it TXP’s lists.
I just come from learning that TXP stores the article_list_pageby value in the DB. Could the list speed problem be mitigated by rolling out the storing place from DB (centralised) to a cookie (individualised) like it’s done with toggle_articles_detail? Could the plugin overrule TXP’s reading in data from the DB so that a cookie pref would work independently of an optional, necessary TXP update?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#34 2011-11-16 12:07:34

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,119

Re: smd_browse_by: browse articles, images, files and links by category

Bloke wrote:

The 15, 25, 50 and 100 are so ingrained in the current Txp core that it’s not possible to circumvent it. Sorry.

Must have managed somehow to miss that out. Forget my post.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#35 2011-11-16 12:21:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,982
Website

Re: smd_browse_by: browse articles, images, files and links by category

uli wrote:

I tend to set my list prefs to the highest possible values, be it Google search results, be it forum entries, be it TXP’s lists.

Me too.

TXP stores the article_list_pageby value in the DB

Yes. But if you arbitrarily assign any value to it and it doesn’t match one of the 4 pre-defined values, you’ll get the default 15 results out per page. This needs to be altered in the next version of Txp (cf. this closely related topic which also need attention imo)

Last edited by Bloke (2011-11-16 12:21:41)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#36 2012-02-14 16:53:50

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 1,620
Website

Re: smd_browse_by: browse articles, images, files and links by category

Really handy plugin. But to be consistent with Txp code structure (such as the core .search-form), the code of the plugin should really have <p> tags included and &nbsp; removed like so…

<div class="smd_browse_by">
    <form method="get" action="index.php">
        <p>Browse by Category: <select name="crit" class="list" onchange="submit(this.form);">
            ...
            </select>
        </p>
        <input type="hidden" value="list" name="event">
        <input type="hidden" value="list" name="step">
        <input type="hidden" value="categories" name="search_method">
        <input type="hidden" value="1b5b962ed1b3e4b3688d7c4fcf67364b" name="_txp_token">
    </form>
    <form method="get" action="index.php">
        <p>Browse by Section: <select name="crit" class="list" onchange="submit(this.form);">
	    ...
            </select>
        </p>
        <input type="hidden" value="list" name="event">
        <input type="hidden" value="list" name="step">
        <input type="hidden" value="section" name="search_method">
        <input type="hidden" value="1b5b962ed1b3e4b3688d7c4fcf67364b" name="_txp_token">
    </form>
</div>

FYI removing the &nbsp; helps admin theme authors when they start looking a creating responsive admin-side themes ;)

Cheers!

Offline

#37 2012-02-14 17:08:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,982
Website

Re: smd_browse_by: browse articles, images, files and links by category

philwareham wrote:

the code of the plugin should really have <p> tags included and &nbsp; removed like so…

Thanks. Try the new beta : it’s the closest I can get. It wraps the entire input section (hidden and select input) with a para tag. The downside is that it takes up more vertical real estate out of the box, which is more scrolling. Hmmmmmm.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#38 2012-02-14 17:32:47

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 1,620
Website

Re: smd_browse_by: browse articles, images, files and links by category

Cheers, that’s better!

Offline

#39 2012-02-22 16:42:18

totoff
Member
From: Cologne, Germany
Registered: 2011-04-04
Posts: 145
Website

Re: smd_browse_by: browse articles, images, files and links by category

hello forum

weired, i have two installations of txp 4.4.1 both with hive backend theme and smd_browse_by installed. in one installation the plugin works perfectly fine, in the other it doesn’t. the non-working installation was an update from 4.4.0 while the other was a fresh install. before the update i had lam_browse_by installed but i did uninstall it before i installed smd_browse_by.

any hint how to solve this is much appreciated.

christoph

Offline

#40 2012-02-24 20:52:53

totoff
Member
From: Cologne, Germany
Registered: 2011-04-04
Posts: 145
Website

Re: smd_browse_by: browse articles, images, files and links by category

hello forum,

i’m a bit desperate now as i can’t get smd_browse_by to work on my updated install while my client wants it …

i did uninstall and re-install the plugin twice, disabled all other plugins and changed the admin theme back to default but to no avail. does somebody know any other check i can perform or how to solve this?

thanks, christoph

Offline

Board footer

Powered by FluxBB