Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#217 2006-08-07 15:21:52
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Zanza….I’ve read through this whole thread and somehow missed that.
Thanks!
Rayne
mama love
Offline
#218 2006-08-07 15:37:21
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Yeah, I’ve the same problem with other threads… in a while they become difficult to follow. We should mark the fundamental post (the ones with practical solution to common problems, I mean) with a tag and make them evident on the top of every page… well, I’m dreaming. :)
Bye
Z-
Offline
#219 2006-08-07 22:52:03
- Austin
- Member
- Registered: 2006-06-13
- Posts: 19
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
I’m still having trouble using the SQL commands to addign my old stories to the new category tables. I am not a programmer and I’m sorry if this has been covered.
I get this error:
SQL query: Documentation
SELECT *
FROM
WHERE CONCAT_WS( “-”, article_id, category_id ) = “1-68”
ORDER BY article_id, category_id
- - 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 ‘WHERE CONCAT_WS(“-”, article_id, category_id) = “1-68”’ at line 3
Offline
#220 2006-08-08 17:31:46
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Long time no read this thread. Crap its long.
Zanza, thanks for the IE fix. I will include that in the next version.
I will also try to dig through the thread to incorporate the other suggestions people had. Feel free to post a link back to a previous post in this thread so I don’t miss it.
Offline
#221 2006-08-09 08:13:16
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 568
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Well one of the main things I am interested in is the fix for the rss_unlimited_categories_articles_list tag that april19 posted.
Offline
#222 2006-08-09 11:02:40
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Welcome back! :)
Also, a major improvement is April19 sortdir and sortby adding. :)
Z-
Offline
#223 2006-08-09 11:09:48
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
And I made another adding to April modified version to exclude the actual id from related article list. You may want this as an option/attribute, so feel free to modify it (ca va sans dir… ;-). I paste here the function. The adding I made are followed by a comment with MB initials (// MB aggiunta
).
foreach (explode(‘,’, $category) as $category) { if ($category) $catsql[] = “ cat.name = ‘” . urldecode($category) . “’ “; } $categories= isset($catsql) ? ‘ AND (’ . join(’ OR ‘, $catsql) . ‘) ‘ : “”;
$q = “SELECT DISTINCT t.ID, tc.category_id FROM “.PFX.“textpattern as t LEFT JOIN “.PFX.“textpattern_category as tc ON t.ID = tc.article_id LEFT JOIN “.PFX.“txp_category as cat ON cat.id = tc.category_id WHERE Status=4 “.$sections.” “.$categories; $rsc = getRows($q);
foreach ($rsc as $a) { extract($a); if ($ID !== $thisarticle[‘thisid’]) { $artsql[] = “ ID = ‘” . $ID . “’ “; } } $articles= isset($artsql) ? ‘ (’ . join(’ OR ‘, $artsql) . ‘) ‘ : “”;
$total = safe_count(‘textpattern’,“1=1 AND “ . $articles) – $offset; $numPages = ceil($total/$limit); $pg = (!$pg) ? 1 : $pg; $pgoffset = $offset + (($pg – 1) * $limit).’, ‘; // send paging info to txp:newer and txp:older $pageout[‘pg’] = $pg; $pageout[‘numPages’] = $numPages; $pageout[‘s’] = $s; $pageout[‘c’] = $c; $pageout[‘total’] = $total;
$GLOBALS[‘thispage’] = $pageout; $q2 = “1=1 AND “ . $articles . “ ORDER BY “.$sortby.” “ .$sortdir. “ limit “ . doSlash($pgoffset.$limit); $rs = safe_rows_start(“*, unix_timestamp(Posted) as uPosted”, “textpattern”, $q2);
if ($rs) { $articles = array(); while($a = nextRow($rs)) { $comparing = $a[‘ID’]; // MB aggiunta populateArticleData($a); // define the article form $article = fetch_form($form); if ($comparing != $actual_id) {$articles[] = parse($article);} // MB aggiunta unset($GLOBALS[‘thisarticle’]); unset($GLOBALS[‘theseatts’]);//Required? } return join(‘’,$articles); } }
// ——————————————————————————————- </code></pre>
Last edited by Zanza (2006-08-09 11:11:32)
Offline
#224 2006-08-09 12:45:24
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Ok, all good suggestions. I’ll take a look.
Also, no sense in waiting for another version to fix the IE issue so I updated the 0.3 download to include the fix.
Offline
#225 2006-08-09 17:56:11
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Ok folks, second big plugin update on the day. This version includes all of the fixes that some helpful forum members wrote (notably Zanza, April19 and bit) that I was able to find in this thread.
rss_unlimited_categories 0.4
Additions include:
- IE DOM fix for multi select drop down – (Thanks Zanza)
- Add time attribute to rss_unlimited_categories_article_list + rss_unlimited_categories_related as requested by Alexandra here
- Allow for override forms in rss_unlimited_categories_article_list as requested by jonhicks here (Thanks bit)
- Add sortby and sortdir as noted here (Thanks April19)
- Exclude current article from rss_unlimited_categories_related listing as noted here (Thanks Zanza)
- Add countlinked to rss_unlimited_categories_list to allow for moving count outside the category link as suggested by jonhicks here (Thanks April19)
Important
Version 0.4 of this plugin contains a change that was made after TXP 4.0.3 was released. If you are running off the latest version from SVN, you won’t have any problems. If you are running 4.0.3 or an SVN version that isn’t very recent, you will not see the multi-select drop down list on the article -> write tab. In order to fix the problem, find this word in the code:
article-col-2
and replace it with
articleside
Download
Last edited by wilshire (2006-08-09 17:56:38)
Offline
#226 2006-08-10 20:53:20
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Thanks for the update Rob! The fileunder and categories_list tags are working fine, but I’m not getting any output from the unlimited_categories_article_list tag.
For example: http://pimpmycamino.com/parts/bookmarking is blank where there should be a list of articles.
I’m using the tag as follows:
<txp:rss_unlimited_categories_article_list limit="1000" sortby="title" sortdir="asc" allowoverride="1" />
I’ve also tried it using as just:
<txp:rss_unlimited_categories_article_list />
I’ve updated to the pre-release version of TXP 4.04
Last edited by jonhicks (2006-08-10 21:07:03)
Cheers,
Jon VC#9
Offline
#227 2006-08-10 21:18:45
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Jon – Looks like one of the “fixes” I incorporated had the opposite effect. It should be fixed now. I updated the same 0.4 download. Try reinstalling and let me know how it goes. Thanks…
Offline
#228 2006-08-10 21:22:11
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Woohoo! Thats done it! Thanks Rob!
If you ever make it to the UK (or if I ever make it to Ohio) I owe you a lot of drinks! And cheese!
Cheers,
Jon VC#9
Offline