Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2010-04-15 15:56:17

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

sebatorresi wrote:

when i go to see the source code between the description and copyright there is a empty space without “keywords”

If there is no articles assigned to the particular context, or if the articles have no keywords, then there is no content to be shown. Make sure that the value is getting some content from somewhere.

Remember that the article tag is responsible for getting the keywords, and it can only show what it usually can; it’s context aware. Rah_metas, in that particular example, just cleans the keywords from doubles.

Last edited by Gocom (2010-04-15 16:01:25)

Offline

#50 2010-04-15 16:32:43

sebatorresi
Member
From: Spain
Registered: 2009-05-27
Posts: 105
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Ahhhhh now i understand :)
And for the meta description?

Thanks!

Last edited by sebatorresi (2010-04-15 16:32:58)


Sonríe | Smile . <txp:lover />

Offline

#51 2010-04-15 16:42:03

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

sebatorresi wrote:

And for the meta description?

For article lists? You can feed the content to description attribute in same kind of way, but you need to find some way to store the data used for description in somewhere, like for example in sticky articles.

Offline

#52 2010-04-15 16:56:57

sebatorresi
Member
From: Spain
Registered: 2009-05-27
Posts: 105
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Ok is working now, the only problem is on the homepage that doesn’t show the keywords. I created the article and put the keywords on the article like the others sections.

Thanks!


Sonríe | Smile . <txp:lover />

Offline

#53 2010-04-15 17:10:21

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

sebatorresi wrote:

Ok is working now, the only problem is on the homepage that doesn’t show the keywords.

The default page has no articles. Either you have to use non-context sensitive tag (article_custom) or include articles from some section to the frontpage (on frontpage setting on for a section).

Offline

#54 2010-04-15 17:19:10

sebatorresi
Member
From: Spain
Registered: 2009-05-27
Posts: 105
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Ok i did it but don’t show the keywords
<txp:article_custom form="xxxx" category="xxxxx"/>
I don’t know what you mean with include the articles from some section to the frontpage

Thanks


Sonríe | Smile . <txp:lover />

Offline

#55 2010-04-16 15:01:27

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Small bug in rah_metas_strip function.

Input data:

First line<br />Second line

or

<h3>First line</h3><p>Second line</p>

Return:

First lineSecond line

Last edited by makss (2010-04-16 15:23:05)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#56 2010-04-16 16:26:30

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

makss wrote:

Small bug in rah_metas_strip function.

Thank you for your input makss. :-)

The outcome well known. It indeed does return that as I designed it to do that. Content is expected to have whitespace, line breaks or indention. If there is none and everything is clued together, then it will do that.

Should I change it? At least I have content authors that use various tags for styling and breaking the content, so reserving the functionality would mess their inputs. There really isn’t an easy way around this, as we can’t really know which is the correct outcome.

Atleast, as long as the author uses Textile there will always be whitespace generated by Textile.

Last edited by Gocom (2010-04-16 16:35:00)

Offline

#57 2010-04-16 16:50:55

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Is it possible to use such way?

  • replace strip_tags to strip_tags2 (or other function name)

and add code

function strip_tags2($q=''){
	$q=preg_replace('/(<.*?\>|\r|\n|\t)/s',' ',$q);
	return preg_replace('/ +/',' ',$q);
}

aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#58 2010-04-17 10:19:57

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

It`s not really a problem, but by using ‘messy_to_clean_redirect=“1”’ with rah_metas 1.1, textpattern 4.2, lighttpd 1.2.6 and section_id_title scheme, the redirection works only for “full” “messy_urls” like “index.php?id=1234” and not with “?id=1234”.

Offline

#59 2010-05-15 18:55:54

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Version 1.2 was released earlier today. Changelog:

  • Now the <txp:rah_metas/> tag can be (also) used directly inside <txp:article_custom/> and <txp:article/> blocks. That means that the tag now works in article lists. You just have to point it to the article. Thank you for requesting this Julián (I hope I spelled your name correctly :-))
  • Now any article field can be used in description_from and keywords_from attributes. Even title, authorid, override_form or status.
  • Now dublicate keyword “uniqueing” is done with array_unique().
  • Fixed keywords code escaping.

More info, play with customs and downloads

Now when there is that new article_custom/article support, you can basically do what manique suggested. Let me give you a small example:

<txp:article_custom id="5">
	<txp:rah_metas />
</txp:article_custom>

That takes the meta data from the article where the id is 5. All filtering mechanisms that article_custom, or article, provides can be used, including status and section:

<txp:article_custom status="5" section='<txp:section />'>
	<txp:rah_metas />
</txp:article_custom>

To tell the truth, it’s not that big of a change, that is the way it should’ve been from the start. It opens whole lot more possibilities.

whocarez wrote:

It`s not really a problem, but by using ‘messy_to_clean_redirect=“1”’ with rah_metas 1.1, textpattern 4.2, lighttpd 1.2.6 and section_id_title scheme, the redirection works only for “full” “messy_urls” like “index.php?id=1234” and not with “?id=1234”.

Maybe there is something wrong with registering the directory index. Does the ?id=1234 show the article? What happens if you remove the comment hashtag from the DirectoryIndex line in the default .htaccess file?

Last edited by Gocom (2010-05-15 19:05:31)

Offline

#60 2010-05-15 20:00:22

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools

Hi Gocom,

thanks to you for accepting the feature request and coding it. And yes, my name is spelled correctly, Spanish is very simple, not like that Finnish lang.

I’ll give a spin to the new rah_metas version asap.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB