Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Generate auto meta descriptions and keywords
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: Generate auto meta descriptions and keywords

Generate auto meta descriptions and keywords 14 years, 6 months ago #7995

Hi,

I would to know if its possible with joomsef to autocreate meta description and meta keywords

because i have more than 2000links on my website, and its too much work to create meta for all this pages.....


joomsef create automaticaly meta description and meta keywords but that sucks....

this is a example of meta generate by joomsef, joomsef add only one word and its the article title :

<meta name="keywords" content="Dell" />

<meta name="description" content=". Dell." />


ONLY one word for keywords and for the description its always one word with a dot before....


that will be cool if i can found a way to add words after the word ''DELL (article title generate by joomsef)"

Re:Generate auto meta descriptions and keywords 14 years, 6 months ago #8094

  • y2ksw
  • OFFLINE
  • Joomla: latest; JoomSEF: latest
  • Posts: 20
I use this code for creating a meta description:
// Read articles
$SQL = "SELECT id, CONCAT(introtext, `fulltext`) AS metatext
FROM jos_content
WHERE introtext>''
AND metadesc=''";
$rss = $db->query_read($SQL);
while($rs = $db->fetch($rss))
{
$metadesc = strip_tags($rs['metatext']);
//echo $rs['id'] . htmlspecialchars($metadesc); die;
while(strlen($metadesc) > 255)
{
$i = strrpos(substr($metadesc, 0, -1), '.');
if($i === false)
{
break;
}
$metadesc = substr($metadesc, 0, $i + 1);
}
$metadesc = $db->escape_string($metadesc);

// Write record
$SQL = "UPDATE jos_content
SET metadesc='$metadesc'
WHERE id=$rs[id]";
//echo htmlspecialchars($SQL); die;
$db->query_write($SQL);
if($db->errno)
{
echo $db->error;
die;
}

echo "Meta Description Article: $rs[id]<br />" . str_repeat(' ', 255);
flush();
}

Re:Generate auto meta descriptions and keywords 14 years, 6 months ago #8099

thank you 2ksw !!
  • Page:
  • 1
User Login Empty