Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#109 2011-08-12 23:46:51

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

What I like to do is using forms. It cuts the amount of conditionals and makes changing the information pretty easy. Makes it intuitive too when working with cnk_versioning (or similar) and VCS.

I.e.

<title><txp:output_form form='title_<txp:section />' /></title>
<meta name="description" value="<txp:output_form form="description_<txp:section />_<txp:category />' />" />

MattD wrote:

Maybe adi_variables could be used to create variables for each meta description?

That’s good suggestion. Gives nice GUI way of managing variables.

douglgm wrote:

It all gets a bit messy and a admin interface to round this all together would be nice! ;-)

Yes interface could be nice. But can one interface give the same power as tags, can it fill the void and how to make it usable, not a burden, just one thing more to configure. Metas aren’t really even that important.

Last edited by Gocom (2011-08-12 23:54:10)

Offline

#110 2011-08-16 13:41:08

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

I use a combination of forms, and sticky articles at the moment.

The difficulty I have is that ideally, I want the site owner (not just me as the web designer) to be able to manage their seo related data. Burying all this stuff in forms makes this difficult and blurs the separation of content and the underlying infrastructure.

I will take a look at adi_variables too.

Just wondered if you were interested in evolving rah_metas into rah_completeseo!

Offline

#111 2011-10-30 00:26:59

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.5 released. Nothing really major, just some house cleaning and simplifying. Changes:

  • Wrapped set of extra functions into a class, and removed the prefixing from the new methods.
  • Added comments, cleaned up some code.
  • Removed rah_metas_textile() function.

More info and downloads

Offline

#112 2011-11-01 13:41:50

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

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

Dear all,

Just like Destry a couple of months ago, I also find just a blank, where the meta output should be.

Here’s the tag trace you’ve requested when Destry made his post. Are there any errors, I’m overlooking?

Kind regards,
Sharon

<!-- Runtime:    0,0339 -->
<!-- Query time: 0,019755 -->
<!-- Queries: 18 -->
<!-- Memory: 6553Kb, <txp:image id="9" /> -->
<!-- txp tag trace: 
[SQL (0,00144290924072): select name, data from KVMtxp_lang as txp_lang where lang='nl-nl' AND ( event='public' OR event='common')]
[SQL (0,00422596931458): select name, code, version from KVMtxp_plugin as txp_plugin where status = 1 AND type IN (0,1) order by load_order]
[SQL (0,000251054763794): select name from KVMtxp_section as txp_section where `name` like 'articles' limit 1]
[SQL (0,000256061553955): select page, css from KVMtxp_section as txp_section where name = 'articles' limit 1]
[SQL (0,000453948974609): select host from KVMtxp_log as txp_log where ip='212.123.189.220' limit 1]
[SQL (0,000393867492676): insert into KVMtxp_log set `time`=now(),page='/articles',ip='212.123.189.220',host='212-123-189-220.ip.telfort.nl',refer='',status='200',method='GET']
[SQL (0,000268936157227): select user_html from KVMtxp_page as txp_page where name='default_nieuw_ontwerp']
[Pagina: default_nieuw_ontwerp]
<txp:output_form form="std-header" />
	[SQL (0,000555992126465): select Form from KVMtxp_form as txp_form where name='std-header']
	[Module: std-header]
	<txp:page_title />
		[SQL (0,000240802764893): select title from KVMtxp_section as txp_section where name='articles']
	<txp:rah_metas description_from="excerpt,body" words="50" keywords_from="keywords" />
	<txp:css />
	<txp:output_form form="menu" />
		[SQL (0,000397920608521): select Form from KVMtxp_form as txp_form where name='menu']
		[Module: menu]
	<txp:article_custom id="17" form="referenties" />
		[SQL (0,00109314918518): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from KVMtextpattern as textpattern where 1=1 and Status >= 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and ID IN (17) order by Posted desc limit 0, 10]
		[artikel 17]
		[SQL (0,000298976898193): select Form from KVMtxp_form as txp_form where name='referenties']
		[Module: referenties]
		<txp:body />
<txp:article />
	[SQL (0,00534605979919): select count(*) from KVMtextpattern as textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section IN ('articles')]
	[SQL (0,00137090682983): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from KVMtextpattern as textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section IN ('articles') order by Posted desc limit 0, 10]
	[artikel 1]
	[SQL (0,000333070755005): select Form from KVMtxp_form as txp_form where name='default']
	[Module: default]
	<txp:title />
	<txp:body />
		<txp:image id="9" />
			[SQL (0,0014750957489): select * from KVMtxp_image as txp_image where id = 9 limit 1]
