Forum Replies Created

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

    (@tstruyf)

    Sorry for the late answer, but your code did help me out, Thx MC_Will!

    My example is working now, but I still find the documentation is lacking some clear examples. Using the documentation and without you telling me how to use wpMandrill::sendEmail, I could never get it working.

    Thread Starter tstruyf

    (@tstruyf)

    I got a bit off progress, but I’m trying to send a template, but run into various problems.

    I found the requested parameters by digging trough wpmandrill’s plugin files. I use this function with all my varriables set:

    $result = wpMandrill::mail($to, $subject, $html, $headers, $attachments, $tags, $from_name, $from_email, $template_name,$track_opens,$track_clicks,$url_strip_qs,$merge,$global_merge_vars,$merge_vars);

    I got 4 standard templates. If try them, only 1 template sends an actual HTML mail. The others just sends the string which I’ve set in $html).

    If I try to alter a variable (defined in template), I do this:
    $global_merge_vars = array(‘woon_test1’=>’testcontent bla bla bla’);

    and then $results contains this:

    object(WP_Error)#1210 (2) {
    [“errors”]=>
    array(1) {
    [“HTTP Code 500: https://mandrillapp.com/api/1.0/messages/send”%5D=>
    array(1) {
    [0]=>
    string(0) “”
    }
    }
    [“error_data”]=>
    array(0) {
    }
    }

    Thread Starter tstruyf

    (@tstruyf)

    I tried adding this in my themes fucntions.php:

    /* WP MANDRILL FILTER */
    add_filter('mandrill_payload','mandrill_add_reply_to');
    function mandrill_add_reply_to($message) {
       // die('test');
        $message['headers']['Reply-To'] = $message['from_email'];
        $message['from_name'] = 'My test';
        $message['from_email']= '[email protected]';
        return $message;
    }

    The mails are still sent via my server. Nothing changes, No errors are shown. (Checked php-logs) I know the function mandrill_add_reply_to() is being called, because uncommenting die() works.

    I solved this hardcoded by manualy replacing the wp_mail call in the plugin:

    //$mail = @wp_mail($to,$subj,$msg,$headers, $attachment);
    $mail = wp_mail($to,$subj,$msg,’From: My test <[email protected]>’);

    I have the same problem on multiple blogs. All blogs are running the latest version of wp-plash and WordPress 3.4.2 or 3.4.1

    In my case, the splash randomly displays. It’s seems to be a 50/50 probability.

    Thx in advance!

    Thread Starter tstruyf

    (@tstruyf)

    thx!

    It seems I will have to search for another plugins since my clients host is not supporting php 5.3

    T.

    I’m having the same problems: Loading gif appears, and no images.
    Important detail: I’m NOT using multiblog
    Firebug reports “.nggSlideshow is not a function” 2 times !

    Thread Starter tstruyf

    (@tstruyf)

    1. No output, $files is still empty.

    2. Even if it worked , I don’t think it could solve my situation. I use custom loops with instances of the WP_Query class because I don’t want to mess up default query. This is because I use pages and if I use the query_post() more then once on a page, the paging is broken.

    edit: forgot to say that the posts show fine, just no images with the code above.

    Is there already a solution found? I’m running php 5.3.0 and WP 2.8.4 and I still have the problem.

    Thx in advance !

    Thread Starter tstruyf

    (@tstruyf)

    I copied my theme to another Worpress 2.8.4 installation and it worked fine!

    So I installed wordpress allover on my localhost and the code works !!

    still, many thanks for your help !

    Thread Starter tstruyf

    (@tstruyf)

    no, here my total page code

    <?php
    /**
     * Template: Index.php
    */
    
    get_header();
    ?>
    
    <div class="inhoudcontainer"> 				
    
    			<?php $my_query = new WP_Query('category_name=news'); ?>
    
    			<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    			  <?php the_title()?>
    			  <br /><br />
    			<?php endwhile; ?>
    
    </div> <!-- END INHOUDCONTAINER-->
    
    <?php get_footer(); ?>

    I have a category calles news

    Thread Starter tstruyf

    (@tstruyf)

    offcourse I replaced <!– Do special_cat stuff… –>

    my exact code now:

    <?php $my_query = new WP_Query('showposts=1'); ?>
    
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <p>hello world</p>
    <?php endwhile; ?>

    The output is 3 times “hello world”. I have a total of 7 post.
    Why 3? To me it’s a total mystery!

    Thread Starter tstruyf

    (@tstruyf)

    Ok. I found a Solution, but it is not very clean.

    My sticky posts are marked as Sticky in the WP-admin, AND they need to be in a category different from the newsitems.

    I select my sticky posts

    $stickies = new WP_Query();
     $stickies->query(array('post__in'=>get_option('sticky_posts')));

    the loop statement is like this:
    while($stickies->have_posts()):$stickies->the_post()

    The newsposts are selected this way

    query_posts('category_name=Uncategorized&paged=' . $paged .'');
    // the loop
    while(have_posts()): the_post();
    Thread Starter tstruyf

    (@tstruyf)

    You mean something like this?
    if( post=sticky) : show the post ?

    I’dont think that will fix it.
    Let’s say I use the standard post-array, there will be no sticky posts in de array on page 2, 3, 4… ect. So the if-stament will just result in not displaying any sticky posts.

    Thread Starter tstruyf

    (@tstruyf)

    ok, maybe I need another approach. I can make a separate category for stickies (so I dont’t use the sticky option in the wp-admin). Then I could make a different loop for both categories.

    I thought it should work like this:

    $stickies = new WP_Query(‘category_name=Stickies’);
    … Loop trough $stickies->have_posts()

    $news = new WP_Query(‘category_name=Uncategorized’);
    … Loop trough $news->have_posts()

    I’m using valid category names. Still $news and $stickies return 0 posts. Is ‘category_name’ not a valid parameter?

    Or has someone another suggestion to solve my problem?

    Thread Starter tstruyf

    (@tstruyf)

    The strange part is: the moment I reactivate my theme, I can copy-past the bad code into a new file and it will work fine. Exact the same code. So I don’t think I introduced an error.

    After my deletion/re-activation my files and code are 100% the same as before ( the moment it crashed)

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