sitemaker
Forum Replies Created
-
Forum: Plugins
In reply to: WPbook: Where to find upgrade's code changes, for use on hacked plugin files?OK, I’ve gone through the files looking for the hacks, and I don’t have to worry about the wpbook.php file. The only change I made to that was what you suggested here, and I’m sure you put that in already.
I assume that my modified app template will still work from one WPbook release to another. Is that reasonable?
If so, then it’s only the publish_to_facebook.php file where I have to be careful.
Here is a hack that I recommend you do add to publish_to_facebook.php for everybody:
// your original line 55: // $wpbook_description = stripslashes(wp_filter_nohtml_kses(apply_filters('the_content',$my_post->post_content))); // replacement code begins: $JLW_description = apply_filters('the_content',$my_post->post_content); $JLW_beforeMore = strpos($JLW_description,'<!--more-->') ; if ( $JLW_beforeMore === false) { } else { $JLW_description = substr( $JLW_description, 0, $JLW_beforeMore ) . '...' ; } $wpbook_description = stripslashes(wp_filter_nohtml_kses( $JLW_description )); // replacement code ends.
This makes WPbook respect the
<!--more-->
tag, as described in the installation instructions.My other suggestion would be to pull any echoed text out into a language file. For example, somewhere around line 95, I have:
$action_links = array( array('text' => 'Rate · Read More', // JLW: originally was 'Read More'
If an admin could specify strings like these in a language file outside of publish_to_facebook.php, upgrades would be easier. It would especially help translators.
(I changed that text because my customization of the app template shows the Five-Star-Ratings plugin’s rating of each post. Although it is visible on both the Wall and the App’s category/tag/archive lists, you can’t actually vote with the stars until viewing the whole post in the App.)
The other changes were also of that nature. So if the READ MORE tag is respected and the default strings are in a language file, I’d never be scared of upgrades.
Thanks again for a great plugin!
Forum: Plugins
In reply to: WPbook: FB can't add app to profileThank you so much for the clarity re: FB pages.
I have deleted the [Jewish Jokes Fan] Page, and
changed WPbook’s settings to post to the Wall of the App’s Page, and
deleted the App Tab
(I can’t imagine why, after putting so much customization work into the WPbook App template, I would ever want anyone to see the crude App Tab contents), andadded a “Post a Joke” link in the WPbook template that links to the App’s Wall (i.e., the App’s Page).
Everything seems to be running smoothly. Thank you so much!
Forum: Plugins
In reply to: WPbook: FB can't add app to profileEach time I fix something I seem to break something else!
1.
The Wall-Posting problem turned out to be simple: Each post has a new feature in the editing area that I never noticed before, called “Custom Fields”, and displays a custom field named “wpbook_fb_publish”.The posts that weren’t flowing to the Wall had one (or more!!!) instances of this custom field set to no.
I don’t know why some posts had more than one instance of the field. But deleting them until there was just one instance, and setting it to yes, is all that was needed.
Thank you for this great WP Plugin and this great support.
2.
I set a 75×75 image for the app.
I also changed the image associated with one of the app’s two Profile Pages (see #3 below). But then changed my mind and uploaded it back to the original.Apparently as a result, the Jewish Jokes app tab on the Profile Page now has its contents all messed up. The featured images are gone, and the layout seems cruder, and the text of the links simpler. The template for that tab must have been reset to some default.
I’ve tried removing the Jewish Jokes tab, and adding it anew. But contents are still wrong template. Can you look at https://www.facebook.com/pages/Jewish-Jokes/137026546358702?v=app_181713155192177&ref=sgm
and see if you can tell why does the Jewish Jokes app’s Tab’s contents look like that?
(The Wall is now fine.)3.
I am thoroughly confused by Facebook, specifically about the difference between some very similar Profile Pages, and I never know which one I’m being taken to and why.One Jewish Jokes Profile Page has the URL https://www.facebook.com/pages/Jewish-Jokes/137026546358702?v=app_181713155192177&ref=sgm
and it says I have no Active Users, and have only the two Likes that I did myself. This is the page with the Wall and the (now messed up) Jewish Jokes Tab.The other Jewish Jokes Profile Page says that I already have 11 monthly users, including one friend. Its URL is: https://www.facebook.com/apps/application.php?id=181713155192177
but its wall is empty, and the tabs are completely different.Why do I have two Profile Pages? Which one do other Facebook Users see as *the* Jewish Jokes Profile Page? Do I need both, or could the Wall-Posting and AppTab have been added to the facebook.com/apps/ Profile Page without having needed to make any facebook.com/page/… Profile Page?
( The Jewish Jokes app is at https://apps.facebook.com/jewish-jokes/ and it looks fine.)
Forum: Plugins
In reply to: WPbook: FB can't add app to profileThere’s no correlation between the posts’ lengths and whether they will flow to the Wall, nor any correlation with how far into the post the MORE tag is. There’s no correlation with the presence or absence of EM tags, which is the only HTML used in posts so far; there’s nothing special inside any titles.
I hadn’t thought to consider the lengths of the titles until just now; I’ll go check that.
All the posts have one “featured image” and no other. All have a MORE tag (which protects at least the punch line, but usually much more).
Since the site is brand new, all posts are by the same author, me.
Will poke around some more and get back here with the results…
Forum: Plugins
In reply to: WPbook: FB can't add app to profileI have added
add_action('pending_to_publish','wpbook_publish_to_facebook');
to wpbook.php as per the thread at: …/topic/plugin-wpbook-not-posting-to-facebook-wall-when-contributors-posts-are-approved-by-editors…
but that didn’t fix the problem. I also tried un-publishing the posts to Pending status rather than to Drafts (before re-Publishing them). Still didn’t work…
deleted
Forum: Plugins
In reply to: WPbook: FB can't add app to profileI think I’ve determined that FB no longer allows Application tabs on [user] Profiles; but that neither FB’s error messages nor WPbook’s installation instructions have been updated to reflect that.
Instead, I was able to make a [fan] Page for the WP website and put a WPbook application tab there.
The unstable email verification of the developer’s FB ID may be a problem, but it is unrelated to the aforementioned issue. It was a red herring.
Although I got WPbook to publish posts to the Page’s Wall, there are two remaining issues:
1.
When I unpublish and re-publish existing WP posts (to make them appear on the Wall), most posts appear but some do not. All is repeatable: the posts that go to the Wall always go to the Wall; the posts that don’t stream to the Wall, never do.I don’t see a pattern; some from each group are short, others long; some of each have HTML in the post, others don’t. (All the WP posts have a featured image and all have a MORE tag.)
2.
WPbook doesn’t work as per its documentation: The installation documentations says that the Wall will show the post’s excerpt, if one was specified; otherwise the post’s intro up to the MORE tag, if one was specified; and otherwise a limit of 995 characters. However, WPbook actually ignores the MORE tag.I hacked publish_to_facebook.php to fix this, as follows:
// $wpbook_description = stripslashes(wp_filter_nohtml_kses(apply_filters('the_content',$my_post->post_content))); // JLW: this was the original code! // JLW replacement code begins: $JLW_description = apply_filters('the_content',$my_post->post_content); $JLW_beforeMore = strpos($JLW_description,'<!--more-->') ; if ( $JLW_beforeMore === false) { } else { $JLW_description = substr( $JLW_description, 0, $JLW_beforeMore ) . '...' ; // JLW: force WPbook to respect the <!--more--> tag! } $wpbook_description = stripslashes(wp_filter_nohtml_kses( $JLW_description )); // JLW replacement code ends.
It seems to work fine, and I include it here in case it may help somebody else.
Any ideas for troubleshooting #1, or feedback on the viability or usefulness of #2 are appreciated.
— J.
THANK YOU. That’s very clear & I’ll do it right away.
By the way, I commented out line 18 (that function call), and the template all seems to work fine. I was coming back here to report that when I found your reply. Perhaps it only works fine because of my usage pattern (for example, every post has exactly one featured image and no others, etc.)
Anyway, I will apply the rest of the changes. Thank you so much for the reference to trac. I didn’t know about that resource before. It’s terrific. Thank you very much.
1.
Emil,
No “echo” in the php, just a function call, but otherwise yes.
(This is where the code decides whether there’s a featured image in the post, or if the template will have to supply its own random image.)2.
Pseudoxiah,
I’ve modified the template enough that I can’t update automatically until I know what files are gonna be touched. Is there a place I can just see the changes, so I can apply them myself? I’m at template version 1.6.3.I’ve added a widget position to functions.php; and modified the visible on-screen text that the template had hard-coded in just about every other part (header, sidebar, home, category, tag, archive, single, search); and of course tweaked the css file. (I imagine it might be faster to copy in the missing function than to reapply all my changes.)
Forum: Plugins
In reply to: WPbook: site not appearing properly in facebokTHANK YOU.
I went back in and saw nearly every migration enabled. Not sure why, since I believe I checked and only two were enabled originally, and I disabled those when I set the app up. But just now they were almost all enabled! I disabled them all, and now it works!
Thank you.
Forum: Plugins
In reply to: WPbook: site not appearing properly in facebokBy the way, I tried going directly to the URL in your post (https://jewishjokes.org/?fb_sig_in_iframe=1&)
It took me to a facebook page asking if I gave permission for JewishJokes.org to access my profile information.
When I approved it, the browser began switching back and forth between “Waiting for https://www.facebook.com” and “Waiting for JewishJokes.org” — back and forth with the waiting notices and a blank screen. I killed that browser window after about four minutes of that.
Not sure if this info means anything, but providing it in case it has any diagnostic value.
Forum: Plugins
In reply to: WPbook: site not appearing properly in facebokThe primary domain outside of facebook is https://JewishJokes.org
(and JewishJoke.org is parked on that.)The canvas url in the facebook application settings is entered like this:
https://JewishJokes.org/The application is set to iframe (with no scroll-bars; but with auto-resize).
(BUT… the tab url section entry has “&fb_force_mode=fbml” in it. That’s what the WPbook instructions said to do, but does that conflict with the iframe designation earlier? Or is it correct that way?)
Forum: Fixing WordPress
In reply to: Unpublish all entries in a category?There are many reasons why someone would want to do this. For example: I bought a huge WP website, and want to re-mission it around just one of the categories (at a new domain name). I fugure on installing the whole DB in WP the new domain, and then deleting or unpublishing most of the categories.