Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
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
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
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
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
Re: rah_metas // new 1.x-versions of SEO/redirecting/automatic meta-tools
Is it possible to use such way?
- replace
strip_tags
tostrip_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
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
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
andkeywords_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
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.
Offline