Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#673 2009-10-09 16:19:07

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Sorry, I got an “You have an error in your SQL syntax” message with the p13 version using rss_uc_article_list tag. Since at the moment I don’t need the last changes, I can stand with p12, that works just fine. Just wanted to report you back. Thanks for your job on mantaining this wonderful plugin!

Offline

#674 2009-10-09 16:54:59

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Thanks, for feedback.
Please, give me some debug information about this error. In this patch I rewrite much code in rss_uc_article_list and bugs is possible. :(

Now I update this path to 0.7.4p13b from my working site. Please, test it.

Upd: 0.7.4p13b

Last edited by makss (2009-10-09 17:16:17)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#675 2009-10-09 17:22:36

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Sorry, I got an “You have an error in your SQL syntax” message with the p13 version using rss_uc_article_list tag. 

I did too. however:

Now I update this path to 0.7.4p13b from my working site. Please, test it.

I updated to 0.7.4p13b and it is fixed for me. Thank you!

Last edited by whaleen (2009-10-09 17:23:34)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#676 2009-10-09 19:22:54

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Everything is working perfectly with the andcategory attribute.

If I use:

<txp:rss_uc_article_list section="some_section" andcategory="1,2,3" form="some_form" />

I get article that have all categories: 1,2, and 3. Hurray!

I’m now looking into building a navigation system that will allow me to to choose the andcategories on the fly. I need way to call on any combination of categories and then have those dynamically inserted in as values of the andcategory attribute. I’m looking at jquery but have not got very far with that. Something along the lines of passing the css class of a category attribute in as values of andcategory and with the option to also remove them. This would happen per session as I don’t want to alter the form in the DB.

Something like this:

<txp:rss_uc_article_list section="some_section" andcategory="[Container that has values added/removed]" form="some_form" />

Any thoughts?


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#677 2009-10-09 19:34:42

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

whaleen wrote:

<txp:rss_uc_article_list section="some_section" andcategory="[Container that has values added/removed]" form="some_form" />

use it:

<txp:rss_uc_article_list section="some_section" andcategory='<txp:any_txp_tags />' form="some_form" />

for sample

<txp:rss_uc_article_list section="some_section" andcategory='<txp:variable name="some_var" />' form="some_form" />

or

<txp:rss_uc_article_list section="some_section" andcategory='<txp:rss_uc_filedunder linked="2" break="," />' form="some_form" />


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#678 2009-10-09 22:37:51

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

I will try:

<txp:rss_uc_article_list section="some_section" andcategory='<txp:rss_uc_filedunder linked="2" break="," />' form="some_form" />

Now if I can pass multiple categories in a URL, like ‘clicking’ two or three categories at the same time so that rss_uc_article_list can show articles that have those two or three andcategorys.

This seems like a concept outside the scope of this plugin. I’d appreciate an recommendations. It my be worth adding the ability to this plugin to pass multiple categories in a URL

I apologize if my approach way off.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#679 2009-10-09 23:25:25

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

It seems that smd_if might be a good plugin to help with changing the values of the andcategory attribute. I hope using that (in some unknown way) brings some success. I fear my head may explode.

Last edited by whaleen (2009-10-09 23:25:53)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#680 2009-10-10 07:10:15

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

whaleen wrote:

Now if I can pass multiple categories in a URL, like ‘clicking’ two or three categories at the same time so that rss_uc_article_list can show articles that have those two or three andcategorys.

Use php code or some plugins for get parametr from URL.

Simple code:

Your URL http://www.domain.com/somepath/page?multi=cat1,cat2,cat3

==<txp:php>$GLOBALS['variable']['multi-category']=$_GET['multi'];</txp:php>==
<txp:rss_uc_article_list section="some_section" andcategory='<txp:variable name="multi-category" />' form="some_form" />

Warning, possible need filtering URL parametrs. This is only sample.

This seems like a concept outside the scope of this plugin. I’d appreciate an recommendations. It my be worth adding the ability to this plugin to pass multiple categories in a URL

It’s a not true way. :)

Last edited by makss (2009-10-10 07:14:29)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#681 2009-10-10 07:43:27

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

whaleen wrote:

Now if I can pass multiple categories in a URL, like ‘clicking’ two or three categories at the same time so that rss_uc_article_list can show articles that have those two or three andcategorys.

If your use checkbox and post method.

html form:

<form method="post">
<input type="checkbox" name="v[]" value="cat1" />
<input type="checkbox" name="v[]" value="cat2" />
...
<input type="submit" value="Submit" />
</form>

article code:

==<txp:php>
if($_POST['v']){
	$GLOBALS['variable']['multi-category']=implode(',',$_POST['v']);
}
</txp:php>==
<txp:rss_uc_article_list section="some_section" andcategory='<txp:variable name="multi-category" />' form="some_form" />

aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#682 2009-10-10 09:59:42

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

It’s a not true way. :)

And it is too complicated and verbose I found. I did learn a lot about variable in the last day or two. :)

The following is a great solution:

<form method="post">
<input type="checkbox" name="v[]" value="cat1" />
<input type="checkbox" name="v[]" value="cat2" />
...
<input type="submit" value="Submit" />
</form>

to

==<txp:php>
if($_POST['v']){
	$GLOBALS['variable']['multi-category']=implode(',',$_POST['v']);
}
</txp:php>==
<txp:rss_uc_article_list section="some_section" andcategory='<txp:variable name="multi-category" />' form="some_form" />

Thanks!


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#683 2009-10-22 22:27:53

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

I have headings whose text are generated from the categories to which it’s article belongs. If an article belongs to 2 of 3 available categories then those category names build the heading text. Often times, depending on what articles you are looking at, there are several of the same headings – as some of the articles in the list share the same heading (“title”).

I’d like to remove all but the first occurrence.

So that:

<h2>CategoryA CategoryB</h2>
<p>stuff</p>
<h2>CategoryA CategoryB</h2>
<p>stuff</p>

becomes:

<h2>CategoryA CategoryB</h2>
<p>stuff</p>
<p>stuff</p>

I’m looking into making the <h2>CategoryA CategoryB</h2> block a function which kills itself after one time. This would potentially run a hundred times per page load.

Any thoughts on this?


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#684 2009-10-22 22:49:04

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Take a look at txp:if_different


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB