Giter VIP home page Giter VIP logo

oik-plugins's Introduction

oik plugins server

banner

Description

oik-plugins server for FREE and Premium oik-plugins

New in v1.18.0

  • Added Blocks tab

Changes in v1.16.0

  • See change log

Changes in v1.15.9

  • See change log

Changes in v1.15.8

  • Display of the API ref tab depends on whether or not any files have been parsed for the plugin.

Changes in v1.15.7

  • Display of a tab on the oik-plugin details page is now dependent upon both the plugin type and the website content.

Changes in v1.15.5

  • Supports cloning of premium plugin version attached zip files

Changes in v1.15.4

  • Better support for sections based on plugin type and shortcode availability

Changes in v1.15.3

  • Implements filtering during cloning to ensure site specific information is not overridden

Changes in v1.15.2

  • Checks for potential validity of the Documentation home page field ( _oik_doc_home )

Changes in v1.15.1

  • [oikp_download] now works for the current oik_pluginversion

Changes in v1.15

The oik-plugin details are displayed in a set of tabs, similar to wordpress.org

  • Description - (default tab) - shows the content of the oik-plugin
  • FAQ - Accordion of oik-FAQs
  • Screenshots - nivo slide show of the screenshot-n. files
  • Changelog - table of oik-plugin versions
  • Shortcodes - list of shortcodes
  • API Ref - API Reference using [apiref] shortcode
  • Documentation - List of pages and posts related through the '_plugin_ref' field

The information displayed on the plugin update page now expands shortcodes.

