Forum Replies Created

Viewing 15 replies - 1 through 15 (of 257 total)
  • Thread Starter yezzz

    (@yezzz)

    Thanks, but v6.1 is not in the repository…

    Re the duplicate emails, I figured I’d first suggest a check, but did consider using a hint of some kind.

    Thread Starter yezzz

    (@yezzz)

    Because I’ve seen emails not arriving / getting marked as spam when doing that.

    Thread Starter yezzz

    (@yezzz)

    Ah ok, that clarifies why you’re hardcoding the target and getting its value. So I guess with the button you render that code in the button onclick and not in the select onchange.

    Anyway, thanks for the update!!!

    Thread Starter yezzz

    (@yezzz)

    Hi Yannick,

    Thanks for the update! The shortcode parameter was a welcome addition and outputs the ID just fine. However the select outputs a nested function call:

    <select onchange="showcategory( showcategory( jQuery(.catdropdown2).val() ) )"

    This calls the ajax code twice: first the inner call with the value, then the outer one with NULL, pretty much the same as PHP.

    So I’d recommend either doing the following (rewritten my code above, added var to give linklistID local scope):

    <select onchange="showcategory()" class="catdropdown catdropdown2" data-linklist-id="1">

    function showcategory() {
      var linklistID = event.target.dataset.linklistId;
      showLinkCat2(event.target.value, linklistID, 1, '');
      return false;
    }

    I see you now pass the category id to showLinkCat, so if that’s your preference you can actually get the select value inline with this.value and pass it to your function as your have it now:

    <select onchange="showcategory(this.value)" class="catdropdown catdropdown2" data-linklist-id="1">

    • This reply was modified 3 years, 9 months ago by yezzz. Reason: typo
    • This reply was modified 3 years, 9 months ago by yezzz. Reason: clarify last code snippet needs your function taking catidvar as parameter
    Thread Starter yezzz

    (@yezzz)

    No, just be advised thickbox needs url parameters for that particular use case. Also be prepared that some day a wordpress jquery update will render thickbox useless.

    Forum: Plugins
    In reply to: [wp-greet] fatal error
    Thread Starter yezzz

    (@yezzz)

    Yes, v5.9 seems to work well ??

    Forum: Plugins
    In reply to: [wp-greet] fatal error
    Thread Starter yezzz

    (@yezzz)

    Forum: Plugins
    In reply to: [wp-greet] fatal error
    Thread Starter yezzz

    (@yezzz)

    If wp_mail() or global $phpmailer requires too many changes then you can use class_alias.

    The following works fine for me, but you need to check for wp => 5.5

    //use PHPMailer\PHPMailer\PHPMailer as PHPMailer;
     if (  (float) $wp_version >= 5.5 ) {
    	if ( ! class_exists( 'PHPMailer\\PHPMailer\\PHPMailer' ) ) {
    		require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
    		require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
    		require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
    	}
    	class_alias('PHPMailer\PHPMailer\PHPMailer','PHPMailer');
    } else {

    Alternatively you could create another alias for both cases and extend that.

    • This reply was modified 4 years ago by yezzz.
    Forum: Plugins
    In reply to: [wp-greet] fatal error
    Thread Starter yezzz

    (@yezzz)

    Maybe you should use wp_mail() or global $phpmailer. Check out class handling in wp_mail source

    Forum: Plugins
    In reply to: [wp-greet] fatal error
    Thread Starter yezzz

    (@yezzz)

    Sure. PHP 7.2, WP 4.9.16.

    BTW, moving the use statement inside the condition mentioned above is also not possible (giving fatal error). I just learned that the statement cannot be used inside block scope, so it should be handled differently.

    Wait for the new version of link library coming any day now. It will be using custom post types and I’d be surprised if the taxonomy (category) used with that is not hierarchical…

    Are you saying you prefer to use categories and ajax links on a single page? Like on my reis aanbieders page? Note that the categories are in an accordeon. For deskop visible in the sidebar, for smaller window width they’re under the autocomplete, visiblity toggled with the button (that’s all custom coding, not provided by the plugin).

    Be aware that categorylistoverride must be a number or a list like “1,2,3”. But I recommend not using it in the links shortcode while testing because it acts as a filter (and also a complete rewrite of the plugin is coming any day now, and due to using another content type I suspect the id’s may change).

    Also check that you have links in the category.

    • This reply was modified 6 years, 5 months ago by yezzz.
    Thread Starter yezzz

    (@yezzz)

    Well I had async processing/multithreading on my mind, but it does not seem to be easy to achieve in php. Then again, wouldn’t a fraction of a second per post be enough?

    Of course your solution is great for autoposts, but I was doing a batched import taking a minute, and impatiently browsing the created offers with their still original urls ??

    • This reply was modified 7 years, 3 months ago by yezzz.
    Thread Starter yezzz

    (@yezzz)

    Yes, that worked! Well done!!!

    So, the post terms in the db are read before they are written is basically what you’re saying? Then the pmxi_saved_post (or even WP publish action) callback with a sleep should also work?

    Thread Starter yezzz

    (@yezzz)

    It made no difference. Same with v.1.1.2 with hotfix.

Viewing 15 replies - 1 through 15 (of 257 total)