Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#46 2012-03-19 12:51:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

totoff wrote:

[beta] not as far as i can tell.

OK, just wondered. Might be worth a shot (although 0.10 should work fine anyway).

i’m sorry to say, but don’t know what a hidden pref is …

I’ll rule that out then!

it echoes “Hello” on any tab.

Hmmm, so it’s definitely running the plugin but it’s not attaching itself to the interface on any of the tabs. OK, a few more things:

  1. What version of jQuery do you have installed?
  2. Check it’s being loaded ok (refresh the page with the ‘Net’ pane visible in Firebug, for example — look for red as a warning! Or View Source and check the links to jQuery are resolving correctly)

As long as javascript is enabled on the browser for the site and jQuery is loading fine, I can’t think of any other reason the plugin would be running but not visible.

Last edited by Bloke (2012-03-19 12:52:32)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#47 2012-03-19 13:11:02

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

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

jquery is 1.6.1 and loaded as it should.

does the markup of the backend help? as far as i can see there is no space reserverd for the plugin:

    <body id="page-list" class="content">
      <div id="txp-head" class="clearfix"></div>
      <div id="txp-body">
        <p id="messagepane"></p>
        <div id="txp-content">
          <div id="list_control" class="txp-control-panel">
            <form method="get" action="index.php" class="search-form"></form>
          </div>
          <div id="list_container" class="txp-container txp-list"></div>
          <script type="text/javascript"></script>
          <style type="text/css"></style>
        </div>
      </div>
      <div style="display: none" id="hiddenlpsubmitdiv"></div>
      <script></script>
    </body>

the site has some jquery scripts running on the frontend (e.g. jquery cycle). may they interfere with the plugin?

Offline

#48 2012-03-19 13:24:36

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

totoff wrote:

as far as i can see there is no space reserverd for the plugin:

It won’t show up in the View Source because it’s loaded afterwards, but if you view the source in Firebug you should see it (I’m assuming you don’t see any other javascript errors in the Console that might be preventing the plugin from running?)

For reference, the plugin injects itself above the class="search-form" form. Your markup looks like a standard Hive setup. And no front-side plugin should interfere.

A puzzler for sure. If you can’t see any console errors, which is my last ditch attempt at figuring this out, the only other thing I can suggest is if you permit me a login so I can have a look around and see if I can figure something out. After that I’m out of ideas, sorry.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#49 2012-03-19 13:38:37

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

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

stef,

how can i thank you? your last post set me on the right track: there was a strange special char (&#160) in the article categories of five articles. thus, the console showed a syntax error while loading. i have no idea how the special char made it into the categories list but removing it brought the plugin back to work!

many thanks, problem solved!

Offline

#50 2012-03-26 20:52:19

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 stef, hello forum,

i’m very sorry that i have to come back again, but unfortunately the plugin is still not working on image tab (overlooked this last time when i reported success …).

the console throws two errors:

unterminated string literal
http://sha.contao-webservice.de/textpattern/index.php?event=image
Line 51
unterminated string literal
http://sha.contao-webservice.de/textpattern/index.php?event=image
Line 459

and refers to this parts of the parsed code:

pjs.innerHTML = '<span>
jQuery(".search-form").before('<div

i would of course permit login to stef if this is helps.

many thanks for helping me to sort this out.

Offline

#51 2012-03-26 21:28:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

totoff wrote:

unterminated string literal

Hmmm, probably caused by some characters in your image categories that the plugin doesn’t like. Any weird characters floating around? Apostrophes? Double quotes? Accents? Non-printable ASCII? Stuff like that?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#52 2012-03-26 21:33:11

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

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

hi stef,

thanks for your reply. i did check this before my post and didn’t find any. however, i’ll now re-enter all categories from scratch and see what happens. i’ll report back.

christoph

Offline

#53 2012-03-26 21:47: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

this is very weird: there were indeed strange characters in the categories (again &#160 in the categories made by one of the editors), but they displayed only when i logged into the backend with opera (11.61). in firefox i couldn’t see it. therefore i didn’t find it first.

i did remove it and now i have the plugin back.

thanks again!

Offline

#54 2013-04-25 11:36:34

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 38

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

Hi Stef,
I think, there is a mistake on row where is 'step' => 'link_edit' . There should be 'step' => 'link' to browse links by categories on the same page.

Offline

#55 2019-06-20 08:15:08

jgr
New Member
Registered: 2019-06-20
Posts: 1

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

Hi Steph,

although years later, just the hint that latest with Textpattern 4.7.3 there is a class name change of the search form: “search-form” became “txp-search”.

I did not see the added pull down menus for filtering by section and/or category until I changed in smd_browse_by_js from “.search-form” to “.txp-search”.

Maybe some further adaptions needed, at least regarding formatting of the additional elements. Also I did not yet check all other content panels.

Thanks or all your great contributions!

Joern

Offline

#56 2021-06-06 23:13:45

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

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

I find the smd_browse_by plugin (v0.11.1) very helpful although it seems to be no longer updated. After updating Textpattern to 4.8.7 und PHP 8 the following error message appears after login and disappears after reloading the page. Could this be fixed?

Deprecated: Required parameter $blank_first follows optional parameter $select_name in
(…)/public_html/textpattern/plugins/smd_browse_by/smd_browse_by.php
on line 141
Deprecated: Required parameter $onchange follows optional parameter $select_name in
(…)/public_html/textpattern/plugins/smd_browse_by/smd_browse_by.php
on line 141

Offline

#57 2021-06-07 07:42:10

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

Yes, I’ll fix it. Thanks for letting me know.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#58 2021-06-08 00:38:39

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

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

Many thanks to you.

Offline

#59 2021-06-16 13:35:03

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

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

What’s wrong on line 141 in PHP 8? Can I change something and after that everything will be fine?

$out = array();

Context:

function smd_browse_select_input($select_name = '', $array = '', $value = '', $blank_first, $onchange, $select_id = '', $truncate = 0) {
	$out = array();
	$selected = false;
	$level = 0;
	(…)

Offline

#60 2021-06-16 14:33:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

Updated to v0.1.2 for Textpattern 4.6 or higher only.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB