WordPress.org

Ready to get started?Download WordPress

Forums

Podpress won't work on single posts. (39 posts)

  1. johngorenfeld
    Member
    Posted 3 years ago #

    I've installed Podpress and it works great--except on single post views. Instead of the Flash player, I get the [display_podcast] code, not replaced as it should.

    Any ideas for how to work around this? Maybe the answer is to auto-insert the Podpress code at the beginning somehow, without having to type [display_podcast]? If so how?

    Any help much appreciated.

  2. ntm
    Member
    Posted 3 years ago #

    There is an option at the general settings page of podPress which you can use to display the podPress row above a post content.

  3. ntm
    Member
    Posted 3 years ago #

    I have tested this now in my demo blog and I can say that this problem happens not everywhere. The player appears at the position in the post where I have inserted the [display_podcast] short code - on the main blog page as well as in the single post view.

    So it is eventually a problem which occurs only with certain settings combination. Could you tell me your Post Content settings from the general settings page?

    It could be another plugin which is also adding something to the post content, too. Although ... If it is another plugin, it is interesting that the problems seems to be only in the single post view.
    Did you have the possibility to deactivate such plugins temporarily to find out if there is an interference?

    Regards,
    Tim

  4. ntm
    Member
    Posted 3 years ago #

    Which version of podPress do you use? 8.8.5 RC?

  5. johngorenfeld
    Member
    Posted 3 years ago #

    Thanks for the help. I hope this post shows up, by the way--I keep receiving error messages from WordPress.org telling me the topic has been "closed."

    I'm using WordPress 3.0 with the Thesis theme, which perhaps is the cause of the problem. I'm using podPress 8.8.5 and have tried the latest stable version, the experimental and the development versions, with the same result.

    About the General Options choice that inserts the file above the post: I tried this last night after posting this question. What happened was similar. The main index page showed the Flash player, but the single post view showed nothing.

  6. johngorenfeld
    Member
    Posted 3 years ago #

    p.s. I've tried deactivating other plugins to see if there is a conflict, but no luck.

  7. johngorenfeld
    Member
    Posted 3 years ago #

    Location: Start
    Image: Button
    Player: Enabled
    Download: Enabled
    Show Download Text: Enabled
    Show Download Stats: Disabled
    Show Duration: Enabled
    Before <!-- More --> Tag: Yes

  8. ntm
    Member
    Posted 3 years ago #

    John, as you can see in this test post, the problem you have described above exists not in my demo blog. That leads me to the conclusion that there are certain circumstances in your blog which are causing this problem.
    If we could find the cause and if it is somewhere in podPress then I could write a patch and fix it.

    Please, tell me your Post Content settings from the general settings page of podPress.

    Location: Start | End ?
    Image: Button | Icon | None ?
    Player: Enabled | Inline only | Popup only | Disabled ?
    Download: Enabled | Disabled ?
    Show Download Text: Enabled | Disabled ?
    Show Download Stats: Enabled | Disabled ?
    Show Duration: Enabled | Disabled ?
    Before <!- More -> tag: Yes | No ?

    Can you tell me if there are Javascript errors during the loding process of the single post view? (For instance the Firefox browser has something in the menus that is called error console. Open it, clear the old messages if there some, then reload the single view of a post and it will show you eventually error messages. Other browsers do have something comparable.)

    p.s.: I have nothing to do with status of this thread and I don't know why you are getting these "closed"-messages.

  9. johngorenfeld
    Member
    Posted 3 years ago #

    Thanks, I really appreciate it and didn't mean to blame you for the thread status--it's just that WordPress.org was behaving oddly.

    OK, so the General settings are in my previous post. I checked the Error Console and I'm getting

    "Unknown property 'transition.' Declaration dropped."

    "Unknown property '-moz-opacity.' Declaration dropped."

    But these are just validation, right? Here's the problematic page and the main page where it works right:

    http://peterbcollins.com/2010/07/28/shahid-buttar-fix-patriot-act-dahr-jamail-unembedded-on-the-bp-gulf/

    http://www.peterbcollins.com

    http://peterbcollins.com/2010/07/28/shahid-buttar-fix-patriot-act-dahr-jamail-unembedded-on-the-bp-gulf/

  10. ntm
    Member
    Posted 3 years ago #

    Have you written the post with your Post Content settings before or after my last post?

    I have discovered it just now. I would say it was not there some hours ago.

    These settings seem not to be the cause for the problem.

    But thank you for the link to your page!
    There is on big difference between the appearance of your posts at your main blog page and the single post view pages: at the end of the single post views (at least of the last posts 4-5 posts) is a YouTube video which is not visible at the main blog page.
    This YouTube video is probably inserted by plugin. Am I right?
    If it is inserted by plugin then please, make a short test, deactivate it temporarily and look if [display_podcast] short code is going to be replaced correctly. What is the name of this other plugin?
    If it is not inserted by plugin then how you insert these videos?

  11. johngorenfeld
    Member
    Posted 3 years ago #

    Hi ntm,

    I wrote the post a while back. But even after I wrote it, WordPress.org was claiming that you had the most recent post. So I think there might be a bug where it's not showing up for you.

    The YouTube video is something I added last night at the client's request. It's not part of the content logic. Instead it is just a static insert on the index view. (In Thesis, changes to the theme are done using "hooks" at certain entry points in the code.) Anyway, the YouTube video isn't the cause of the Podpress issue, which predates it.

    Thanks for continuing to look at this.

  12. ntm
    Member
    Posted 3 years ago #

    Hm, okay if the problem was there before you have added the video then the way you are adding the video is not the cause.

    I have tried to test a little bit with the Thesis Theme but it seems that it is only available if you pay for it.
    I have searched with Google for the [display_podcast] short code and "diythemes" and I found several sites with this theme and the [display_podcast] code somewhere in the content of the posts.
    I found one site where the podPress plugin is active and has this problem, too.

    It has eventually something to do with the theme.
    Please, use the theme preview at the Appearance > Themes page in this Peter Collins blog and check if the player appears in the preview of the single post view of the default theme (Kubrick or Twenty Ten).

  13. johngorenfeld
    Member
    Posted 3 years ago #

    Good idea, I'm going to try that.

  14. johngorenfeld
    Member
    Posted 3 years ago #

    Yup. It's Thesis and it's breaking it.

  15. ntm
    Member
    Posted 3 years ago #

    Can you tell what Thesis does different than the other theme(s)?

    podPress uses the action hook "the_content" to insert the necessary lines of code into the posts (podpress.php line 841 and the function is in the file podpress_class.php line 763)

    Furthermore it uses the filters "get_the_excerpt" and "the_excerpt" to do the same with excerpts. But I found out that there is probably a bug in podPress. In the lines 842 and 843 of the podpress.php these filter hooks are called as they would be action hooks (e.g. add_action('the_excerpt', array(&$podPress, 'insert_the_excerptplayer')); instead of add_filter('the_excerpt', array(&$podPress, 'insert_the_excerptplayer')); ).

    It seems to me that the problem could be somehow connected with what's happening in the functions insert_content(), insert_the_excerptplayer() or insert_the_excerpt().

  16. johngorenfeld
    Member
    Posted 3 years ago #

    I don't know it well enough to say. It automates a lot of stuff and does not use the typical page.php, sidebar.php, etc. layout.

    So maybe I'll try to slip that other language into the podpress.php file and that might fix it?

  17. ntm
    Member
    Posted 3 years ago #

    Does Thesis use the function the_content()? Or can you tell how the post content is loaded in the single post view? Is there no single.php? Which looks at least a little bit like the single.php of the Twenty Ten theme? (http://core.trac.wordpress.org/browser/tags/3.0.1/wp-content/themes/twentyten/single.php - This file contains in line 30 a call of the function the_content(). This is a function of the WordPress core and it includes a hook called "the_content". podPress uses this hook to get the post content and to replace the [display_podcast] placeholder with some lines of code during a page is loading.)

    Yes, you could try to replace the word "action" with "filter" in the lines 842 and 843 of the podpress.php. I will fix this in the next podPress version but until than:
    old:

    add_action('get_the_excerpt', array(&$podPress, 'insert_the_excerpt'), 1);
    add_action('the_excerpt', array(&$podPress, 'insert_the_excerptplayer'));

    new:

    add_filter('get_the_excerpt', array(&$podPress, 'insert_the_excerpt'), 1);
    add_filter('the_excerpt', array(&$podPress, 'insert_the_excerptplayer'));

    This is a repairing something. But maybe not the problem with the single post view.

  18. ntm
    Member
    Posted 3 years ago #

    Please, change also line 841 in the way:
    old:

    add_action('the_content', array(&$podPress, 'insert_content'));

    new:

    add_filter('the_content', array(&$podPress, 'insert_content'));

    That could solve the problem eventually.

  19. johngorenfeld
    Member
    Posted 3 years ago #

    Thanks sir--will try that right away.

  20. johngorenfeld
    Member
    Posted 3 years ago #

    Still seems to be broken after the change. I wonder if I should just add some PHP code to the Single.php that displays a Flash player whenever there is an MP3 file associated with the post.

    I am not sure how the Thesis content hook works for single pages, but will look into it...

  21. ntm
    Member
    Posted 3 years ago #

    Today, I found the http://thesishooks.com site and the manual of Thesis http://diythemes.com/thesis/rtfm/customizing-with-hooks/

    Maybe you could insert some lines like these:

    if (is_single()) {
    	add_action('thesis_hook_before_post', array(&$podPress, 'insert_content'));
    }

    into the podpress.php e.g. in line 844.

    In some examples for the usage of the Thesis hooks it is suggested that you should use remove_action (http://codex.wordpress.org/Function_Reference/remove_action) to remove other actions. It exists also the function remove_filter.
    Maybe you can find remove_action('the_content') or remove_filter('the_content') (maybe with double quotation marks) somewhere in the php files of the theme. That would eventually explain the problems, too.

  22. johngorenfeld
    Member
    Posted 3 years ago #

    Searching the Thesis theme PHP files..still trying to find anything like that.

  23. johngorenfeld
    Member
    Posted 3 years ago #

    Wonder if you've had any luck finding something like that in the Thesis code that I could disable? I'll check the Thesis forums too, to see if they have an answer.

  24. rosspruden
    Member
    Posted 3 years ago #

    I am having exactly the same problem. Good to know I'm not alone!

    Awaiting any/all updates...

  25. rosspruden
    Member
    Posted 3 years ago #

    This Thesis forum thread suggests using Podcasting rather than Podpress, and adds that it detects everything from podpress:

    http://diythemes.com/forums/showthread.php?29747-podPress-audio-link-not-appearing-on-post-pages&highlight=podpress

    Not an ideal solution if you're set on Podpress, but apparently, it does work with Thesis. :/

  26. raymer
    Member
    Posted 3 years ago #

    @rosspruden - Do you have to be a paying customer to subscribe to that forum? The link requires registration.

    By the way, podpress was dead as far as development for a couple years which is why the Podcasting plugin was created in the first place. Now that development of podpress is continuing it might be a good idea to ask the Thesis devs to install the latest podpress (8.8.6 beta 4) and see if they can troubleshoot. I'm sure Tim would be open to fixing the problem if they gave him the theme to play with. Its kind of tough to troubleshoot when he doesn't even have the theme...

    Just a thought.

  27. ntm
    Member
    Posted 3 years ago #

    I have done some further reading and have new nice idea:

    Your thesis theme has probably a file which is called /thesis/custom/custom_functions.php. (The folder name is maybe different.)
    Insert the following code snippet into this file:

    add_action('thesis_hook_before_post', 'podpress_thesis_action');
    function podpress_thesis_action($co) {
    	if (is_single()) {
    		GLOBAL $podPress, $post;
    		unset($podPress->tempContentAddedTo[$post->ID]);
    		echo $podPress->insert_content($co);
    	}
    }

    The code of this example would add the podPress player and the download links above the post content as the hook name suggests. is_single() limits this action to the single post views.

    If you want to position the podPress content below the post then use e.g. the thesis_hook_after_post hook. Here is a list of all Thesis hooks.

    You should set the podPress option Location at the general settings page of podPress to "End" and don't use the [display_podcast] token in the post content because this workaround does not filter the content. It adds only the player at a certain player before or after the post.

  28. rosspruden
    Member
    Posted 3 years ago #

    @raymer Yes, you do need to be a registered Thesis owner. Sorry. :/

    Didn't know that about the Podcasting plugin. Interesting... Thanks! I may have to switch over, then.

  29. rosspruden
    Member
    Posted 3 years ago #

    FYI, I tried the following instructions (lifted from the Thesis forums) to install the Podcasting plugin and it worked like a gem:

    I had the same issue. I installed the Podcasting plugin (named Podcasting), activated it and then deactivated Podpress. Podcasting detected and imported the data from Podpress and I only had to put in the Podcasting specific code to get the player to appear on both the home page and the individual blog post page.

    You have to click "Send to Editor" on the Podcasting widget on the blog edit screen to get the code into the post (this was non obvious to me). Once you know the format (which is not documented in the interface) you could do it by hand.

  30. ntm
    Member
    Posted 3 years ago #

    @rosspruden and @johngorenfeld: Has one of you tried the code snippet I have posted above?

    The single post view of Peter Collins blog shows now the podPress elements.
    @johngorenfeld: Did you use the code snippet or an other solution. Would you tell us how you did it?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags