i was going to ask advice on a translation from Wordpress Code to Posterous re:this Facebook Code

4 views
Skip to first unread message

cy

unread,
Dec 19, 2010, 12:14:32 AM12/19/10
to Posterous Custom Theme Developers

i was going to ask advice on a translation from *Wordpress* Code to
*Posterous* re:this *Facebook* Code...
------------------------------------------------------------

## which i've got *half* working ##

(as far as ***Else*** and ***If***'s are concerned, but it's so
**tedious** that i can't even imagine putting the question into
words...

[here][1]'s a link to the hyperarts blog post with the coding (if
there is anyone out there who really likes a challenge)?

[http://www.hyperarts.com/blog/how-to-add-facebook-like-button-social-
plugins-to-wordpress-posts/][2]

> and the same goes for Gil's how-to for **Tumblr** (which i
> also took a crack at translating) here:

[http://forum.developers.facebook.net/viewtopic.php?pid=238518][3]


<code>
<meta property="fb:admins" content="YOUR-ADMIN-ID"/>
<meta property="fb:app_id" content="YOUR-APP-ID" />
<meta property="og:type" content="article" />
<?php if(is_home()) {
?><meta property="og:title" content="My Blog Name" /><?php
} else {
?><meta property="og:title" content="<?php
the_title_attribute( $args ); ?>" /><?php
}
?>
<?php if (is_home())
echo '<meta property="og:url" content="YOUR-APP-URL" />';
else echo '<meta property="og:url" content="'.get_permalink().'" /
>';
?></code>







<code> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://opengraphprotocol.org/schema/"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>
<link rel="icon" href="/images/favicon.png" type="image/x-
png">
<title>{PageTitle)</title>
<meta property="fb:admins" content="100001854683223"/>
<meta property="fb:app_id" content="185062678172554" />
<meta property="og:type" content="blog" />

<meta property="og:description" content=""/>

</head>

<body>

<fb:login-button autologoutlink="true"></fb:login-button>
<fb:like></fb:like>

<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '185062678172554', status: true, cookie:
true,
xfbml: true});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<div class="container">






<div id="articles">

{block:List}
<ul class="post-list">
{block:Posts}
<li>
<a href="{Permalink}">
{block:PostImage size='180'
dimension='width'}
<span class="post-brief-image-
container">
<span class="post-brief-
image">
<img src="{PostImageURL}"
width='180'>
</span>
</span>
{Else}
{block:BodyExcerpt
strip_tags="true"}
<span class="post-brief-text">
{BodyExcerpt}
</span>
{/block:BodyExcerpt}
{/block:PostImage}
<span class="post-title">{Title}</
span>
</a>
</li>
{/block:Posts}
</ul>
<div class="clear"></div>
{/block:List}




{block:Show}
{block:Posts}
<article class="post clearfix"
id="post_{PostID}">
<header>
{block:Private}
<section class="private">
<aside>
<a href="{Permalink}"
class="tooltip_link"><img src="/images/icons/lock12.png"></a>
<div class="private_post_message">
<h1>Private Post</h1>
<p>This post has a secret URL
and not linked on your public blog. Send the secret URL to share it
with anyone.</p>
</div>
</aside>
</section>
{/block:Private}
{block:Title}
<h1><a href="{Permalink}">{Title}</a></
h1>
{/block:Title}
{block:SMS}
<aside class="sms">Posted from my
mobile phone (SMS)</aside>
{/block:SMS}
<div class="editbox">
{block:EditBox}
{EditBoxContents}
{/block:EditBox}
</div>

</header>
<div class="body">
<div class="inner">
{Body}
</div>
</div>
<footer>






</div><!-- /.container -->


</body>
</html></code>


[1]: http://www.hyperarts.com/blog/how-to-add-facebook-like-button-social-plugins-to-wordpress-posts
[2]: http://www.hyperarts.com/blog/how-to-add-facebook-like-button-social-plugins-to-wordpress-posts/
[3]: http://forum.developers.facebook.net/viewtopic.php?pid=238518


http://posterous.com/theming/simple
http://help.posterous.com/
http://posterous.com/theming/reference#
http://posterous.com/theming/reference#block_Homepage
http://posterous.com/theming/reference
http://www.hyperarts.com/blog/how-to-add-facebook-like-button-social-plugins-to-wordpress-posts/#ixzz18Ww4pXAF
Reply all
Reply to author
Forward
0 new messages