Textpattern Forum

You are not logged in. Register | Login | Help

#281 2009-06-03 16:18:50

midmood
Member
From: Rome, Italy
Registered: 2007-07-20
Posts: 68
Website

Re: [Archived] stw_category_tree

I see.
For the moment I grouped all the unwanted category under a parent category and excluded that one… fortunately it worked.

Is there a bug free release planned? because the plugin is really useful!

Offline

#282 2009-06-04 13:13:24

midmood
Member
From: Rome, Italy
Registered: 2007-07-20
Posts: 68
Website

Re: [Archived] stw_category_tree

I found another strange behaviour in the version 1.1 of the plugin.
This is really important, so I hope anyone can help me.

I specify a default section to redirect all my results and the result is nothing, no output.
So i didn’t specify any section, to target to the current section, but nothing at all again.

The problem is that the plugin seems to rewrite my url like so: http://www.example.com/category/name-of-the-category/, when should be: http://www.example.com/section/?c=name-of-the-category

can you help me? I cant’ find the form which drive that url schema…

Simone

Offline

#283 2009-07-13 04:06:25

mericson
Member
Registered: 2004-05-24
Posts: 122
Website

Re: [Archived] stw_category_tree

I’m using stw_category_tree with textpattern 4.0.8. It doesn’t seem to be able to properly create section/category links.

I have a category foo with a child baz, also a section called bar.

This tag:

<txp:stw_category_tree start=“foo” section=“bar” wraptag=“ul” labeltag=“li” />

Because I specified the section, expect stw_category_tree to generate a link to this URL:

http://www.mysite.org/bar/?c=baz

instead it generates a link to the following URL, which is wrong.

http://www.mysite.org/category/baz/

Offline

#284 2009-07-26 22:40:14

photonomad
Member
Registered: 2005-09-10
Posts: 264
Website

Re: [Archived] stw_category_tree

I am using this code to output a menu that lists articles by category. I know that, upon installation, stw_category_tree created a field in the database so that the categories can be ordered. I’m curious if it is possible to use something like <txp:article_custom sort=“field(’ ‘, …) to list the articles by category in the stw_category order? I got the idea that it might be possible by reading this thread.

[Edit] Ok… I think what I really need is a different plugin – a “companion” plugin for stw_category_tree. It would function just like txp:article_custom, but allow a way to sort articles by Category1 or Category2 using the order set by stw_category_tree in the Menu Control extension tab. I am not a real programmer, so I have no clue how article_custom would be able to access the idx field in the txp_category table. I’ll post this in the plugin request area, but thought I’d update this post in case anyone else is interested.

SOLUTION:
jsoo helped me use the smd_query plugin and the article_custom tag to sort articles with the stw_category_tree menu order:

<txp:article_custom sort='field(ID, <txp:smd_query query="select textpattern.ID from textpattern left join txp_category on category1 = name order by idx" break=",">{ID}</txp:smd_query>)' />

Last edited by photonomad (2009-07-28 03:19:26)

Offline

#285 2009-08-14 22:10:55

photonomad
Member
Registered: 2005-09-10
Posts: 264
Website

Re: [Archived] stw_category_tree

I’m having the same problem that mericson stated on the previous page

I want:
http://www.mysite.org/bar/?c=baz

But I get:
http://www.mysite.org/category/baz/

section/category links do not work

lee also pointed out the problem here

Paul said it was fixed here and offered a download with the fix.

There is mention of version 1a.2 but the links lead to a page with only downloads for v1.1

Can anyone out there point me to version 1a.2? Or, does anyone know of a fix for the section/category link problem? Thanks!

Last edited by photonomad (2009-08-14 22:24:17)

Offline

#286 2009-09-15 22:21:31

photonomad
Member
Registered: 2005-09-10
Posts: 264
Website

Re: [Archived] stw_category_tree

stw_category_tree works, but displays errors now that I have upgraded from 4.0.8 to 4.2.0.

———————————————————————-

This is the error I am getting (at the top of the Menu Control page) after I click SAVE CHANGES:

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1 update txp_category set idx = 0 where id = in /sitedirectorypath/textpattern/lib/txplib_db.php on line 85

The same error displays 22 times (idx = from 0 to 22), then the following:

Warning: Unknown column ‘view’ in ‘where clause’ update txp_category set idx = 23 where id = view-site in /sitedirectorypath/textpattern/lib/txplib_db.php on line 85

Warning: Unknown column ‘logout’ in ‘where clause’ update txp_category set idx = 24 where id = logout in /sitedirectorypath/textpattern/lib/txplib_db.php on line 85

New menu order saved successfully.

———————————————————————-

The plugin still functions, but would love for all of the errors to disappear. Not sure if this is an easy fix or something more complicated. Anyone else experiencing this?

Offline

#287 2009-11-13 11:59:01

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: [Archived] stw_category_tree

I have no idea why, but I get all my categories listed with pre tags at the very beginning of my page (even before doctype declaration), then down where I inserted the tag <txp:stw_category_tree count="1" killempties="1" /> it displays the output you would expect.

This is what I see at the very top of the page with “view source”:

<pre>
breast-imaging, article
</pre>
<pre>
cardiac, article
</pre>
<pre>
chest, article
</pre>
<pre>
gastrointestinal, article
</pre>
<pre>
genitourinary, article
</pre>...etc, etc, etc...

Fixing this currently by brute force with pre { display: none; }

Last edited by aswihart (2009-11-14 14:55:14)

Offline

#288 2009-11-13 23:10:39

photonomad
Member
Registered: 2005-09-10
Posts: 264
Website

Re: [Archived] stw_category_tree

anyone having luck with this plugin and TXP 4.2?

Offline

#289 2009-11-14 14:54:28

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: [Archived] stw_category_tree

I’m running 4.2, working other than the issues I’m having above and below.

The killempties attribute has an odd behavior, not sure if it’s as intended. It does hide categories that are “top-level” with no child categories in them, but shouldn’t it display them if there are articles assigned to them? When I set count="1", any categories with articles assigned show up, while those without stay hidden. This is better, but actually I think any category (parent or “empty top-level”) should be hiddene is there are no articles assigned to it. Bug?

Another thing, even when I set the section attribute, if I use stw_category_tree in a different section, it is ignoring that attribute and just makes all the links relative to the current section.

Last edited by aswihart (2009-11-14 15:56:57)

Offline

#290 2010-03-09 16:57:13

vickilh
Member
Registered: 2007-10-30
Posts: 96

Re: [Archived] stw_category_tree

I’ve upgraded to 4.2 but still have stw_category_tree version 0.4 running. I’d like to upgrade the plugin to version 1.0.1. I installed it on our test site and see some problems.

The first problem I’d like to get out of the way is the the plugin is no longer stripping the numeric prefixes off the category name (used for ordering). I looked at the 1.0.1 code and don’t see anything doing this. — Was this removed? If yes, what can I add to the plugin code to get it to strip off numeric prefixes again?

Thanks!! Vicki

Offline

Board footer

Powered by FluxBB