Installation

  1. Upload the contents of the oik-plugins plugin to the `/wp-content/plugins/oik-plugins' directory
  2. Activate the oik-plugins plugin through the 'Plugins' menu in WordPress
  3. To support oik Premium plugins use oik options > Server settings to define a secure folder used to store uploaded zip files
  4. Also install and activate either oik-edd or oik-woo to allow the creation of API keys

Frequently Asked Questions

Where is the FAQ?

oik FAQ

Screenshots

  1. Fields for the oik-plugin custom post type
  2. Fields for the oik_pluginversion custom post type (prior to removal of "Requires" and "Tested to")
  3. Fields for a Premium oik-plugin showing the Purchasable product

Upgrade Notice

1.21.2

Upgrade for an improved plugin version template and support for PHP 8.1 and PHP 8.2

Changelog

1.21.2

  • Changed: Support PHP 8.1 and PHP 8.2 #25
  • Changed: Improve Plugin version template #26
  • Tested: With WordPress 6.4-RC1 and WordPress Multisite
  • Tested: With PHP 8.0, PHP 8.1 and PHP 8.2
  • Tested: With Gutenberg 16.8.1
  • Tested: With PHPUnit 9.6

Further reading

If you want to read more about the oik plugins then please visit the oik plugin "the oik plugin - for often included key-information"

oik-plugins's People

Contributors

bobbingwide avatar

Watchers

 avatar  avatar

oik-plugins's Issues

Co-requisite change for oik-clone issue 12

To support cloning of .zip files attached to oik_premiumversion posts types, oik-plugins needs to implement a filter hook for 'oik_clone_filter_media_file'. It will update the full file name, allowing oik-clone to locate and load the file to be passed to the target slave server.

See bobbingwide/oik-clone#12

Notices when displaying new oik-plugins post for envira-gallery-lite

Notice: Trying to get property 'data' of non-object in C:\apache\htdocs\wordpress\wp-content\plugins\oik-plugins\feed\oik-plugins-feed.php on line 605

Notice: Trying to get property 'user_url' of non-object in C:\apache\htdocs\wordpress\wp-content\plugins\oik-plugins\feed\oik-plugins-feed.php on line 605

Backtrace
0. bw_lazy_backtrace C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\bwtrace.php:108 0

  1. bw_backtrace C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php:285 0
  2. bw_trace_error_handler(8,Trying to get property 'data' of non-object,C:\apache\htdocs\wordpress\wp-content\plugins\oik-plugins\feed\oik-plugins-feed.php,605,array) C:\apache\htdocs\wordpress\wp-content\plugins\oik-plugins\feed\oik-plugins-feed.php:605 5
  3. bw_get_userdata(0,user_url,http://www.bobbingwidewebdesign.com/about/herb/) C:\apache\htdocs\wordpress\wp-content\plugins\oik-plugins\feed\oik-plugins-feed.php:625 3
  4. bw_get_author_name(object) C:\apache\htdocs\wordpress\wp-content\plugins\oik-bob-bing-wide\shortcodes\oik-plug.php:945 1
  5. bw_get_plugin_info_as_xml(envira-gallery-lite,object) C:\apache\htdocs\wordpress\wp-content\plugins\oik-bob-bing-wide\shortcodes\oik-plug.php:902 2
  6. bw_get_plugin_info(envira-gallery-lite,) C:\apache\htdocs\wordpress\wp-content\plugins\oik-bob-bing-wide\shortcodes\oik-plug.php:55 2
  7. bw_plug(array,,bw_plug) C:\apache\htdocs\wordpress\wp-content\plugins\oik\oik-add-shortcodes.php:207 3
  8. bw_shortcode_event(array,,bw_plug) C:\apache\htdocs\wp-a2z\wp-includes\shortcodes.php:325 3
  9. do_shortcode_tag(array) C:\apache\htdocs\wordpress\wp-content\plugins\oik-css\includes\shortcodes-earlier.php:100 1
  10. do_shortcode_tag_earlier(array) C:\apache\htdocs\wordpress\wp-content\plugins\oik-css\includes\shortcodes-earlier.php:0 1
  11. preg_replace_callback(/[([?)(wp_caption|caption|gallery|playlist|audio|video|embed|wpseo_breadcrumb|post_date|post_time|post_modified_date|post_modified_time|post_author|post_author_link|post_author_posts_link|post_comments|post_tags|post_categories|post_terms|post_edit|footer_copyright|footer_childtheme_link|footer_genesis_link|footer_studiopress_link|footer_wordpress_link|footer_site_title|footer_home_link|footer_loginout|envira-gallery|bw_field|bw_fields|bw_new|bw_related|bw_group|oikp_download|oikth_download|bw_terms|oik|loik|OIK|lbw|bw_page|bw_post|bw_plug|bp|lwp|lbp|wpms|lwpms|drupal|ldrupal|artisteer|lartisteer|wp|bw_csv|bw_search|bw_dash|bw_action|bw_rpt|bw_graphviz|bw_crumbs|bw_option|bw_text|github|bw_archive|cloned|clone|bw_css|bw_geshi|bw_background|bw_autop|bw_blog|bw_blogs|bw_rwd|bw_codes|bw_code|bw_wtf|bw_directions|bw|bw_address|bw_mailto|bw_email|bw_geo|bw_telephone|bw_fax|bw_mobile|bw_skype|bw_tel|bw_mob|bw_wpadmin|bw_domain|bw_show_googlemap|bw_contact|bw_company|bw_business|bw_formal|bw_slogan|bw_alt_slogan|bw_admin|bw_twitter|bw_facebook|bw_linkedin|bw_youtube|bw_flickr|bw_picasa|bw_googleplus|bw_google_plus|bw_google-plus|bw_google|bw_instagram|bw_pinterest|bw_follow_me|clear|bw_logo|bw_qrcode|div|sdiv|ediv|sediv|bw_emergency|bw_abbr|bw_acronym|bw_blockquote|bw_cite|bw_copyright|stag|etag|bw_tree|bw_posts|bw_pages|bw_list|bw_bookmarks|bw_attachments|bw_pdf|bw_images|bw_portfolio|bw_thumbs|bw_button|bw_contact_button|bw_block|bw_eblock|paypal|ngslideshow|gpslides|bw_power|bw_editcss|bw_table|bw_parent|bw_iframe|bw_jq|bw_accordion|bw_tabs|bw_login|bw_loginout|bw_register|bw_link|bw_contact_form|bw_countdown|bw_cycle|bw_count|bw_navi|bw_api|api|apis|hooks|codes|blocks|file|files|classes|hook|md|parsed_source|contents|guts|content|bwtrace)(?![\w-])([^\]\/](?:/(?!])[^\]\/])?)(?:(/)]|](?:([^\[]+(?:[(?!/\2])[^\[]+)+)[/\2])?)(]?)/s,do_shortcode_tag_earlier,

Envira Gallery is the best responsive WordPress gallery plugin. This is the Lite version.

Prevent duplicate plugins with the same slug

In oik-plugins.co.uk we have managed to create two plugins with the same slug, but different titles. This led to a confusing display of versions to download.

Explanation

The problem was probably created using oik-clone, where the plugin's title was changed between cloning.

Workaround

Delete the duplicate oik-plugin entry, and adjust references on plugin versions.

Add plugin dependency field for oik-plugins CPT

Requirement

  • To be able to record a plugin's dependency on other plugins
  • These are the mandatory dependencies that must be satisfied for the plugin to operate correctly.
  • It's not for optional extras / recommended plugins

Proposed solution

  • Add a noderef field called _oikp_dependency which allows multiple selection of oik-plugins upon which the current oik-plugins post "Depends on".

For more information see bobbingwide/oik-loader#2

Insecure file download links do not work using Chrome

I've recently noticed that _oikp_download_wordpressversion()'s use of http: gives a 301 but the file is not downloaded even though there's a 200 following the redirect.

In my local development environment ( s.b/oikcom ) I noticed that the download link for plugins from wordpress.org was using http: rather than https: protocol. This causes Chrome to request the file using https: - which gets a 301 - followed by the 200 - but the download dialog is not opened.

On the live sites with WordPress 5.7 ( oik-plugins.com ) when you inspect the link you see it's already got the https: and the download works.

On sites prior to 5.7 ( oik-plugins.co.uk ) the same things happen as in my local development.

image

image

The problem occurs with Chrome Version 89.0.4389.90 (Official Build) (64-bit)
It doesn't occur with Firefox.

Need to add shortcodes regardless in oikp_the_post_oik_plugins()

Can't remember why exactly but I felt I needed to move the do_action( "oik_add_shortcodes") from the end of the oikp_the_post_oik_plugins() function to the front.

This might have been when the logic detected whether or not to use the [apiref] shortcode.

Improve support for basic plugin documentation

On some sites I want to use the oik-plugin post type but don't want the API reference, shortcodes, changelog etc. For oik-themes I added a new theme type ( 7 => other theme ) but for oik-plugins it would probably be better to store post meta information indicating which 'tabs' or tab set should be displayed. For some plugins we really only need to know of their existence... so we can refer to them.

Save and display the number of blocks delivered for oik_plugins

Add a post meta field called Blocks delivered ( _oikp_block_count ) which displays the latest figure for blocks documented for each plugin.
Consider a virtual field of blocks catalogued which shows how many of the blocks delivered by the plugin have been catalogued.

Support for WordPress 5.0 and the new block editor

Since early 2017 a new Block editor has been under development. Code named Gutenberg this new editor is being developed as a feature plugin. It is expected to be merged into core for WordPress 5.0.

Over time, more content will be created using the Block editor than the Classic editor.
The new solution needs to be backward compatible with our existing solution, so there shouldn’t be a need to change anything and it should still work. But that has not yet proven to be the case.
Also, over time, more content will be created/edited using the Block editor than the Classic editor.
We need to embrace the improvements.

So, rather than being compatible with Gutenberg we need to be Gutenberg aware.

Support PHP 7.1

When run under PHP 7.1 visiting wp-admin/edit.php?post_type=oik_pluginversion
leads to a blank area where the list of plugin versions should be.
It works in PHP 7.0

The problem applies to both oik_pluginversions and oik_premiumversions

Actual output

Uncaught ArgumentCountError: 
Too few arguments to function oik_pluginversion_columns(), 
1 passed in wp-includes\class-wp-hook.php on line 298 and exactly 2 expected in 
wp-content\plugins\oik-plugins\oik-plugins.php:397
Stack trace:
#0 wp-includes\class-wp-hook.php(298): oik_pluginversion_columns(Array)
#1 wp-includes\plugin.php(203): WP_Hook->apply_filters(Array, Array)
#2 wp-admin\includes\screen.php(39): apply_filters('manage_edit-oik...', Array)
#3 wp-admin\includes\class-wp-screen.php(912): get_column_headers(Object(WP_Screen))
#4 wp-admin\includes\class-wp-screen.php(877): WP_Screen->show_screen_options()
#5 wp-admin\admin-header.php(233): WP_Screen->render_screen_meta()
#6 wp-admin\edit.php(303): require_once('C:\\apache\\htdoc...')
#7 {main}

Cater for Download failed. Service Unavailable

When updates are available oik-plugins will attempt to perform update requests.
Sometimes, and I'm not sure of the exact conditions, when the download is being requested from itself we get the following messages.

Downloading update from http://www.oik-plugins.com/plugins/download?plugin=oik-batch&version=0.8.7&id=18705&action=update…
An error occurred while updating oik-batch: Download failed. Service Unavailable

It would be nice it we could:

  • Find out why this is happening
  • Find a fix or a workaround

Add block templates for oik-plugins and oik_pluginversion CPTs

For blocks.wp-a2z.org I need to be able to create new oik-plugins quite quickly. WordPress now supports a 'template' parameter which enables you define the initial structure of the content to be created.

Requirement

  • Create a template for the oik-plugins CPT
  • Create a template for the oik_pluginversion CPT

Proposed solution

  • Attempt to create posts that require the minimum amount of fiddling.

Known limitations

  • Some blocks do no behave well with missing attributes.
  • I don't know how to pass parameters to template creation.

Documentation may be missing if content has been improperly cloned

Problem

On two clones of the content for the oik-clone plugin ( oik-plugins.com and oik-plugins.uk) the Documentation tab did not display any content. There was neither a tree of pages from the "Documentation home page" nor a list of posts and pages related by the plugin ref.

Explanation

When switching to a new Genesis based theme a new field ( _oik_doc_home - noderef type field ) was added in the development environment ( local: qw/oikcom ) and the first staging site ( oik-plugins.co.uk ). When the content was cloned by the oik-clone plugin this post meta data was cloned to the servers. If the documentation home page had not been cloned the source post ID would not be mapped to the correct target page. This led to an empty documentation page

Proposed fix

The documentation home page is only used if the _oik_doc_home field is defined for the post.
If it's not defined then the posts and pages displayed on the documentation tab will be displayed using the bw_related shortcode method.

If it is defined and the _oik_doc_home post meta data points to a valid page then the bw_tree method is used, displaying a tree of pages which have this page as their ancestor.

Maintain a count of downloads from github

For each plugin version we record the number of downloads and the number of updates to this version. For plugins which are also available from github we would like to be able to retrieve and display this information as well.
This information may be summarised on the oik-plugins admin page and optionally displayed on the front end.

Support the sb-field-block

The https://github.com/bobbingwide/sb-field-block plugin is new block to display and enable updating of post meta data.
It will replace the Fields meta box and the [bw_field] / [bw_fields] shortcodes.

In order to support access to post meta fields a post type needs to be registered with post type supports custom-fields
and each field has to be defined as show-in-rest.

Themes that use oik-plugins will eventually switch to using the block rather than the shortcodes.
The first thing to do is to enable this capability.

See bobbingwide/sb-field-block#2

Compatibility with oik v3.2.1

In oik v3.2.1 some .inc files have been renamed to .php files. The .inc files have been deprecated. Notices produced from the deprecated files can cause problems with plugin update checking.

The code should be updated to work with oik v3.2.1.
The dependency checking should now be on oik v3.2.1 and oik-fields v1.50.0

Correct oikp_force_download for Windows environments

Overview

When attempting to update a local copy of a site direct from oik-plugins.com and/or oik-plugins.co.uk I was getting messages that the archive had an invalid structure.

Downloading update from https://www.oik-plugins.com/plugins/download?plugin=oik-bob-bing-wide-more-lazy-smart-shortcodes&version=1.30.8&id=29396&action=update…

Unpacking the update…

The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Invalid archive structure

Further investigation indicated that the temporary file downloaded to C:\Windows\Temp contained a number of unexpected bytes. While 7-zip was able to unpack the file neither of the methods used by WordPress worked.

Downloads from wordpress.org were fine.
Also, downloads created when using the URL were also as expected.

oik-plugins uses oikp_force_download() which was based on some EDD code, a long time ago. See edd_get_file_ctype().

I did a Google search for header( 'Content-type: application/force-download' ); and found

https://stackoverflow.com/questions/10615797/utility-of-http-header-content-type-application-force-download-for-mobile

Having changed the code to be very similar to the most accepted answer - changing from application/force-download to application/zip - and adding all the other bits, which are also suggested on the PHP.net site. i.e.

header('Content-Description: File Transfer');
header('Content-Type: application/zip');
//header( 'Content-type: application/force-download' );  
 header( "Content-Disposition: attachment; filename=\"$filename\"" );  
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize( $file ) );

the downloaded file no longer contains the unexpected characters.

Proposed solution

  • Change oikp_force_download to ensure that the .zip files are downloaded correctly.
  • Also, to support testing in a local Windows server, change the download URL produced in response to the original request to use the same scheme at that request. This is to overcome issues with SSL verification. So, for a local Windows install the server is set to http://qw/oikcom ( for example ).
  • cater for the first download of a plugin version - where $count is not yet numeric.

Extend _oikp_download to support satellite sites

Background

Bobbingwidewebdesign.com is undergoing a makeover, with existing content that was created as pages being converted to posts and new content being created for the referenced plugins and themes. The [bw_plug] shortcode has been changed to detect the locally defined plugin. We now need a method to link to the original source of the plugin. A QAD proposal is to extend _oikp_download to cater for plugins which don't have any related plugin versions. The theory being that these are satellite definitions.

Requirements

  • create download links for plugins that are hosted elsewhere
  • use optional fields for those situations where the link cannot be determined automatically.
  • provide a read more link and live demo link as appropriate

Proposed solution

  • change _oikp_download()
  • provide links which open the page rather than perform a download - we don't know what version is required
  • No longer display "Purchasable product: FREE" - add '#theme_null' => false to field registration
  • Add _oikp_uri field to override automatic setting based on plugin_type - #theme => false

file_get_contents(): SSL operation failed with code 1.

While attempting to test plugin upgrade logic locally with https I continue to be thwarted by SSL certification problems. This latest was produced after having overcome cURL error 60 - see bobbingwide/oik#77

Expected output

In response to the following request

https://qw/oikcom/plugins/download/?plugin=foobar-least-amazing-plugin-world&version=1.0&id=11184&action=download

we would expect the file to be downloaded from
https://qw/oikcom/wp-content/uploads/2014/04/foobar-v1.0.zip

Actual output

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
oik-plugins\feed\oik-plugins-feed.php on line 147

Warning: file_get_contents(): Failed to enable crypto in oik-plugins\feed\oik-plugins-feed.php on line 147

Warning: file_get_contents(https://qw/oikcom/wp-content/uploads/2014/04/foobar-v1.0.zip): failed to open stream: operation failed in oik-plugins\feed\oik-plugins-feed.php on line 147

Explanation

There is no problem accessing the URL from the browser.
As we can see, the problem occurs in the PHP server code calling file_get_contents().
Changing the logic to use $upload_dir['basedir'] rather than $upload_dir['baseurl'] will resolve the problem.

Support different modes of display on the oik-plugins main page

oik-plugins supports different plugin types.
Currently the tabs on the oik-plugins display are: Description, FAQ, Screenshots, Changelog, Shortcodes, API Ref and Documentation.

For certain types we only want to display the Description, Shortcodes and API reference.
And for certain websites, such as WooCommerce.WP-a2z.org it makes more sense
to display the sections of the API reference as separate tabs:
APIs, Classes, Files and Hooks

Proposed solution

  • Filter the tabs depending on the plugin type, removing unwanted tabs for plugin types: None, WordPress and Other premium plugin.
  • Provide a checkbox option use [apiref] shortcode. When checked the API Ref will be displayed as currently using the shortcode (which is a DIY shortcode). Otherwise it will use tabs which map to shortcodes; [apis], [classes], [files] and [hooks]

Note: These shortcodes are provided by the oik-shortcodes plugin. http://github.com/bobbingwide/oik-shortcodes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.