Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2005-06-19 20:18:53

newbie
New Member
From: USA
Registered: 2004-04-29
Posts: 9
Website

Re: jad_metadata

I’m confused now ;)

I would love having custom metatags in my Textpattern. I’m using the latest version. I tried Kevin’s hack to add the tags but end up with my header at the bottom of the page. It turns everything upside down.

So … can I still use this? Will this plugin work for the newest version of textpattern?

Thanks!


Darla

Offline

#17 2005-06-20 00:36:28

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,640
Website

Re: jad_metadata

> newbie wrote:

I’m confused now ;)
[snipped]
So … can I still use this? Will this plugin work for the newest version of textpattern?

I use this plugin with the latest TXP, and it works perfectly fine.
For description, it takes the excerpt, for keywords, you can add them under the advanced options under the write tab in TXP admin.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#18 2005-06-23 01:57:57

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: jad_metadata

Accessing custom fields directly is all the plugin does, so yeah, to some degree it is redundant now that textpattern has that feature.

Offline

#19 2005-10-06 04:10:43

kharr
New Member
From: North America
Registered: 2005-10-05
Posts: 5
Website

Re: jad_metadata

Thanks! Great plugin and I have it working on v4. Works like a champ. So far, the only issue that I see, is that it only works on articles not lists. So…when viewing a list you get:
<meta name=“description” content=”“ />
<meta name=“keywords” content=”“ />

Other than that, it works beautifully!


[url=http://mesothelioma-cancer-info.us]Mesothelioma Information[/url] | [url=http://weddings-r-us.com]Weddings-R-Us[/url] | [url=http://offshore-service.us]Offshore Services[/url]

Offline

#20 2005-10-11 16:56:24

michael_hamm
New Member
Registered: 2005-08-25
Posts: 6

Re: jad_metadata

This goes back to zero’s post on seeing the word “BLAH” when viewing an article list. I too experienced this but managed to get it working.

I edited the plugin from this:

if(empty($id)) echo “BLAH”;

to this:

if(empty($id)) echo “”;

Seems to work fine now. If anyone sees a potential problem in the code because I did this, let me know. I’m no programmer so I’m not sure what the ramifications would be.

Michael

Last edited by michael_hamm (2005-10-11 16:56:53)

Offline

#21 2005-10-11 17:54:52

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,475
Website

Re: jad_metadata

Michael, I only got BLAH when I hadn’t installed the plugin properly. I too edited it out but it’s not really a solution. Try reinstalling it and then BLAH should go away on its own, I think. (I haven’t used it in 4.01, btw)


Dozy P My attempt at music

Offline

#22 2005-12-04 10:47:19

c41um
New Member
Registered: 2005-11-08
Posts: 6

Re: jad_metadata

I am using 4.0.2 and would like to use this Plugin if possible. I put Article keywords in Custom1, and a description in Excerpt, but am getting the BLAH problem mentioned above.

jdueck, is there any plans to make this work in 4.0.2, or am doing something wrong?

EDIT

After a little playing around I’ve noticed that this works fine when viewing a Single Article, but doesn’t work when viewing a page that is an ‘Article List’. It seems that when a List of Articles is displayed as a page, $GLOBALS[‘id’] is not set, meaning the Plugin can’t work.

I want to set up my site so that when a page consists of a list of Articles, I can put the meta information in one particular Artile in the list, with Category set as ‘meta’. Then I’ll have a form for outputting the meta data like this:

<code>
<txp:if_article_list>
<txp:if_article_category name=“meta”>
<txp:jad_metadata />
</txp:if_article_category>
<txp:else />
<txp:jad_metadata />
</txp:if_article_list>
</code>

Any idea how I can make the Plugin detect the ID of the Article with Cat=“meta” when the page consists of a list of Articles?

Last edited by c41um (2005-12-04 11:54:27)

Offline

#23 2006-03-18 17:31:06

davidwang
Member
From: Malaysia
Registered: 2005-01-25
Posts: 38
Website

Re: jad_metadata

jduek, your plugin uses the whole excerpt as the description. Is there any way to limit the excerpt to something like 20 words? Also, if I have a textile link in my excerpt, "link":http://www.example.com shows up in the description meta tag.

See also my post on this thread

Offline

#24 2006-04-06 22:29:47

jdueck
Plugin Author
From: Minneapolis, MN
Registered: 2004-02-27
Posts: 147
Website

Re: jad_metadata

thanks for the suggestions. I’ve updated the plugin to include a new wordcount parameter, and I also fixed the textile problem by using the pre-textiled excerpt text that txp stores in the database.

If you limit the words like &lt;txp:jad_metadata wordcount="10" /> then it chops the excerpt down to 10 words and tacks on “…” on the end, but if it was already shorter than ten words it just returns the excerpt as normal. Either way, all html/textile/php is filtered out, since there’s no need for it in the meta tags.

Finally, I updated the plugin’s help section too, to reflect the new changes and also the fact that editing admin_config.php for custom fields is a thing of the past…

Offline

#25 2006-04-11 16:30:09

wanni
Archived Plugin Author
Registered: 2005-11-11
Posts: 32

Re: jad_metadata

I like this plugin very much, thanks. I did a little tweaking so that it uses the article-text if no excerpt is present. After

<pre>
$the_excerpt = trim(strip_tags($res_excerpt0[“excerpt_html”]));
</pre>

insert

<pre>
if (strcmp($the_excerpt, “”) == 0) {
$res_excerpt = safe_rows(“body_html”, “textpattern”, “id=’$id’”);
$the_excerpt = trim(strip_tags($res_excerpt0[“body_html”]));
}
</pre>

Offline

#26 2006-05-22 13:03:13

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: jad_metadata

I would use jad_metadata immediately if it a) had a parameter to not echo the meta-keywords, because I am using txp:meta_keywords already or b) have a parameter to use the keywords filed instead of a custom field.

Any chance to get that done?

Another feature which is missing is some kind of ‘text before excerpt’ parameter so that you can have a leading standard info before the excerpt starts.

PS: Does somebody have an idea why TXP doesn’t have something already built-in like txp:meta_description_from_excerpt?


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#27 2006-10-24 21:22:22

Prax
Member
From: Huntsville, AL
Registered: 2006-09-27
Posts: 24

Re: jad_metadata

With the following code in your header and 2 custom fields set in advanced preferences (I use the first two fields, labeled: description and metakeywords) no plug-in is needed. Also, your page wont have empty tags (description=”“ and keywords=”“) if the fields are empty.. it just wont have the meta tags at all.

<txp:if_individual_article>
<txp:if_custom_field name="description"> 
<meta name=“description” content=”<txp:custom_field name="description" />" />
</txp:if_custom_field>
<txp:if_custom_field name="metakeywords"> 
<meta name=“keywords” content=”<txp:custom_field name="metakeywords" />" />
</txp:if_custom_field>
</txp:if_individual_article>
Just an option. I'm aware that this plug-in does more for those that want it.

Offline

#28 2007-03-10 11:31:59

shotoshi
Member
Registered: 2005-10-08
Posts: 48
Website

Re: jad_metadata

Markus, did you manage to get this plugin working with your keywords field?

I’m now using tru_tags for my tagging, which as you know uses the ‘keywords’ field.
I don’t really want to have the overhead of maintaining a custom field just to use this
plugin.

What other alternatives are there?

Offline

#29 2007-03-10 11:54:05

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: jad_metadata

@sotoshi: I am also using tru_tags on my site and can only recommend it.

Btw: With TXP 4.0.4 and the newest tru_tags version it is also possible to add keywords (and content) via form to the RSS feed.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#30 2007-03-10 12:01:46

shotoshi
Member
Registered: 2005-10-08
Posts: 48
Website

Re: jad_metadata

Cheers Markus! I know about tru_tags and the RSS feed but one thing I’m struggling with, and this is so off topic,
is how to get pictures and category names showing up in Feedburner feed?

Anyway, are you having any success with the jad_metadata plugin in conjunction with tru_tags
and the keyword field?

Or, is there a more flexible plugin for displaying desc and keywords in the head file?

Thanks in advance.

Offline

Board footer

Powered by FluxBB