Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#565 2008-07-23 18:42:12

sparkybarkalot
Member
Registered: 2004-10-13
Posts: 43

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

Apologies in advance if this answer exists somewhere, but I can’t find it if it does!

I’m using this plugin and I would like to do the following: I’d like to use rss_unlimited_categories_article_list to show a list of articles that exist in BOTH category A and category B. If an article exists in category A, but not B, (for example) I don’t want it to show in the list.

Is there a way to do this? Thanks much.

Offline

#566 2008-07-25 21:28:45

jtlapp
Member
From: Austin, TX
Registered: 2006-03-19
Posts: 59
Website

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

Does this plugin work with PHP 5? I’m planning to upgrade and need to know whether I’ll have to ditch this plugin to do so. Thanks!

(I’ve searched this forum and the net for half and hour trying to find the answer, and came up empty.)

~joe

Offline

#567 2008-07-25 23:02:20

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

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

jtlapp wrote:

Does this plugin work with PHP 5? I’m planning to upgrade and need to know whether I’ll have to ditch this plugin to do so. Thanks!

I’ve had no problems using it with PHP 5.

Offline

#568 2008-08-08 04:56:29

kkobashi
Member
Registered: 2008-01-27
Posts: 51
Website

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

In rss_unlimited_categories_cloud if I do classwraptag=“div” and class=“category-cloud” the output is:

<div>
<h2>Categories</h2><p class="category-cloud"><a href="http://mysite.com/article/info" style="font-size:200%;" title="Site Info">Site Info</a>, <a href="http://mysite.com/article/basic" title="Basic">Basic</a>
</p>
</div>


Notice that the div doesn’t have a class associated with it. Instead the paragraph tag does. This makes div impossible to style as I cannot get at the h2 tag as well as format the div container.

Last edited by kkobashi (2008-08-09 04:14:50)


Kerry Kobashi
Kobashi Computing

Offline

#569 2008-08-08 06:41:10

kkobashi
Member
Registered: 2008-01-27
Posts: 51
Website

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

For what its worth:

When I bring up textpattern’s database, I noticed that the collation for txp_categories is set to latin1_swedish_c1 while all the other tables are set to utf8_general_ci.

Last edited by kkobashi (2008-08-09 04:27:17)


Kerry Kobashi
Kobashi Computing

Offline

#570 2008-08-09 04:14:26

kkobashi
Member
Registered: 2008-01-27
Posts: 51
Website

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

Can we get the number of articles returned to the rss_unlimited_categories_article_list tag?

For example, if there are 1000 articles the user needs some sort of sense what the size is of the result article set they are going to have to navigate through with prev/next.

Last edited by kkobashi (2008-08-09 09:05:37)


Kerry Kobashi
Kobashi Computing

Offline

#571 2008-09-16 21:27:08

jpdupont
Member
Registered: 2004-10-01
Posts: 752

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

hello,

I get a problem with the rss_unlimited_categories_filedunder tag :

- All the categories are listed for my article, as espected
- But when I click on a category, I get a blank page.

Note : I set an “archives” section/page and the URL go to this section/page. (linktosection=“archives”).

I put a txp:article on the archives page.

- (I use the laste SVN release (r2970))
- In the admin side, the 2 combo cat 1 and cat 2 are not hidden.

Same problem with category list or cloud.

Question : the archive page must have a txp:article tag to display the articles or other tag ?

Last edited by jpdupont (2008-09-21 19:26:51)

Offline

#572 2008-09-21 19:29:37

jpdupont
Member
Registered: 2004-10-01
Posts: 752

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

Answer to myself :

<txp:rss_unlimited_categories_article_list />

must be on the “archive” page, before the <txp:article /> tag, like this :

<txp:if_individual_article>
       <txp:article />
<txp:else/>
       <txp:if_category>
<txp:rss_unlimited_categories_article_list /> 
              <txp:article />
       <txp:else />
              <txp:article />
       </txp:if_category>
</txp:if_individual_article>

Offline

#573 2008-09-29 20:47:50

freischwimmen
Member
From: Cologne
Registered: 2007-05-28
Posts: 71
Website

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

hi all,
i would like to use this plugin to output various lists in general but only one at once, which one is displayed should be depending on which article is selected.
apparently the code below doesnt work, if i remove the “if article” part it does the job.
but i need the conditional.

<txp:if_article_category name="artist1">
<txp:rss_unlimited_categories_article_list section="catalogue" category="recordsfromartist1" form="releaselist" limit="10" />
<txp:else />nothing to see</txp:if_article_category>
<txp:if_article_category name="artist2">
<txp:rss_unlimited_categories_article_list section="catalogue" category="recordsfromartist2" form="releaselist" limit="10" />
<txp:else />nothing to see</txp:if_article_category>

Any hints on how i could solve this?
Thanks in advance!

Last edited by freischwimmen (2008-09-29 20:49:32)

Offline

#574 2008-10-01 20:38:09

pbrienesse
Member
Registered: 2008-03-14
Posts: 10

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

I took your standard plugin and used the category list to create a popup jump menu for all categories with an article in it. I don’t really understand php or mysql that well so I only changed those things that I needed to to get the output I wanted. If you were to call the tag with different attributes than I did, it would not return the right code. I thought I would post the idea here for either the creator to add or others who would like the same function. You can see it in action at http://www.tourismsmithers.com/chamber/smithersdirectory/

