Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
1 registered members (mmkk), 60 guests, and 404 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Posts: 82
Joined: September 2008
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 15
FREAK 11
M4TT 11
Ruben 6
mmkk 5
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
Facebook Per-Page Customization #239781
09/30/10 06:31 PM
09/30/10 06:31 PM
Joined: Jun 2008
Posts: 36
M
mmem700 Offline OP
newbie
mmem700  Offline OP
newbie
M
Joined: Jun 2008
Posts: 36
I'm working on putting Facebook "Like" button on certain posts on our forum.

The catch is that we need to have certain META tags present on the page which will be specific to that post (technically a topic). In other words, 1 topic will have to have a different set of META tags than another topic.

Is there a way to create topic-specific headers?

We're currently using UBBT 7.3.1. Is there perhaps a new feature that allows this in the most recent 7.x release?

Is this feature going to be available in the 8.x series? If so, we may just wait for that


If not, we can use Javascript injection to create the tags dynamically from the post itself, but I just wanted to know if there was a simpler way.

Thanks in advance.


If anyone is interested, I can followup this post showing how to do Javascript META tag injection.


Today they call you "crazy".
Tomorrow they call you "ahead of your time".

OrbisVitae.com
GlobalSkywatch.com
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: Facebook Per-Page Customization [Re: mmem700] #239783
09/30/10 08:12 PM
09/30/10 08:12 PM
Joined: Apr 2007
Posts: 4,313
SoCal, USA
SD Offline
Carpal Tunnel
SD  Offline
Carpal Tunnel
Joined: Apr 2007
Posts: 4,313
SoCal, USA
.js injection by manipulating the DOM works, but i'd recommend just modifying showflat.inc.php plus a tpl or two to do the work.

you are more semantic at the server level and can pass the optional meta to smarty for output..

2c

Javascript Injection Won't Work [Re: mmem700] #239796
10/02/10 05:09 AM
10/02/10 05:09 AM
Joined: Jun 2008
Posts: 36
M
mmem700 Offline OP
newbie
mmem700  Offline OP
newbie
M
Joined: Jun 2008
Posts: 36
I've been researching this and found that Facebook does not mention that its spider has the ability to run javascript. This means that javascript injection of OpenGraph headers (these are the header META tags that make your page act just like a Facebook "Page" - a good thing) will not work.

See, Facebook requires that your page include these headers in order for your page to act just like a Facebook "Page". Without them, your page will not be included in the "social stream" when a user clicks the "Like" button. (bummer)

So, the next area of research is to find the best way to add header tags server-side. The only catch is this: I have to know what post number is being viewed so the proper OpenGraph META tags can be built for each particular post that includes a "Like" button.

This will require me to know more about the UBB Threads architecture.

Does anyone have tips on where I can learn more about this?

In short, I need to know how to insert header tags server-side. Perhaps showflat.inc.php is the key, as you mentioned.

Also, I need to be able to know what post number is currently being viewed. Since I'll be in PHP (I assume), then I can _GET[] the "Number" element on the query string, but perhaps there's a better "UBB Threads"-ish kind of way???

Thanks in advance!

---

The process will be something like this:

1. Get post number

2. Search the database to see if any OpenGraph META tags are supposed to be associated with this post number.

3. If so, insert the appropriate META tags for this post number.


Today they call you "crazy".
Tomorrow they call you "ahead of your time".

OrbisVitae.com
GlobalSkywatch.com

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Users Unable to Upload Avatar
by M4TT. 12/13/17 08:51 AM
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
Forum Statistics
Forums36
Topics35,015
Posts190,535
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)