View Full Version : VBAdvanced Link Directory META keywords / description
drewbe121212
10-12-2006, 02:12 PM
When visiting browselinks.php, I would like the meta keywords to be the current category name and the meta description to be the current category description.
While I can do the title, it appears that the description of the category isn't pulled from the database. Where is the query that does this so I can pull it and stick it into the template?
I have a feeling this is what builds the query:
"adv_links_cats($linkid)"
$catinfo[title] works
$catinfo[description] doesn't.
Help is definately appreciated!!
Brian
10-12-2006, 03:09 PM
The description for the category is not pulled in browselinks.php, so the only way to add that would be to add a query in that file to get it.
drewbe121212
10-12-2006, 09:42 PM
This is what I do not understand.
Isn't their a query that gets the title of the category itself? As it is displayed in the <title> tag ???
drewbe121212
10-13-2006, 02:11 AM
Sorry, I just noticed this is in the VBAdvanced CMPS forum; this should be in the advanced links forum section...
::Mod's please move me::
drewbe121212
10-13-2006, 01:35 PM
Brian,
Where is the current category title pulled from? I cannot seem to locate it?? I feel it would be a much better to just grab the description from that query rather then creating a hole new one just for the description.
Thanks for your insight.
PS this thread should be under VB Links Forum, not the CMPS.
drewbe121212
10-13-2006, 01:57 PM
Ok I have created a new query to do the specified above (get title, description). Now my problem is is that I cannot transfer the variables to the headinclude file? I put headinclude into the global template array at the beginning but nothing.
Suggestions?
Brian
10-13-2006, 06:42 PM
The title and such are not pulled from a query, it's all stored in a cache. Descriptions are not stored in that cache though as that would take extra room, and start defeating the purpose of having a cache.
The headinclude template is processed before anything in vBa Links is run, so it's not quite as simple to add something like that. One simple way to acomplish this though might be to add an <if condition> like this:
<if condition="THIS_SCRIPT == 'browselinks' AND intval($_REQUEST['catid']"><meta name="description" content="STRING_REPLACE_LINKSCAT" />
Then just add this after your query to pull the description:
$headinclude = str_replace('STRING_REPLACE_LINKSCAT', $category['description'], $headinclude);
drewbe121212
10-13-2006, 07:48 PM
Thanks friend,
Works like a charm :)
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.