You need to include the following javascript in the head section of your template for it to work.

<script type=“text/javascript”>
<!—
function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+”.location=’“selObj.options[selObj.selectedIndex].value”’”); if (restore) selObj.selectedIndex=0;
}
//—>
</script>

Then I call it like so.

<form name=“form” id=“form”>
<h2>Search by Topic</h2>
<p>Find a community resource by selecting a topic from the below dropdown menu.<br />
<select name=“jumpMenu” id=“jumpMenu” onchange=“MM_jumpMenu(‘parent’,this,0)”>
<option value=”“>Select a Category</option>
<option value=“http://tourismsmithers.com/txp/directory/”>All Listings</option>
<txp:rss_unlimited_categories_popup linktosection=“directory” />
</select>
</p>
</form>

Below is my insert to the plugin. I created a seperate tag so I didn’t mess up the functionality of the category_list tag.

//——————————————————————————————-

function rss_unlimited_categories_popup($atts) {
extract(lAtts(array(
‘limit’ => 999,
‘offset’ => 0,
‘section’ => ‘’,
‘time’ => ‘past’,
‘parent’ => ‘’,
‘showcount’ => 1,
‘showallcount’ => 0,
‘allcountlabel’ => ‘All’,
‘countlinked’ => 1,
‘linktosection’ => ‘article’,
‘usemessy’ => 0,
‘listwraptag’ => ‘’,
‘break’ => ‘’,
‘wraptag’ => ‘’,
‘label’ => ‘’,
‘labeltag’ => ‘’,
‘class’ => ‘’,
‘breakclass’ => ‘’,
‘sortdir’ => ‘asc’,
),$atts));

$sections=rssBuildSctSql($section);
$time = rssBuildTimeSql($time);

$prnt = ($parent) ? “ WHERE parent = ‘$parent’ “ : “”;
$lmt = ‘ LIMIT ‘.$offset.’,’.$limit.’ ‘;
$rsc = getRows(“SELECT distinct c.id, c.name, c.title FROM “.PFX.“textpattern_category as tc LEFT JOIN “.PFX.“txp_category as c ON tc.category_id = c.id “.$prnt.“ORDER BY c.name “ .$sortdir.$lmt);

if ($rsc) {
$row = array();
$total = 0;
foreach ($rsc as $a=>$b) {
$aq= “SELECT *, unix_timestamp(Posted) as uPosted FROM “.PFX.“textpattern as t LEFT JOIN “.PFX.“textpattern_category as c ON t.ID = c.article_id WHERE “.$sections.” c.category_id = ‘“.$b[‘id’].”’ and t.Status = 4 “.$time.” ORDER BY t.title”;
$rsa = getRows($aq);
if ($rsa) {
$path = ($usemessy) ? hu.”?s=”.$linktosection.”&amp;c=”.strtolower($b[‘name’]) : hu.$linktosection.”/”.strtolower($b[‘name’]);
$count = ($showcount) ? “ (“.count($rsa).”) ” : “”;
$total+=count($rsa);
$row[]=($countlinked) ?
tag(htmlspecialchars($b[‘title’].$count),‘option’,’ value=”’.$path.’”’) :
tag(htmlspecialchars($b[‘title’]),‘a’,’ href=”’ . $path . ‘” title=”’ . htmlspecialchars($b[‘title’]) . ‘”’) . $count;
}
}
if ($showallcount) {
$path = hu.$linktosection.”/”.$parent;
$count = ($showcount) ? “ (“.$total.”) ” : “”;
$row[]=($countlinked) ?
tag(htmlspecialchars($allcountlabel.$count),‘a’,’ href=”’.$path.’” title=”’.htmlspecialchars($allcountlabel).’”’) :
tag(htmlspecialchars($allcountlabel),‘a’,’ href=”’ . $path . ‘” title=”’ . htmlspecialchars($allcountlabel) . ‘”’) . $count;
}
return doTag(doLabel($label, $labeltag).doWrap($row, $wraptag, $break, $class, $breakclass), $listwraptag).n;
}
return ‘’;
}

//——————————————————————————————-

Last edited by pbrienesse (2008-10-01 20:46:21)

Offline

#575 2008-10-07 04:02:51

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

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

Phlip wrote:

I have a sidebar showing a list of all articles in a category. When go a specific article, the permanent link works fine, but that article gets removed from the sidebar list. I’d like to keep it there. Someone mentioned this before, but is there a way to show this article in a list as when it is the current article? Thanks for any help.

I’m seeing the same symptoms, i.e. <txp:rss_unlimited_categories_article_list/> removes the currently active article from the list. Does anyone know if this behaviour can be changed so that the current article stays put?

Offline

#576 2008-10-07 09:54:20

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

Found similliar synptoms: if if use <txp:php>echo $thisarticle['id']; </txp:php> before calling rss_uc_related i get right current article id. But if i calll this test php-code after rss_uc_related, i get the id of last article in list, pluging returned. For more undestanding, this is sample code:

<txp:article><txp:article_id /></txp:article>
<txp:php>echo $thisarticle['id']; </txp:php>
<txp:rss_uc_related />
<txp:php>echo $thisarticle['id']; </txp:php>

I get this:

10
10
...list of articles, where last article's id is 15...
15

I thinks, the problem is that global variable $thisarticle (or some others too) are reassigned forever.


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

Board footer

Powered by FluxBB