Geoserv Posted February 5, 2008 Share Posted February 5, 2008 I have a site where people can submit content from other websites. In step 1 they enter a URL and my script fetches the URL title and displays it on step 2. It then shows boxes for the user to enter the description, tags, category. I am trying to get the script to fetch the meta description and display it in the description box already shown where the user can edit or enter more info. php: if ( preg_match ( '~<meta(.+?)name="description"(.+?)>~i', $this->html, $matches ) ) { $description = preg_replace( '~^(.+?)content="([^"]+?)"(.+?)$~i', '$2', $matches[1].$matches[2] ); echo $description; } then in my .tpl file: <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> but its not displaying the description here. It puts it above my content. For example these forums come up as: PHP Freaks Forums - Index You can see in action at http://www.newsdots.com/submit User: Geoserv Pass: raven3 Any ideas what I am missing? Geoserv. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.