John,
I thought I would post the solution that I settled upon on the off
chance someone else has the exact same problem and finds this post.
It is not elegant, but it works and was quick to implement. Here are
lines 138 and 139 with 139 changed to construct my string correctly:
//break apart the external site address and get just the "
site.com"
part
$external_site_url = $external_site_url_peices[host];
$exteral_post_url = "http://".$external_site_url."/".
$external_post_permalink;
I was also thinking of looking into whether using siteurl rather than
wpurl would have worked, but I just dabble in PHP and am not that
familiar with the guts of Wordpress.
Thanks again for the great plugin and the help in resolving this one
issue.
On Oct 20, 5:00 am, John Eckman <
eckman.j...@gmail.com> wrote:
> Hi Reid - as I replied in private email to your contact on my blog,
> you're hitting a known WPBook issue.
>
> To work around it, you'd need to find the spot in the PHP where the
> permalinks are calculated and change the formula -
>
> Lines 126 to 139 of index.php inside wp-content/plugins/wpbook/theme/
> is where you need to look, and you basically need to change the
> external link url.
>
> (Because all of this takes place inside facebook, the permalink
> returned by get_permalink() at 129 is the Facebook version, from which
> the app url -
http://apps.facebook.com/reidcurleysite/- is then cut
> off, and the blogurl added back.)
>
> You may just want to cut the appropriate number of characters (for the
> subdirectory) off of $external_post_permalink after it has had the app
> url removed from it.
>
> Sorry if this is unclear but it gets confusing quicky. You can always
> echo the output of these variables to an html comment and then see
> what they are as you test different versions.
>
> The other route would be to create an .htaccess rewrite rule which
> maps the permalink urls from the subdomain up, but that's kind of a
> hack not a solution.
>
> On Oct 18, 2009, at 2:52 AM, Reid Curley wrote:
>
>
>
>
>
> > Hi there. Great app, but I seem to have one problem.
>
> > I installed the WP files to a subdirectory of my domain
> > (
reidcurley.com/_SubDir_WP), but I located my blog in the root
> > (
reidcurley.com).
>
> > My canvas page ishttp://
apps.facebook.com/reidcurleysite/. It is
> > pulling the posts into FB correctly, but the links back to my blog
> > include the path to the subdirectory where my WP files are located
> > instead of just the root.
>
> > In other words, when I click on "View post on
reidcurley.com" it links
> > to
>
> >
http://reidcurley.com/_SubDir_WP/permalink
>
> > instead of
>
> >
http://reidcurley.com/permalink.
>
> > Any thoughts on how to fix this?
>
> > Many thanks.
>
> ----------------------------------------
> John Eckman
> eckman.j...@gmail.comhttp://
www.johneckman.com/