webberzone / contextual-related-posts Goto Github PK
View Code? Open in Web Editor NEWContextual Related Posts WordPress plugin
Home Page: https://webberzone.com/plugins/contextual-related-posts/
Contextual Related Posts WordPress plugin
Home Page: https://webberzone.com/plugins/contextual-related-posts/
v2.2.0 introduced a bug where the excerpt shortening was no longer working correctly due to an incorrect variable being passed.
So I just moved to Ubuntu 16.04 on AWS (from Linode), and I noticed that many posts showed the same exact content in the related posts area. It's basically the same few recommendations over and over, where before it was doing BEAUTIFUL recommendations that were different for each page.
I have the option enabled to use the content as part of the index, and when I disable that it works, but the matches are far lower quality.
Any ideas what would cause the inability to create a good index off of post content? Have you seen this issue before?
Examples of pages on the site are:
Notice that they all have My Vim Primer, InfoSec Career Post, InfoSec Interview Questions, etc. as results, where in the past they were perfectly customized based on the content.
I'll send you $50 if you can fix this for me today.
Potential incompatibility with WPTouch where plugin thumbnail sizes are not correctly displayed.
Reference: https://wordpress.org/support/topic/thumbnail-size-changes-back-to-custom?replies=10
Let a person choose after how many paragraphs to insert the related posts automatically.
Reference code: https://github.com/WebberZone/contextual-related-posts/pull/1/files
As explained here: https://wordpress.org/support/topic/isuue-with-profile-builder?replies=2
Manage fields gives this error:
Warning: Missing argument 2 for crp_add_meta_box() in /root/wp-content/plugins/contextual-related-posts/admin/admin.php on line 415
Add two new options in the meta box on Edit posts / post types page to:
a) Add a set of post IDs that will be used first before related posts
b) Add a set of post IDs that will always be excluded from the related posts
This will allow the "Manual posts" option
If there are not enough posts found, then complete the list of related posts by selecting random posts.
Create a new table with the necessary indexes instead of using the default wp_posts table. This will allow the wp_posts table to remain untouched.
As reported in this WordPress thread: https://wordpress.org/support/topic/thumbnail-not-square-and-not-centered-vertically?replies=14#post-6754677
Appears that when pulling the first image URL, the plugin doesn't pick the correctly resized thumbnail.
Potential fix would be to guess the attachment ID from the URL and then find the thumbnail.
Sample code to get Attachment ID from the URL:
http://philipnewcomer.net/2012/11/get-the-attachment-id-from-an-image-url-in-wordpress/
Text colour in thumbnails isn't white. Fix here:
https://wordpress.org/support/topic/text-color-in-thumbnail?replies=7
If you press the Recreate Index button, an error occurs.
Plugin is not working in the front-end.
Message text on pluginpage (/wp-admin/options-general.php?page=crp_options):
Fatal error: Call to undefined function crp_single_activate() in /usr/local/www/apache22/data/wp-content/plugins/contextual-related-posts/admin/admin.php on line 229
Currently when saving default styles, it doesn't clearly illustrate that certain options like thumbnail width / height, author and excerpt settings, etc.
This is visible under custom styles but not elsewhere.
Propose to add a notice when saving options in case default styles are enabled.
Option to:
a) Turn the metabox off
b) Limit the metabox display only to admins
Cannot switch to "No style". Rounded thumbnails gets automatically selected.
Replace the Other archives option into futher options. For reference, these are the various options that set is_archive
true.
Under Post thumbnail options > Style attributes / Width and Height HTML attributes add a new option:
Don't add width and height attributes (sizes handled by custom css)
Add the same settings to the widget so a user can pick this on a widget by widget basis
In line with the new 4.3 change:
https://make.wordpress.org/plugins/2015/08/03/4-3-change-to-plugin-dashboard-pages/
Currently, the Custom styles box includes the default styles as the only option.
Add an option to optionally choose a text only style
Happens particularly with big blogs where php times out when trying to create the index. Suggest add an extra check which will see if more than 5000 (to be verified) posts and then not create the fulltext index on activation.
Add a new setting to let a person choose between InnoDB vs. myISAM for the wp_posts table.
Link attributes should be an array that can be filtered. This allows a developer to:
a) Change Target attribute
b) Change Nofollow attribute
c) Add more attributes
Add an option to use the new Site Icon feature of WordPress 4.3 before using the Default Thumbnail option.
Details on implementation are at: https://make.wordpress.org/core/2015/07/27/site-icon/
Currently the setting only applies to the content filter and doesn't apply to widgets. Add a new option to make it apply to widgets as well.
Add a new option to display the related posts at random.
Suggested use of PHP's shuffle function
Reference: Shuffle an object
Let non-admins see the metabox but only options that are safe for them to edit.
Improved support for WPML, particularly for registered strings
Resources:
https://wpml.org/documentation/support/debugging-theme-compatibility/
https://wpml.org/documentation/support/translation-for-texts-by-other-plugins-and-themes/
https://wpml.org/wpml-hook/wpml_register_string_for_translation/
https://wpml.org/wpml-hook/wpml_translate_single_string/
Evaluate need to use spaces in the logic as it doesn't work with languages like Japanese
Consider using mb_strimwidth() however, English words are truncated.
Some food for thought here: http://www.internoetics.com/2016/02/01/shorten-strings-whole-word-character-count-php/
Sometimes the default image doesn't get selected correct during activation because the $crp_url variable is not declared.
Fix it by specifying the full URL under crp_default_options
Add a new option in the meta box to exclude the current post from related posts results. Ideal if you are sure you don't want a post to be included and avoid putting in an exclude ID every time in the settings page.
Using the same cache for https and http causes potential conflicts at times, especially when the SSL certificate is not validated.
Also, you don't want to show http links when a user is on an https page
Add a new option under List Tuning options to limit the related posts to the same post type.
strict_limit option is currently false. This isn't good for user experience because when setting a specific limit for the API, the user / developer would expect the exact number of posts to be pulled. Instead the plugin returns 3x posts where available.
Add a notice in case the FULLTEXT index doesn't exist and offer to create it.
Add a new option to the metabox to turn off the display of related posts
First of all: Thanks for the great plugin! :)
We've been experiencing a maddening issue, though: Every now and then crp would output the wrong number of posts and would also ignore images. Clearing the cache usually resolved the issue - until it appeared on a different post again.
I believe the root cause of this is that the caching mechanism does not differentiate between web and feed view. We had different settings for each. Now that we made sure that the settings are identical, the issue has not appeared again (yet).
If possible hide widget title if no related posts are present.
Add a new option to the widget to restrict posts to one or more specfic post types
Delete this option within media.php on init
update_option( 'ald_crp_settings', $crp_settings );
As mentioned here: https://wordpress.org/support/topic/cannot-modify-image-thumbnail-sizes-bug-with-custom-size
You should be able to reproduce at least the second error by
- choosing a custom thumb size
- going back to a regular / standard size from the radio choices
I also tried to clear the custom width & height boxes completely but upon saving they are showing "0px" and thus my images are being displayed as if I am using the custom size (although I am not).
The code that is being generated:
<img src="/cs/wp-content/uploads/2011/02/Fotolia_22270703_XS-150x150.jpg" alt="some-alt-text" title="some-title" style="max-width:0px;max-height:0px;" class="crp_thumb crp_firstchild">
New option to exclude the display of the plugin on select category and/or tags.
Allow passing an offset argument to display a different set of posts
Implementation potentially similar to how WordPress does it
The exclude categories options doesn't always work. Sometimes even with the category added, the plugin continues to display the related posts in that category
The related posts' thumbnails in the attachment pages seem not correctly generated.
One example is at: http://www.fclose.com/3118/windows-7-mak-activation/win-7-activation/
All 3 related posts have the same thumbnails (the attachment) while they should not.
I'm trying to use soft crop, but whether or not I tick the box "Crop mode", it neither hard nor soft crops but simply "crushes" or "stretches" the images for the thumbnails, so they look funny if the had a really wide format before. Latest WP with these settings: http://i.imgur.com/Da5fDlU.png and this is the result: http://i.imgur.com/dGd5Yzj.png (looks like this with both "Crop mode" ticked and unticked).
Hi,
First of all: thanks for writing the plugin!
I came across a bug in version 2.0.1 where the regex for the first post image is set too greedy. This results in the regex always returning the url of the last image of the post, instead of the first.
A working regex is (added 2 x '?'): /<img.+?src=[\'"]([^\'"]+)[\'"].*?>/i
The bug can be found in the file contextual-related-posts.php on line 1145.
As detailed here:
https://wordpress.org/support/topic/1-link-rather-than-2-thumbnail-text?replies=1
Will need to be tested to ensure that the default styles do not break.
Recreate Index fails when a blog has too many posts due to PHP time outs. Provide a user with a list of copy-pasteable queries they can run in phpMyAdmin or Adminer
Optionally prompt to install Adminer WordPress plugin.
New option to create a set of stop words that will be removed from a post title / content when matching posts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.