Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2007-01-26 20:10:40

warmrobot
Member
From: Moscow, Russia
Registered: 2007-01-22
Posts: 31
Website

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Thank you very much, Mary!

I think markup of your plugin is more semantic then rss_superarchive.
I explain:
1) too much DD for the each DT is looks a little strange for me. :-)
2) I hate that in rss_superarchive each of DD has a span inside with “rssSubdate” class. It is redundant, I think. Because it is easy to select link and NO-link text in each DD, and apply CSS rules for it.

Offline

#62 2007-02-02 16:53:15

monkeynotes
Member
From: UK
Registered: 2005-04-13
Posts: 41

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

When using upm_date_menu I get the following errors.

tag_error <txp:upm_date_menu/> -> Warning: Missing argument 3 for upm_date_archive_query_build(), called in /Users/stephencarr/Documents/Web Production/Last Exit/textpattern/lib/txplib_misc.php(512) : eval()'d code on line 58 and defined on line 532

tag_error <txp:upm_date_menu/> -> Warning: Missing argument 4 for upm_date_archive_query_build(), called in /Users/stephencarr/Documents/Web Production/Last Exit/textpattern/lib/txplib_misc.php(512) : eval()'d code on line 58 and defined on line 532

I am using this plugin alongside rss_superarchive, I am not sure if there is a known conflict between these two. Any ideas?

Offline

#63 2007-02-03 03:21:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

That’s my fault.

v.0.2.1

Last edited by Mary (2013-01-24 17:25:17)

Offline

#64 2007-02-04 10:12:20

monkeynotes
Member
From: UK
Registered: 2005-04-13
Posts: 41

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Thanks Mary. However, there still seems to be a problem, although I don’t get any errors at the top of the page <txp:upm_date_menu /> still does not output its menu, just a blank space where it should be.

EDIT: I get these errors when the plugin is activated and I am viewing my article pages (I don’t use the upm_date_menu on those pages):

tag_error <txp:if_article_category name="Gallery"> -> Textpattern Notice: error_article_context on line 1821

tag_error <txp:if_article_category name="Video" > -> Textpattern Notice: error_article_context on line 1821

And the functionality of if_article_category stops working.

Last edited by monkeynotes (2007-02-04 10:38:48)

Offline

#65 2007-02-05 09:32:44

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Textpattern Notice: error_article_context

if_article_category, like the other article form tags, are meant to be used either from within an article form or from from within an if_individual_article tag. You’ve definitely got a problem there, but not caused by the plugin. Quite simply, you’re trying to use an article form tag outside the context where it works.

If, however, you want to check for someone viewing a particular category list (a list of articles from a specific category), then you want if_category, rather than if_article_category.

Stick <txp:upm_date_menu /> (with no attributes assigned) outside any other Textpattern tags, and it should work correctly. Verify that the problem still exists once you’ve done that.

Offline

#66 2007-02-08 14:04:14

monkeynotes
Member
From: UK
Registered: 2005-04-13
Posts: 41

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

if_article_category, like the other article form tags, are meant to be used either from within an article form or from from within an if_individual_article tag. You’ve definitely got a problem there, but not caused by the plugin. Quite simply, you’re trying to use an article form tag outside the context where it works.

The thing is I only get this error when I enable the upm_date_archive plugin. Anyhow, this is how I have my structure setup, perhaps you can help me with where I am going on. The following is the cascade for viewing an article:

Section “article” uses page “single”

Single loads form: “article_chooser”

article_chooser contains:

<txp:if_article_category name="Gallery"> <txp:article limit="1" form="gallery" /> <txp:else/> <txp:output_form form="articlenestedhak" /> </txp:if_article_category>

articlenestedhak contains:

<txp:if_article_category name="Video" > <txp:article limit="1" form="video" /> <txp:else/> <txp:output_form form="articlenestedhak2" /> </txp:if_article_category>

articlenestedhak2 contains:

<txp:if_article_category name="Five-Questions" > <txp:article limit="1" form="five_questions" /> <txp:else/> <txp:article limit="1" form="regular" /> </txp:if_article_category>

This way when a user clicks on an article I filter the articles to different display forms depending on their category. It works perfectly without the plugin enabled, no errors reported.

Stick <txp:upm_date_menu /> (with no attributes assigned) outside any other Textpattern tags, and it should work correctly. Verify that the problem still exists once you’ve done that.

I have tried this but no luck. Even when not viewing any pages that have the above problem.

Stumped.

Last edited by monkeynotes (2007-02-08 14:06:08)

Offline

#67 2007-02-09 05:14:37

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

All this nesting you’re doing with forms and article tags is very likely a contributor to the problem. If I were you, I would use override forms, as that is what they were designed to do.

First, you’d have in your page:

<txp:article form=“regular” />

Then select your override forms (Advanced Options) accordingly:

  • “Gallery” articles use “gallery” form
  • “Video” articles use “video” form
  • “Five-Questions” articles use “five_questions” form

Offline

#68 2007-03-08 23:40:26

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Mary, to avoid warnings (undefined vars and unknown attributes) in debug mode, I had to apply this patch to my upm_date_archive v0.2.1 install. Perhaps this can be included in a future version:

--- upm_date_archive-0.2.1.orig 2007-03-08 23:42:31.000000000 +0000
+++ upm_date_archive-0.2.1.new 2007-03-08 23:42:31.000000000 +0000
@@ -208,9 +208,7 @@

 	function upm_date_archive($atts, $thing = '')
 	{
-		extract(lAtts(array(
-			'mode' => 'smart'
-		), $atts));
+		$mode = isset($atts['mode']) ? $atts['mode'] : 'smart';

 		switch ($mode)
 		{
@@ -361,7 +359,6 @@

 				// sending these to paging_link(); Required?
 				$GLOBALS['uPosted'] = $row['uPosted'];
-				$GLOBALS['limit'] = $limit;

 				unset($GLOBALS['thisarticle']);
 				unset($GLOBALS['theseatts']); //Required?
@@ -523,7 +520,6 @@

 				// sending these to paging_link(); Required?
 				$GLOBALS['uPosted'] = $row['uPosted'];
-				$GLOBALS['limit'] = $limit;

 				unset($GLOBALS['thisarticle']);
 				unset($GLOBALS['theseatts']); //Required?

Last edited by ruud (2007-03-08 23:43:01)

Offline

#69 2007-03-11 10:08:45

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Yes, I’d already fixed this in my own copy, haven’t had a chance to update the plugin.

Offline

#70 2007-03-11 13:43:37

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

I just installed your pluggin Mary, and it s great,

I have problem because i use French langage and some caractére are made : ? like é,è,…, i use UTF-8 encoding. the problem is solved when using ISO-8859-1 encoding!

Thanks

Note: I make this change to fix the problem:

in function: function upm_date_menu

At the end :

modify : return doTag($out, ‘dl’, $class, ‘’, $id);

to become : return doTag(utf8_encode($out), ‘dl’, $class, ‘’, $id);

Last edited by Dragondz (2007-03-11 14:03:36)

Offline

#71 2007-03-11 13:53:46

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

…i use French langage and some caractére are made…

Can you elaborate? What text doesn’t show up properly?

Offline

#72 2007-03-12 09:02:51

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: [plugin] [ORPHAN] upm_date_archive: Date archive listings

Hi Mary: I talk about months, for example : Février is shown : F?vrier, because text is rendered as ISO not UTF.

Offline

Board footer

Powered by FluxBB