Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-24 05:14:26

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

asy_dashboard: three questions

This is a great plugin. Love it. Three questions:

  1. Where is the most recent version of this plugin? I got it from the original post, but I can see there’s been further activity but no official update. The answer to this might solve the following two questions.
  2. Why does the tag asy_dabo_articles not support the section attribute? This is critical to the use of the recent_articles tag, from which asy_dabo_articles was derived, and I do not understand why it was left out.
  3. How can this page be its own tab, either in the top row, or on the second row?

I am not too smart with the PHP and the MySQL, so I apologize for the glazed eyes and drool if anyone posts complex hacks.


Kevin
(graphicpush)

Offline

#2 2008-03-01 11:00:39

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

Re: asy_dashboard: three questions

  1. I don’t think there’s a more recent version. TXP.com still uses the 0.6 version.
  2. the section attribute in recent_articles was introduced in TXP 4.0.4, long after the last asy_dashboard release.
  3. that would require some changes in the plugin code, I guess… and core TXP code hacks to display it on the top row.

Offline

#3 2008-03-01 13:32:50

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: asy_dashboard: three questions

  1. OK, that is what I thought.
  2. Actually, I have been using <txp:recent_articles /> itself with some success. Not perfect, but closer.
  3. Damn it.

Kevin
(graphicpush)

Offline

#4 2008-03-01 13:43:56

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: asy_dashboard: three questions

you dont need to hack the core to add a top tab. i was working on this a while ago but my questions went unanswered and it generated no interest at all so i dropped it.

Offline

#5 2008-03-01 16:06:22

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: asy_dashboard: three questions

See, this is exactly what I am looking for. How did you add the top tab? I would be very interested in funding anyone who takes the original asy_dashboard and updates it with some more basic functionality. I would really like a tab for the dashboard on the top row. Or at least an option to do so. Richer tags would also be nice.


Kevin
(graphicpush)

Offline

#6 2008-03-21 20:19:53

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: asy_dashboard: three questions

OK, I figured out a solution regarding the second point, which has been annoying me. I have no way of knowing if this is the “proper” way of doing it since this is code hacking at it’s absolute finest, but to get the tag asy_dabo_articles to recognize the section attribute, replace the original block of code in the plugin with this bit:

// Recent articles replacement
	function asy_dabo_articles($atts) {
		extract(lAtts(array(
			'label'    => '',
			'break'    => br,
			'wraptag'  => '',
			'limit'    => 10,
			'category' => '',
			'section'  => '',
			'sortby'   => 'Posted',
			'sortdir'  => 'desc',
			'class'    => __FUNCTION__,
			'labeltag' => '',
		),$atts));

		$catq = ($category) ? "and (Category1='".doSlash($category)."'
			or Category2='".doSlash($category)."')" : '';
		$section = ($section) ? " and Section IN ('".join("','", doSlash(do_list($section)))."')" : '';

		$rs = safe_rows_start(
			"*, id as thisid, unix_timestamp(Posted) as posted",
			"textpattern",
			"Status = 4 $section and Posted <= now() $catq order by $sortby $sortdir limit 0,$limit"
		);

		if ($rs) {
			while ($a = nextRow($rs)) {
				$out[] = href(escape_title($a['Title']), '?event=article'.a.'step=edit'.a.'ID='.$a['ID']);
			}
			if (is_array($out)) {
				return doLabel($label, $labeltag).doWrap($out, $wraptag, $break, $class);
			}
		}
		return '';
	}

The section bits were copied directly from the recent_articles tag in taghandlers.php. Hope this helps someone out there.

ALSO

I will happily fund any developer who wants to take this plugin under their wings and add the functionality I need, starting with point #3 in my original post above.

Last edited by kevinpotts (2008-03-21 20:27:25)


Kevin
(graphicpush)

Offline

#7 2008-05-19 00:21:19

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: asy_dashboard: three questions

Is anyone interested in an updated asy_dashboard? I’m writing a new version of asy_dashboard for a site I’m working on – same basic idea, more flexible code. Currently, it has a dashboard tab, customizable articles (e.g., list pending articles), and customizable comments (editable <txp:recent_comments/>). I’m adding site stats right now, then it should be ready.

Offline

#8 2008-05-19 01:16:03

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: asy_dashboard: three questions

Omg Yes.


Kevin
(graphicpush)

Offline

#9 2008-05-19 04:46:50

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: asy_dashboard: three questions

Check it out. No documentation yet (working on it), but the example code covers all the tags.

Offline

Board footer

Powered by FluxBB