Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter milanouser

    (@milanouser)

    Marcus, thanks for the news. Hope to see it soon (also for the free version)

    Cheers

    Thread Starter milanouser

    (@milanouser)

    Jeff,

    no, all I would like to use is first_name on basically all messages, and password in clear on activation confirmation mail.

    I tried to use%user_pass% variable on user activation message, but that leaves it blank, as it is not defined for this kind of message (only for the regular registration email, it seems).

    For first_name, I know that in PHP I can get use $current_user->user_firstname, but how do I use that in the admin part (i.e. in e-mail messages)?

    Thanks for your continued help!
    M

    Thread Starter milanouser

    (@milanouser)

    Jeff, thanks for the good news – and for answering so quickly. Great job!

    Unfortunately I am quite at a loss how to implement that.

    Where and how can I define additional custom replacement variables? Especially to make it “update-proof”?
    Searching your plugin I think I understand that some of the variables are defined in modules\custom-user-links\custom-user-links.php (user_id, username), others in modules\custom-email\custom-email.php.

    Do I have to add my custom variables here, and if so, can I move these files to my theme to keep them save from plugin updates? If yes, where to (special plugin folder?)

    Thanks for any hint
    Cheers,
    M

    Thread Starter milanouser

    (@milanouser)

    Hi Marcus,

    thanks for the swift replay – and thanks in advance for changing the em.php file(s) accordingly for the next release.

    I do understand your concerns about moving the translations out, but nevertheless I think this is the only “clean” solution, especially if you want to keep your plugin open for other localizations.

    Cheers

    Thread Starter milanouser

    (@milanouser)

    all solved: simple typo: meta_key, not meta-key

    Embarrassing, but true…
    Cheers

    Thread Starter milanouser

    (@milanouser)

    Edit of previous post:
    Code should be this (without the line 'relation' => 'AND',):

    $query = array (
       'post_type' => 'bb_articles',
       'meta-key' => 'bb_date',
       'orderby' => 'meta_value_num',
       'order' => 'DESC',
       'meta_query' => array(
          array('key' => 'bb_source',
            'value' => 1,
            'compare' => '='
          )
       )
    );
    
    $my_query = new WP_Query($query);

    In addition, I tried a version a way described by Hameedullah Khan on WP stackexchange:

    $query = array (
       'post_type' => 'bb_articles',
       'meta-key' => 'bb_date',
       'orderby' => 'meta_value_num',
       'order' => 'DESC',
       'meta_query' => array(
             array (
                'key' => 'bb_date'
                ),
             array('key' => 'bb_source',
                'value' => 1,
                'compare' => '=='
                )
             )
    );

    Khan says there is a bug: WP modifies the meta_query if you specify orderby and meta_key as query vars. However, his proposed solution (or as I did interpret it) does not solve the problem: my posts are still in the wrong order, i.e. by post publication date rather than by BB_date!

    Again, thank you for any help
    Cheers

    Thread Starter milanouser

    (@milanouser)

    OK, found the culprit: it’s the usual suspect: wpautop function!

    So WP thinks it should “space things out a little” (wp-includes\formatting.php, line 223), and table is such a “spacable” item.
    Have no how to get WP not to do it, don’t want to mess with WP code directly, and generally disabling the wpautop function is no option either, so all I can do is work with negative margins to “lift” the table up again. What a mess…

    As for the ‘tbody’: have not found out where that comes from, but as long as it does not disturb my layout I can live with it.

    Anyway, thanks again for all your help – and the speed of it! 5 stars from me!

    Thread Starter milanouser

    (@milanouser)

    That site is not live, and even if it would be, that would not be of any help as it is a backend problem, not a frontend thing!

    Thread Starter milanouser

    (@milanouser)

    sorry, that messed up sentence was to be:
    They do not seem to be from WP, as the wpautop function inserts <br /> tags, not <br>, i.e. without slash. Here we get the <br>, slash-less!

    Thread Starter milanouser

    (@milanouser)

    Paul, thanks a lot. Looking forward to that!

    Having another little hiccup now with the plugin (please forgive me for asking):

    I am trying to wrap the shortcode into a responsive table. Simplified it looks like this:

    <div width="90%"> //table 90% of content width
    <table width="100%">
    [amazon asin=... ]     //item 1
    [amazon asin=... ]     //item 2
    </table></div>

    using a template like:

    <tr>
      <td width="50%">%LINK_OPEN%%TEXT%%LINK_CLOSE%</td>
      <td width="20%">%PRICE%</td>
      <td width="30%">%LINK_OPEN%Buy it%LINK_CLOSE%</td>
    </tr>

    As a result, however, for some reason I have two <br> line breaks inserted in between the <div> and the <table> tags!
    They do not seem to be from WP, as the wpautop functions inserts <br /> tags, not `
    .

    That makes me wonder if it could be your plugin inserting these line breaks, maybe because the template functions “realizes” that the table markup is “incomplete” (as the <table> and </table> tags are outside the template?

    If so, can I somehow, somewhere change that – or even better: override it, so that I do not need to temper with the plugin code directly?

    Thanks a million

    Thread Starter milanouser

    (@milanouser)

    @alchymyth – you are a genius!

    Thank you for the swift – and working – reply! Buffering did the trick! Hope that will not have too much impact on performance, though. Any suggestions here?

    Just for clarification: of course using get_template_part() is only for layouting the output, but even when I used some minimal markup, say:
    $loopcontent .= the_title() . '<br>'
    it did spit out these post titles from the custom loop at the top of the page. Now with buffering the loop I get it at the right place.

    I used the variable $loopcontent because ultimately the custom query and loop should go into a function, with query variables passed from the main page/template.

    Thanks again for the solution.

    Can confirm bug: no search working when categories shown, but working fine when not shown! Please fix
    (Event manager v. 5.2.5)

Viewing 12 replies - 1 through 12 (of 12 total)