Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#577 2008-10-07 11:39:47

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

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

the_ghost wrote:

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

Yikes…!

Offline

#578 2008-10-21 18:09:20

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

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

section bug too… :(

——-code—-
<txp:section />
<txp:rss_uc_article_list limit=“20” section=“section2” form=“tf_excerpt” />
<txp:section />

—-output——
section1

[skip out]

section2
————————


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

#579 2008-10-21 19:24:35

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

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

fast fix my problem, SORRY, it’s my stupid code…
————-
function rss_unlimited_categories_article_list($atts) {
global $s, $c, $pg, $prefs, $thisarticle, $id, $has_article_tag;
$thisarticle22=$thisarticle; $s22=$s; $c22=$c; $pg22=$pg; $prefs22=$prefs; $id22=$id; $has_article_tag22=$has_article_tag;
—————

and before every return
——
$thisarticle=$thisarticle22; $s=$s22; $c=$c22; $pg=$pg22; $prefs=$prefs22; $id=$id22; $has_article_tag=$has_article_tag22;
——

Last edited by makss (2008-10-21 19:25:21)


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

#580 2008-10-30 20:34:27

ecklesroad
Plugin Author
From: Bemidji, MN
Registered: 2008-02-22
Posts: 119
Website

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

http://www.ecklesroad.com

I have the <code><txp:rss_unlimited_categories_list break=“li” wraptag=“ul”></code> running on the left column, but I can’t figure out why the list stops after 10 categories (i have close to 50). I want that list to show ALL the categories.

This is an awesome plugin by the way!

I removed the plug in because while I can add multiple categories to an article, when I got to that categories page the article tagged with rss_unlimited doesn’t show up.

Last edited by ecklesroad (2008-10-31 13:29:52)

Offline

#581 2008-11-05 18:25:50

ellen
Member
From: Switzerland
Registered: 2006-04-18
Posts: 41

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

Unfortunately, the plugin (rss_unlimited_categories_article_list) doesn’t support the listform attribute. It would be really useful if it did ;-) Could you add this feature in the next release?

Offline

#582 2008-11-10 16:30:40

ellen
Member
From: Switzerland
Registered: 2006-04-18
Posts: 41

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

Hello,

After install the rss_unlimited_admin_tab won’t appear. I’ve tried again in another TXP installation but it definitely doesn’t. It only says „Restricted Area”. How can I solve this?

Kind regards,

ellen

Offline

#583 2008-11-10 21:52:07

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

ellen wrote:

Hello,
After install the rss_unlimited_admin_tab won’t appear. I’ve tried again in another TXP installation but it definitely doesn’t. It only says „Retricted Area”. How can I solve this?
Kind regards,
ellen

This add_privs() effect. Try to use search this thread – the unswer was here


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

#584 2008-11-11 10:30:15

ellen
Member
From: Switzerland
Registered: 2006-04-18
Posts: 41

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

Thank you for hinting me at this! I had already tried adding

if (txpinterface == ‘admin’) {
add_privs(‘event’, ‘1’); @

but wasn’t aware that is has to be

if (txpinterface == ‘admin’) {
add_privs(‘rss_unlimited_admin_tab’, ‘1’); @

Offline

#585 2008-11-11 10:47:13

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

event is not correctly what whould be inserted, instead of this should be name of event this plugin can have access.


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