2006-05-08 06:06:42

Logoleptic
Plugin Author
lambda
Real name: Adam Messinger
From: Kansas, USA

Re: [ORPHAN] zem_link

Thanks, Wet.


“Never attribute to malice that which can be adequately explained by stupidity.”

Hanlon’s Razor

Offline

 

2006-05-08 21:07:50

wet
Developer
omega
Real name: Robert
From: Lenzing, Austria
Known languages: de-AT, en, PL/M-80
Website

Re: [ORPHAN] zem_link

Offline

 

2006-05-09 12:25:46

Logoleptic
Plugin Author
lambda
Real name: Adam Messinger
From: Kansas, USA

Re: [ORPHAN] zem_link

Rock and roll. You just made my week. :-)


“Never attribute to malice that which can be adequately explained by stupidity.”

Hanlon’s Razor

Offline

 

2006-08-19 19:09:50

jrphelps
Member
beta
Real name: Jamie Phelps
From: Fort Worth, TX
Known languages: CSS, XHTML, Javascript, en, es, hr

Re: [ORPHAN] zem_link

Sorry to bump an old thread, but I want to use a custom field for inputting a link ID for a form like this:
<txp:zem_link linkid="<txp:custom_field name="fieldname"/>"/>

Any way to achieve this?

Last edited by jrphelps (2006-08-19 19:10:36)

Offline

 

2006-08-19 21:30:31

Mary
Sock Enthusiast
omega
From: Canada

Re: [ORPHAN] zem_link

In your article form:

<txp:php>
global $thisarticle;

echo zem_link(array(
	linkid => custom_field(array('name' => 'fieldname'))
));
</txp:php>

:)


My email address has changed recently. If you need to contact me, use the forum contact form.

Offline

 

2006-08-20 02:17:34

jrphelps
Member
beta
Real name: Jamie Phelps
From: Fort Worth, TX
Known languages: CSS, XHTML, Javascript, en, es, hr

Re: [ORPHAN] zem_link

Mary, that worked for outputting the anchor tag, but the anchor text does not output automatically with this code. If I use <txp:zem_link linkid="5" /> it outputs the name of the link as the linked text. I tried looking at the code, but I couldn’t see what was making the difference.

Offline

 

2006-08-21 15:55:50

wet
Developer
omega
Real name: Robert
From: Lenzing, Austria
Known languages: de-AT, en, PL/M-80
Website

Re: [ORPHAN] zem_link

Recheck if you properly replaced fieldname with the name of the custom field you wanted to use (not custom_3, but the real name as set via preferences).

Works here as described. If this is wrong, zem_link will output an empty <a href="..."></a> element linking to the current article.

Last edited by wet (2006-08-22 04:10:09)

Offline

 

2006-08-21 16:45:31

jrphelps
Member
beta
Real name: Jamie Phelps
From: Fort Worth, TX
Known languages: CSS, XHTML, Javascript, en, es, hr

Re: [ORPHAN] zem_link

wet: I think I did, but here is my code for your amusement reference:

<code><strong><txp:if_article_list><txp:permlink><txp:posted format=”%B %e” /> | <txp:title /></txp:permlink><txp:else /><txp:posted format=”%B %e” /> | <txp:title /></txp:if_article_list></strong><br />
<txp:if_article_list>
<txp:excerpt />
<txp:else />
Rain Crow will play at <txp:php>
global $thisarticle;
$a = custom_field (array (‘name’ => ‘Venue Link ID’));
echo zem_link(array(‘linkid’ => $a));
</txp:php> on <txp:posted format=”%A, %B %e” />.<br />
<txp:body />
</txp:if_article_list></code>

If you see anything wrong with that, by all means let me know!

Last edited by jrphelps (2006-08-21 16:48:49)

Offline

 

2006-08-21 16:58:31

wet
Developer
omega
Real name: Robert
From: Lenzing, Austria
Known languages: de-AT, en, PL/M-80
Website

Re: [ORPHAN] zem_link

jrphelps wrote:

<txp:if_article_list><txp:permlink><txp:posted format="%B %e" /> | <txp:title /></txp:permlink><txp:else /><txp:posted format="%B %e" /> | <txp:title /></txp:if_article_list></strong><br />
<txp:if_article_list>
<txp:excerpt />
<txp:else />
Rain Crow will play at <txp:php>
global $thisarticle;
$a = custom_field (array ('name' => 'Venue Link ID'));
###
echo 'here:'; dmp($a); echo ':there';
###
echo zem_link(array('linkid' => $a));
</txp:php> on <txp:posted format="%A, %B %e" />.<br />
<txp:body />
</txp:if_article_list>

Let’s get curious! What is printed by dmp() ?

Offline

 

2006-08-21 19:18:08

jrphelps
Member
beta
Real name: Jamie Phelps
From: Fort Worth, TX
Known languages: CSS, XHTML, Javascript, en, es, hr

Re: [ORPHAN] zem_link

OK, it didn’t output anything. I know my field name is correct. I’m not sure what else to check.

Edit: wet, you were right, it is outputting the permlink for the article rather than the link I am after.

Last edited by jrphelps (2006-08-21 19:23:24)

Offline

 

Powered by FluxBB