Forums / All Other Contributions/Addons / META_TAG_FBTITLE in my Facebook links

META_TAG_FBTITLE in my Facebook links

Views: 1,872

Results 1 to 7 of 7
4 Jul 2011, 8:44 PM
#1
duiwel avatar

duiwel

New Zenner

Join Date:
Jul 2011
Posts:
4
Plugin Contributions:
0

META_TAG_FBTITLE in my Facebook links

Hi,

Couple issues when I attempt to create a Link to my site in Facebook;

THE TITLE:

When I post a link from my site into facebook for any page that isn't a direct Product page it generates a title of "META_TAG_FBTITLE".

I was wondering if there was perhaps some sort of conditional code I could add to either;

/includes/templates/<mytemplate>/common/html_header.php (where META_TAG_FBTITLE is called)

or

/includes/modules/<mytemplate>/meta_tags.php (where the string replace for the META_TAG_FBTITLE is defined)

that would allow me to display a static title when it's not a product page.

Or is there some other common fix for this?

THE THUMBNAIL IMAGE:

So, again, on every page that isn't a direct 'product' page when the link is copied into Facebook the "first" thumbnail image that is chosen is something that I would prefer not be the first choice, and I can't figure out why that image is at the top of the 'stack'.

It's not the first image on the page (it's typically the last, as its at the bottom of my sidebar), and, alphanumerically, it's not the first in a sort of A-Z sense (the name of the image begins with 'C').

On product pages it always uses the actual image associated with the product, so that's working fine.

Any suggestions?

Thanks in advance!!

4 Jul 2011, 11:22 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: META_TAG_FBTITLE in my Facebook links

META_TAG_FBTITLE suggests that this is a LANGUAGE CONSTANT.

Where is the module's associated LANGUAGE file being located?

You may need to add the "define" statement to other language files.

You could also try loading the associated language file into extra_definitions folder(s).

20 years a Zencart User

5 Jul 2011, 1:51 PM
#3
duiwel avatar

duiwel

New Zenner

Join Date:
Jul 2011
Posts:
4
Plugin Contributions:
0

Re: META_TAG_FBTITLE in my Facebook links

I'm in no way a Zen Cart expert... but I don't think what you describe is the issue here (granted, if it were, I'd need a few more details on your proposed fix. I tried to definite META_TAG_FBTITLE without the str_replace, with just straight text, in what seemed like the places you describe to no avail)

META_TAG_FBTITLE, as far as I can tell, is ONLY defined for products;

define('META_TAG_FBTITLE', str_replace('"','',zen_clean_html($product_info_metatags->fields['products_name'])));

I tried redefining it for Category names and dropped into - as far as I could tell - the corresponding places in the code where Zen Cart assembles meta tags for categories (within the "else" states for 'EOF';

$category_metatags = $db->Execute($sql);
if ($category_metatags->EOF) {
$meta_tags_over_ride = true;
} else {
define('META_TAG_TITLE', str_replace('"','', zen_clean_html($category_metatags->fields['categories_name']) . PRIMARY_SECTION . TITLE . TAGLINE));
define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . PRIMARY_SECTION . zen_clean_html($category_metatags->fields['categories_name']) . SECONDARY_SECTION . KEYWORDS));
define('META_TAG_KEYWORDS', str_replace('"','',KEYWORDS . METATAGS_DIVIDER . zen_clean_html($category_metatags->fields['categories_name'])));
}

		// EOF

There's a couple places where this 'EOF' sequence occurs for categories (only once for products, where FBTITLE is defined at the end of the ELSE statement), I tried to define FBTITLE in them one at a time, and then in all of them at once, to no avail.

But yeah, as far as I can tell, META_TAG_FBTITLE is ONLY defined that one time for products.

Not sure if that helps explain my issue better, thanks for taking the time! ;)

9 Sep 2011, 9:37 PM
#4
myemmadoodle avatar

myemmadoodle

New Zenner

Join Date:
Oct 2008
Posts:
45
Plugin Contributions:
0

Re: META_TAG_FBTITLE in my Facebook links

No fix for this??? I'm having this same exact problem. Images, everything else working just fine except for the FBTITLE situation, and the phrase also links properly to the actual product, so that's a plus... it's just the META_TAG_FBTITLE on my facebook wall that looks bleh! :blush:

15 Nov 2011, 7:52 AM
#5
fran avatar

fran

New Zenner

Join Date:
Oct 2005
Posts:
67
Plugin Contributions:
0

Re: META_TAG_FBTITLE in my Facebook links

Same with mine... is there not an ELSE statement that can be used somehow? or even better, get the facebook like buttons working on EZ pages and non-product pages...

19 Nov 2011, 5:30 AM
#6
saintsteven avatar

saintsteven

New Zenner

Join Date:
Mar 2010
Posts:
83
Plugin Contributions:
0

Re: META_TAG_FBTITLE in my Facebook links

I accidentally solved this problem today by trying to validate the XHTML on my site.

It turned out to be a problem with my doctype.

When I changed that to:

<!DOCTYPE html PUBLIC
 "-//W3C//DTD XHTML+RDFa 1.0//EN"
 "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

everything seemed to be run a lot better........

23 May 2012, 1:56 AM
#7
tobindonal avatar

tobindonal

New Zenner

Join Date:
Oct 2010
Location:
ireland
Posts:
23
Plugin Contributions:
0

Re: META_TAG_FBTITLE in my Facebook links

Saintsteven:

I accidentally solved this problem today by trying to validate the XHTML on my site.

It turned out to be a problem with my doctype.

When I changed that to:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
> 
> everything seemed to be run a lot better........


i don't suppose anyone can add an idiots reference on how to solve this...the metafabtitle thing kinda ruins linking back to my homepage, and after reading some stuff i'm even more lost...

anyone offer a link to help on this thingy...

sound

donal