<txp:output_form form="std-footer" />
	[SQL (0,000431776046753): select Form from KVMtxp_form as txp_form where name='std-footer']
	[Module: std-footer]
[ ~~~ secondpass ~~~ ]
 -->

Added code formatting (bc.) -Gocom

Last edited by Gocom (2011-11-01 14:24:18)

Offline

#113 2011-11-01 14:19:51

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

keukenkikker wrote:

Are there any errors, I’m overlooking?

I wouldn’t say there are actual errors, the code is actually really fine. It’s just that, as far as I see, there is nothing to build the meta data from. That page is neither an individual article page (it’s a section landing page), the tag isn’t wrapped in an article tag, and there are no defaults set with the fallback attributes.

The tag basically needs an article to work. The tag can only output something when either;

  • Used in an individual article context.
  • Wrapped in an article or article_custom tag, or placed in an article form (as in example #3 or here).
  • Default values are set with description, keywords etc attributes.

Last edited by Gocom (2011-11-01 14:37:28)

Offline

#114 2011-11-03 09:54:40

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

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

Sometimes life is just so simple ….

Thank you Gocom, you where right!

Offline

#115 2012-01-19 20:03:30

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,

I wonder if on a future version of this plugin (or maybe on a new one?), the content-processing capabilities of rah_metas could be accessed, making it possible to output just the processed content.
Let me try to explain:

I’d like to use the “description” (just the string generated by rah_metas) in other places, like the <meta property="og:description" content="STRING_GOES_HERE" />, taking advantage of how rah_metas create that string (i.e. it has a priority list for where to look for the content, it removes/strips html/textile, it cuts the resulting, cleaned, plain text string at certain amount of chars/words).

This may not be in the scope of the plugin, or maybe it’s the task for another plugin (one that receives a least of fields, check one by one until it finds one populated, and if so, it processes that field’s value and breaks the iteration). I’m even thinking the result could be achieved via a mix of smd_each (to iterate), smd_wrap (to process), and, optionally, rvm_substr (to cut).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#116 2012-01-20 01:01:38

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

While here, let me add one issue report.
I’ve set messy_to_clean_redirect=“1”@ and I’m getting a redirect loop. It’s an issue between rah_metas and gbp_permanent_links, as disabling gbp_permanent_links fix the issue (ie. the messy URL is properly redirected to the nice one, thanks to rah_metas).
I wonder if this issue could be addressable from within rah_metas, or if it should be taken care by hacking a little into gbp_p_l.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#117 2012-01-20 01:21:18

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

maniqui wrote:

I wonder if this issue could be addressable from within rah_metas, or if it should be taken care by hacking a little into gbp_p_l.

Unfortunately I can literally do nothing about that. I would just recommend turning the redirecting feature off, and not looking back (the feature is not wroth much anyways).

The thing just is that in rah_metas eyes the URLs are messy, even if they are not. PHP’s core server variables are being altered to tell so by an other plugin. For instance, gbp_permanent_links and MLP both work (to some extent) by modifying PHP’s core variables (instead of creating their own copies). That’s how those plugins hack Textpattern to do the things they do. As it is, it can be expected that other plugins that relay on that same information will malfunction.

Last edited by Gocom (2012-01-20 01:23:19)

Offline

#118 2012-01-20 01:38:26

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

Thanks for the prompt reply, Gocom.

No problem.
In any case, I tried a 301 external redirect (via mod_rewrite in .htaccess), which almost worked: it redirected properly from messy to clean.
But that brought another issue: as I wanted to do a redirect for addressing the “issue” of a form (created by yab_shop plugin) POSTing to a messy URL (action="/index.php?s=some_section"), the new problem was that the redirect worked, but it seems that POST request went missing in action.
In other words, the form POSTs to the messy URL, mod_rewrite redirects visitor to a clean one, but then, “nothing happens”: the submitted stuff goes M.I.A.
Anyway, I can live with that messy URL. And if not, I’ll hack yab_shop to submit to a clean URL, not a messy one. :D


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#119 2012-04-30 14:50:44

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

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

Hi Jukka

I have a cheeky feature request for v1.6. I’d like to be able to specify a txp:var in the description_from stack.

I commonly use a single form to set/manage variables for small bits of copy and meta and it includes meta descriptions for pages that don’t have any specific articles, like landing pages.

eg. description_from="news-meta-desc,teaser,excerpt,body"

Does that sound possible?

Offline

#120 2012-04-30 19:24:58

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

Stuart,

Noted. We’ll see. There changes that rah_metas is going to get superseded.

Offline

Board footer

Powered by FluxBB