2005-08-26 00:03:32

Manfre
Plugin Author
mu
Real name: Michael Manfre
From: North Carolina
Known languages: en, babelfish
Website

Re: mem_glinklist: Grouped Link List

Here’s a cleaner approach that allows you to indicate how accurate the value has to be. This probably won’t be in the plugin releases.

<pre><code>
function mem_if_category_empty($atts,$thing)
{ extract(lAtts(array( ‘type’ => ‘link’, ‘name’ => ‘’, ‘argname’ => ‘’, ‘tolerance’ => 0, ),$atts));

if (empty($name)) { if (!empty($argname)) $name = gps($argname); else return; }

if (!is_numeric($tolerance)) $tolerance = 0;

$tolerance = abs(intval($tolerance));

$count = mem_get_cat_count($type,$name) – $tolerance;

$condition = $count<=0;

return parse(EvalElse($thing, $condition));
}
</code></pre>

Offline

 

2005-08-30 17:04:00

tinyfly
Member
lambda
Real name: Jeff Adams
From: Dallas, Texas
Website

Re: mem_glinklist: Grouped Link List

Thanks Manfre, works perfectly.

Offline

 

2005-11-05 23:37:53

photonomad
Member
êta
Website

Re: mem_glinklist: Grouped Link List

Hi,

I love this plugin! Thanks so much Manfre!

I do have a little problem The Uncategorized links are not working. I’m not sure if I’m the culprit or if there is a problem with the plugin. I’m running Textpattern version: 4.0.1 (r888) I read through all of the help document… was a bit confused… tried to make my mem_glinklist tag as “default” as possible though.

This is an example of the code that mem_glinklist outputs for one of my categorized links:

<code>
<div class=“mem_list”><div class=“mem_list_head”>Art Related Links</div>
<ul class=“mem_list_column”> <li> <div class=“link_title”><a href=“http://www.artsnashville.org/index.html”>Metro Nashville Arts Commission</a></div> <div class=“link_desc”></div> </li>
</ul>
</div>
</code>

This is an example of what happens to a link when it is uncategorized:

<code>
<div class=“mem_list”><div class=“mem_list_head” />
<ul class=“mem_list_column”> <li> <div class=“link_title”><a href=“http://www.photonomad.com”>Photonomad</a></div> <div class=“link_desc”>A link to Stacey Irvin’s site.</div> </li>
</ul>
</code>

The tag that calls mem_glinklist on my links page:

<code>
<txp:mem_glinklist form=“Links” columnwraptag=“ul” />
</code>

I also tried it with uncategorized=“Other” and the same thing happens.

<code>
<txp:mem_glinklist form=“Links” columnwraptag=“ul” uncategorized=“Other” />
</code>

This is the “Links” form:

<code> <li> <div class=“link_title”><txp:link /></div> <div class=“link_desc”><txp:link_description /></div> </li>
</code>

Thanks in advance and sorry if I’ve just missed something obvious.

- Stacey

Offline

 

2005-11-15 09:56:34

Anton
Plugin Author
zêta
Real name: Anton Andreasson
From: Alingsås, Sweden
Website

Re: mem_glinklist: Grouped Link List

I posted this at textpattern.org earlier, but if it was unnoticed, here my question is again:

Would it be possible to exclude certain categories from the listing? I have a case where I want to list 50+ categories at once and then later in the template just one (“Other”). The problem is that Other shows up in the big listing too, not ideal..

TIA,

/Anton

Offline

 

2005-11-15 14:03:45

tinyfly
Member
lambda
Real name: Jeff Adams
From: Dallas, Texas
Website

Re: mem_glinklist: Grouped Link List

I like to use stw_category_tree in the cases where I want specific categories to show. I’m not sure if mem_glinklist can do what you ask.

Offline

 

2005-11-15 14:24:41

Anton
Plugin Author
zêta
Real name: Anton Andreasson
From: Alingsås, Sweden
Website

Re: mem_glinklist: Grouped Link List

me too. but even that plugin has exclude ability, AFAIK. the trouble is not to show what I want, but to hide a specific category. there’s a subtle difference there, in my case at least. :)

Offline

 

2005-11-18 19:08:58

Manfre
Plugin Author
mu
Real name: Michael Manfre
From: North Carolina
Known languages: en, babelfish
Website

Re: mem_glinklist: Grouped Link List

@anton, I’ll add support to exclude items. It may be in the form of an tag attribute or an if tag. Not sure yet, but i’ll let you know. No eta, but adding to the to-do list.

@stacey, that appears to be a bug and will be fixed.

Offline

 

2005-11-18 21:56:02

Anton
Plugin Author
zêta
Real name: Anton Andreasson
From: Alingsås, Sweden
Website

Re: mem_glinklist: Grouped Link List

cool manfre, thanx a million.

Offline

 

2006-02-16 19:36:51

maniqui
Moderator
omega
Real name: Julián
From: Buenos Aires, Argentina
Known languages: es,en

Re: mem_glinklist: Grouped Link List

I’m trying to generate a “filter links by category” list.

I used to use the rss_linkcat_list plug-in but I have found that it seems to be possible to achieve the same using mem_glinklist, or am I wrong?

I have a section like “www.mydomain.com/links/”
I’m using the <txp:mem_categories /> tag to output the categories list.

But the generated links point to “www.mydomain.com/?lc=services”. So, when you click, you get the homepage again.

The category links should point “www.mydomain.com/<b>links</b>/?lc=services”, but I dont know how to generate them with the /link/

The rss_linkcat_list has the linktosection="" attribute… so, i’m looking for something similar en mem_glinklist or more exactly, in mem_categories

any ideas? thanks in advance

Last edited by maniqui (2006-02-16 19:41:12)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

 

2006-02-16 20:30:38

maniqui
Moderator
omega
Real name: Julián
From: Buenos Aires, Argentina
Known languages: es,en

Re: mem_glinklist: Grouped Link List

While waiting for a solution, I will use the combination of rss_linkcat_list + mem_glinklist that works flawlessly.

But if someone (Manfre? r u there?) points me in the right direction to do the same with mem_glinklist, I would be able to reduce my plug-in list by one (no needing of rss_linkcat_list).

thanks.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

 

Powered by FluxBB