Loading...
 
Features / Usability

Features / Usability


TW6.3/7.0: Page-specific meta-tags?

posts: 26

Hi,

the manual page

and the post

describe how to set site-wide meta-tags.

However, for tight integration with Facebook's social graph using Open Graph data, is there a way to set page-specific meta-tags in Tiki 6.3 and 7.0?

Maybe something conceptually like a »PluginMeta« which collects meta data from a wiki page source and renders it into the HTML header data of the respective page?

Thx & regards,
– Dan

posts: 4656 Japan

Any tags assigned to a page with the Freetags feature are added to the meta tags in HTML head for that page.

-- Gary - zukathemes.com


posts: 3665 United States

You can use the Keywords feature to add wiki page-specific meta tags. I'm not sure if that option is available in Tiki 3.x.

HTH,

- Rick | My Tiki Blog | My Tiki UserPage

Tiki for Dummies Smarties, the best (and only) Tiki beginner's guide! Learn more...

Tiki Essentials, the best-selling book for Tiki! Learn more...

Need more help? Try Tiki for Dummies Smarties: A beginner's guide and Tiki Essentials: What all Smarties need to know about Tiki Wiki CMS Groupware.


posts: 26

Rick, Gary,
thx for your prompt replies!

Regarding wiki keywords:

I didn't find anything in the Tiki documentation or in the Tiki installations at hand about the Wiki keywords feature except it's On/Off-switch on the wiki admin panel.

How are keywords added to a page? By use of a plugin?? Or else???

Regarding Freetags:

The Tiki Freetags feature causes code like this to be added to the body of the HTML file:

Copy to clipboard
(article id="top" class="wikitext clearfix nopagetitle") (div class="freetaglist")Tags: (a class="freetag" href="tiki-browse_freetags.php?tag=FOO")FOO(/a) (a class="freetag" href="tiki-browse_freetags.php?tag=BAR")BAR(/a) (/div) … (/article)

(Edited to use braces instead of less-than/greater-than glyphs.)


However, what I'm looking for is a way to generate individual (not site-wide) META HTML-tags in the head of the respective HTML file resulting from a Tiki object (wiki page, blog entry, …).

Facebook's open graph parser expects code like this (OK, maybe not that particular movie, but this is another story. wink):

Copy to clipboard
(html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml") (head) (title)The Rock, 1996(/title) (meta property="og:title" content="The Rock"/) (meta property="og:type" content="movie"/) (meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/) (meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/) (meta property="og:site_name" content="IMDb"/) (meta property="fb:admins" content="USER_ID"/) (meta property="og:description" content="A group of U.S. Marines, under command of a renegade general, take over Alcatraz and threaten San Francisco Bay with biological weapons."/) … (/head) … (/html)

(Example from https://developers.facebook.com/docs/opengraph/, edited to use braces instead of less-than/greater-than glyphs.)

The above would be the code to be contained in the HTML code of a wiki page about the movie »The Rock«.

Note that it's not enough to just add some keyword or freetag, rather key-value-pairs like og:site_name→IMDb are required.

Any ideas how to achieve this?

Thx & regards,
– Dan

posts: 4656 Japan
Dan.BTown wrote:

Rick, Gary,
thx for your prompt replies!

...

Regarding Freetags:

The Tiki Freetags feature causes code like this to be added to the body of the HTML file:

...

However, what I'm looking for is a way to generate individual (not site-wide) META HTML-tags in the head of the respective HTML file resulting from a Tiki object (wiki page, blog entry, …).


Yes, freetags do insert that code into the body, but also add the term to head's meta tags. Check the page source of a Tiki page that has a tag, to confirm that. (True for Tiki 7; I'm not sure what other versions.)

Facebook's open graph parser expects code like this (OK, maybe not that particular movie, but this is another story. wink):

...

(Example from https://developers.facebook.com/docs/opengraph/, edited to use braces instead of less-than/greater-than glyphs.)

The above would be the code to be contained in the HTML code of a wiki page about the movie »The Rock«.

Note that it's not enough to just add some keyword or freetag, rather key-value-pairs like og:site_name→IMDb are required.

Any ideas how to achieve this?

Thx & regards,
– Dan


Tiki has no built-in support for the Open Graph protocol, as far as I know. The Wordpress plugin, etc. apparently adds code to the file used to create/display the html head, to insert the pairs (for reference: http://blog.bottomlessinc.com/2010/04/creating-a-wordpress-plugin-add-the-new-facebook-like-button-to-your-posts/), and this kind of modification also would be needed for Tiki. You could post a message (need to subscribe first) to the Tiki developers mailing list, to contact directly more people who could implement this.

-- Gary - zukathemes.com


posts: 26

Gary,

Gary Cunningham-Lee wrote:
Yes, freetags do insert that code into the body, but also add the term to head's meta tags. Check the page source of a Tiki page that has a tag, to confirm that. (True for Tiki 7; I'm not sure what other versions.)

This is what I did before I wrote my last post. cool

Although the metatag admin panel (tiki-admin.php?page=metatags) has a switch to turn on/off »Freetags einbinden« (german i18n; I assume english i18n is »Include Freetags«), on a Tiki 7.0 installation I didn't manage to have the Freetags included as a page description in the META tags, no matter what.

I also noted during this testing, that it was not enough to stay within the usual edit-read-cycle of a wiki page to make the Freetags visible at all — rather I had to leave the page for another wiki page and come back to the original page to make the Freetags visible even in the document body.

It's also irritating that the metatag admin panel has another switch named »Benutze individuelle Seitenbeschreibung anstelle« (I assume it's »Use individual page description instead« in english i18n). The naming of the switch suggests that if this individual description is given, than it will shadow other descriptions — maybe also a page description resulting from Freetags. (I couldn't check this, because, as I wrote above, »Include Freetags« in the META data is entirely not working for the Tiki 7.0 installation I tested.)

»Use individual page description instead« is almost what I'm looking for; unfortunately it just puts the given string into a META tag of the name »description«.

Gary Cunningham-Lee wrote:
Tiki has no built-in support for the Open Graph protocol, as far as I know. The Wordpress plugin, etc. apparently adds code to the file used to create/display the html head, to insert the pairs (for reference: http://blog.bottomlessinc.com/2010/04/creating-a-wordpress-plugin-add-the-new-facebook-like-button-to-your-posts/(externer Link)), and this kind of modification also would be needed for Tiki. You could post a message (need to subscribe first) to the Tiki developers mailing list, to contact directly more people who could implement this.

Actually, the Open Graph protocol is not needed to make use of Facebook's »social plugins« like the Like button — Most of the social plugins will work without Open Graph data. (I already have lots of fun with the like button on a certain Tiki installation. mrgreen)

The Open Graph data is rather used to attach an entity that is external to Facebook to Facebook's »social graph«, the giant datastructure behind Facebook's surface. External HTML pages which are tagged with Open Graph data can behave like original company or project pages inside of Facebook.


OK, I'll check now if I can include individual META tags using the field »User defined HTML content« on the Look&Feel admin panel (tiki-admin.php?page=look) by some include or link mechanism.

Regards,
– Dan


posts: 26

Hi,

I'm now close to a scruffy ad hoc solution for the integration of Open Graph data.

To finish the idea, I need access to the root HTML tag which Tiki emits for the pages it serves, in order to add the XML Namespace attributes for Open Graph (xmlns:og) and Facebook (xmlns:fb):

Copy to clipboard
(html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml")

(Edited to use braces instead of less-than/greater-than glyphs.)

Anyone knows which part (file, script) of Tiki emits this root HTML tag?

Thx & regards,
– Dan


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting