Thread: Auto-Fill
View Single Post
  #4 (permalink)  
Old 02-04-2008, 09:24 PM
Geoserv Geoserv is offline
Banned
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
Ok, I am making progress with this, but need a little help.

In libs/link.php:

Code:
if ( preg_match ( '~<meta(.+?)name="description"(.+?)>~i',  $this->html, $matches ) )
{
  $description = preg_replace( '~^(.+?)content="([^"]+?)"(.+?)$~i', '$2', $matches[1].$matches[2] );
  echo $description;
}
in submit_step_2.tpl:

[cod]<textarea name="bodytext" rows="10" cols="55" id="bodytext" WRAP=SOFT onkeyup="if(this.form.summarycheckbox.checked == false) {ldelim}this.form.summarytext.value = this.form.bodytext.value.substring(0, {$StorySummary_ContentTruncate});{rdelim}textCount er(this.form.summarytext,this.form.remLen, {$StorySummary_ContentTruncate});">{$description}</textarea>[/code]

It is fetching the meta description of the URL submitted, but it is placing it above my content.



Try it out at News Dots / Login

Any ideas?

Geoserv.
Reply With Quote