danilocubrovic
Forum Replies Created
-
Forum: Plugins
In reply to: [Quick Featured Images] failed to open stream: No such file or directoryNo problem. I did!
They’ve changed the autoloader, and the issue is resolved now. Just be aware that this might cause conflicts with other plugins.
Forum: Plugins
In reply to: [Quick Featured Images] failed to open stream: No such file or directoryYes, this resolves the conflict I experienced. Thank you for the quick support!
They pushed some update with additional check to help me with this. I will try it now.
But I dont think nether they not you named class class-Transliteration_Plugin_Quick_Featured_Images.php
but there is some conflict that causing this but dont know what is it.This is pretty popular plugin with 50k installations and maybe you interfere with some other plugins same way. If you need some help investigating this let me know.
Forum: Plugins
In reply to: [Quick Featured Images] failed to open stream: No such file or directoryAs I wrote they did not named it after your plugin. They do some trick that for every plugin they trie to do this with prefix their. They do some transliteration of sites latin to cyrillic and vise verse and this is what happens , but for all other plugins we do not have problems. They have some full name check or something additional to check so they do not break. Will wrote to those guys too.
Forum: Plugins
In reply to: [Quick Featured Images] failed to open stream: No such file or directoryI assume that somehow prefix it with Transliteration_Plugin_ for some purposes.
I’m not php guy so i do not know what to check but if you can provide some code snippet to include to your plogine and provide logs I can help with that.Forum: Plugins
In reply to: [Quick Featured Images] failed to open stream: No such file or directoryIt is obvious that this is not use. Transliteration plugin do some trick for their translate features that interfere with your code. Don’t know how to find out how those class get into your classloader.
Can you please just do some check to prevent such interference. I assume they did the some with other 70 plugins that do not conflicts around that.
Forum: Plugins
In reply to: [Quick Featured Images] failed to open stream: No such file or directoryI already wrote that:
include(/var/www/html/wp-content/plugins/quick-featured-images/admin/class-Transliteration_Plugin_Quick_Featured_Images.php): failed to open stream: No such file or directory
This is the file that you trying to load.This is some conflict with https://www.ads-software.com/plugins/serbian-transliteration/
We have 72 more plugins that does not report any problems so it can be fixed. Probably transliteration plugin is somewhere where you don’t expect that.Forum: Plugins
In reply to: [Highlight Search Terms] Higlight not working for meone more thing. In search results we can see hilite markups when search string is find in categories (because searchwp did not mark those places) an on other instances that are already marked by searchwp hilite ignores is it as marked already. So maybe search results is OK from that point of view and problem persists to pass hilite query param when opening post from results.
Forum: Plugins
In reply to: [Highlight Search Terms] Higlight not working for mebtw when I add manually your param to url of some of this search results it is highlighted ad needed.
https://proba.cekos.rs/beleska-o-autorima-dejan-popovic-svetislav-v-kostic?hilite=european
So the main issue why that param is not propagated to url automatically
and can we push it there somehow.Forum: Plugins
In reply to: [External Login] disable local login excerpt AdminI kind of manage to pach this by using wp_bulk_delete_pro and set that to delete over night user with specific roles.
It will be more than helpful to have option in external login to disable local login excerpt for roles (and I will check admin and editor there)Forum: Plugins
In reply to: [Sub Categories Widget] Sort by modified date and show dateHello again.
Because this is an important feature for us I had to find some patch for this and found it with use of this solution:
https://jeffri.me/2012/01/sort-by-latest-post-for-wp_list_categories/so i add in function.php
$pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits' ); $clauses = apply_filters( 'terms_clauses', compact( $pieces ), $taxonomies, $args ); function filter_term_sort_by_latest_post_clauses( $pieces, $taxonomies, $args ) { global $wpdb; if ( in_array('category', $taxonomies) && $args['orderby'] == 'latest_post' ) { $pieces['fields'] .= ", MAX(p.post_date) AS last_date"; $pieces['join'] .= " JOIN $wpdb->term_relationships AS tr JOIN $wpdb->posts AS p ON p.ID=tr.object_id AND tr.term_taxonomy_id=tt.term_taxonomy_id"; $pieces['where'] .= " GROUP BY t.term_id"; $pieces['orderby'] = "ORDER BY last_date"; $pieces['order'] = "DESC"; // DESC or ASC } return $pieces; } add_filter('terms_clauses', 'filter_term_sort_by_latest_post_clauses', 10, 3);
and changed in your plugin line
$subs = wp_list_categories(array($parent => $category_id, ‘hide_empty’ => $hide_empty_cats, ‘show_count’ => $show_post_count, ‘exclude’ => $excluded, ‘title_li’ => null, ‘show_option_none’ => ”, ‘echo’ => 0, ‘order’ => $order));to
$subs = wp_list_categories(array($parent => $category_id, ‘hide_empty’ => $hide_empty_cats, ‘show_count’ => $show_post_count, ‘exclude’ => $excluded, ‘title_li’ => null, ‘show_option_none’ => ”, ‘echo’ => 0, ‘orderby’ => ‘latest_post’));Can you add this option in your next version of plugin?
It will be useful for more users but me and we could continue to use your updates if we do not have to change this line.
Best regards,
Danilo CubrovicForum: Plugins
In reply to: [External Login] Conflict with other plugin (Logged in)Thanks a lot Tom. This works great!
It took me some time to get back to this project and test it.
This is my current code, in case someone find it useful for their purposes.
It combines part of the code from loggedin plugin to prevent double logins with hooks for your plugin.So it will forbid multiple log in for same user, unless that user have admin or editor role.
function loggedin_bypass_roles( $prevent, $user_id ) {
$allowed_roles = array( ‘administrator’, ‘editor’ );
$user = get_user_by( ‘id’, $user_id );
$roles = ! empty( $user->roles ) ? $user->roles : array();
return ! empty( array_intersect( $roles, $allowed_roles ) );
}
add_filter( ‘loggedin_bypass’, ‘loggedin_bypass_roles’, 10, 2 );function bypass( $user_id ) {
return (bool) apply_filters( ‘loggedin_bypass’, false, $user_id );
}function reached_limit( $user_id ) {
if ( bypass( $user_id ) ) {
return false;
}
$maximum = 1;
$manager = WP_Session_Tokens::get_instance( $user_id );
$count = count( $manager->get_all() );
$reached = $count >= $maximum;
return $reached;
}function myExlogCustomExcluder($userData) {
$uname = $userData[‘name’];
$user = get_user_by(‘login’,$uname);
if($user)
{
$user_id = $user->ID;
if ( reached_limit( $user_id ) ) {
return “User is already logged.”;
}
}
return false;
}
add_filter(‘exlog_hook_filter_custom_should_exclude’, ‘myExlogCustomExcluder’, 10, 1);Forum: Plugins
In reply to: [External Login] Conflict with other plugin (Logged in)One more thing please.
I see that this hook exlog_hook_filter_custom_should_exclude designed to return true/false from there.
But is it somehow possible to set error message for logging from there?
If user is already logged I want them to get message “User already logged” and not username password not found or similar.Forum: Plugins
In reply to: [External Login] Conflict with other plugin (Logged in)That’s good pointer for me.
Yes this is other plugin I need too check on user login and this check not working if I enable external login.Yes. Only allow one session by rejecting login if they have an already active session.
I will try to achieve this these days by combining your hook with other plugin check logic. Thanks. If I manage to solve it I will post it here to help other users in future..