WordPress.org

Ready to get started?Download WordPress

Forums

podPress
PodPress - Remove Premium Options? (12 posts)

  1. Timothy Bowers
    WPMU DEV Support Staff
    Posted 3 years ago #

    Is there any quick way to remove the premium options for this plugin so that when its in a multiuser install there isn't this option?

    Specifically removing the accordion in the settings and the accordion tab in widget for premium.

  2. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    No, I don't think so. It would be easy to change the user level which is required to access the podPress settings pages. It is also easy to change the user level which is required to add podcast episodes.
    So it is possible to change the required level for the all settings pages from the capability 'manage_categories' to var $requiredAdminRights = 'manage_network'; -> a Super Admin capability. (You can change this at the beginning of the podress_class.php file.)
    But this would hide the complete settings pages.

    What are you trying to achieve?
    Do you like deny sub blog admins adding additional Feeds to their blogs? Or do you like to prevent that they add premium Feeds to their blogs? Why do you want to hide the complete podPress Feeds accordion and why the accordion of the Feed Buttons widget?
    (BTW the feed buttons widget shows only options for the additional podPress Feeds if there are such Feeds active.)

    I have not thought about implementing a possibility for Super Admins to manage the permissions for the parts of the plugin. But it is an interessting idea.

    Regards,
    Tim

  3. Timothy Bowers
    WPMU DEV Support Staff
    Posted 3 years ago #

    Hi Tim, I'm Tim. :-)

    I'm trying to think how to translate what my mind is thinking. ha ha.

    Ok we have users who take blogs with us and they host their podcasts with us also. The premium feature is cool but I don't want to bloat the install by adding another plugin just for this feature.

    Another plugin means another reliance on different third party code, and more database entries to pull on page loads.

    So removing the premium option saves end users seeing it and then asking about it only to be told I won't install the extra plugin.

    I don't wish to hide the whole accordion, messing with the code I can easily do that. I just want to hide the premium ones (one in widget and one in setting page). I just wondered if there was some kind of quick way to turn off the premium options and settings at least in the code so none of it shows, I was looking around the code and couldn't see it but thought I would ask. :-)

    It pulls those options for the tab from the database doesn't it? which file inserts those options? I noticed in the podpress_admin_feed_class.php you pull those options as an array.

    Thanks for getting back to me so quickly. :-)

  4. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Thank you for your explanation! I think I understand you better now.

    I will add some if-statements around the options at the General Settings, Feed/iTunes Settings and Widgets page. So that these options are available for Super Admins in Multi Site blogs, for all other users in such a network only if a special option has not been deactivated by a Super Admin and in normal blogs for all who are allowed to manage_categories.

    I will probably implement these thing at the weekend and let you know, when the modification are in the Development Version and ready for a test.

  5. Timothy Bowers
    WPMU DEV Support Staff
    Posted 3 years ago #

    You are awesome, saves me a figuring it out. :-)

    Thanks!!

  6. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Now, the current Development Version contains a possibility to hide all premium feed options. But it is no option on one of the settings pages of podPress.

    You can find a new file in the podpress folder: podpress_config-sample.php. You can use it to define a constant which will switch off the premium feed options in all blogs and for all users.

    • Create a new folder in the plugins folder of your blog with the name podpress_options (e.g. /wp-content/plugins/podpress_options/).
    • Copy the podpress_config-sample.php file to this folder.
    • Rername the file to podpress_config.php.
    • Configure the settings in this file.

    While this constant PODPRESS_DEACTIVATE_PREMIUM is TRUE, it is also not possible to create a podPress Feed with the slug "premium". If such Feed already exists then it will be removed with the next update of the Feed settings.

    I would appreciate it if you could test this version and tell me you opinion about it.

    Regards,
    Tim

  7. Timothy Bowers
    WPMU DEV Support Staff
    Posted 3 years ago #

    I'll get this tested tomorrow.

    One question though.... What if a slug exists which was created either manually or by another plugin?

    Thanks again! :-)

  8. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    If an author has already create a custom feed with the slug "premium" via the podPress Feeds accordion then this feed gets removed during the update of the podPress Feed/iTunes settings of this particular blog.

    If the feed has been created with another plugin or another way then this constant will have no effect on that feed. It removes only certain podPress settings or prevents that podPress settings for a feed with such a slug getting stored in the db. So that podPress is not able to add a feed with such a slug. It will not remove Feeds created by other plugins.

  9. Timothy Bowers
    WPMU DEV Support Staff
    Posted 3 years ago #

    Feedback:

    Is there a reason this folder or a similar folder could not be placed in inside the plugin folder when this comes to final? (keeps the plugins directory tidy :-))

    Option to turn on premium is gone in settings. :-) (General Settings)

    The Premium feed accordion tabs in both the settings and widget still seem to appear though. (Feed/iTunes Settings and Widget) The check boxes for making the feed premium appear to have gone. :-)

  10. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    Is there a reason this folder or a similar folder could not be placed in inside the plugin folder

    Yes, an automatic plugin upgrade deletes all files in the plugins folder before the new files are getting unpacked. The config file would be lost and you would need to create/configure it every time again.

    The Premium feed accordion tabs in both the settings and widget still seem to appear though.

    Click on the Update settings button below the podPress Feeds accordion (while that constant is TRUE) and the premium tab should vanish. You could also clear the Feed Name field and update the settings. Once the tab on the Feed/iTunes Settings page is gone the tab at the widget settings page will be gone too.

  11. Timothy Bowers
    WPMU DEV Support Staff
    Posted 3 years ago #

    Will this remain a hardcoded define or will it become a db option?

    Works now that I've clicked the update option.

    Thanks!! :-)

  12. ntm
    Member
    Plugin Author

    Posted 3 years ago #

    will it become a db option?

    Not in the next time. I'm aware that the current method is probably not very comfortable and maybe I will change that. But in the moment are other things like a file picker for the editor page, a solution for a problem with the old file selector, a possibility to enter URLs of alternative sources for a media file in regard to the new HTML5 <audio> (and <video>) elements and an overhaul of some static functions higher on my to-do list.

    But I can image a new settings page or section which allows to manage the permissions per blog by capabilities not only for the premium feed options.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic