This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: Problem with multisite? #1483
    Byron DokimakisByron Dokimakis
    Participant

    Neat. Problem solved. Did i thank you for the fast response? 🙂

    in reply to: Problem with multisite? #1480
    Byron DokimakisByron Dokimakis
    Participant

    I was trying to avoid that solution, it’s too brute force for me 😛

    Could you point me to the point where the current blog should be selected (if no blog is selected in multisite settings), so i can troubleshoot it a bit, and maybe make the original functionality work?

    Thanks for your time!

    in reply to: Problem with multisite? #1478
    Byron DokimakisByron Dokimakis
    Participant

    Yeap, that was the reason no html was produced. However, we must be bumping on to more than a syntax problem this time.

    I have created 2 search forms, each one with a different blog assigned in multisite settings. http://prntscr.com/32qi8p

    However, the shortcode is using the first form i created, regardless of the site i am currently using. Is it normal that i can see all forms from all sites’ plugin settings?

    in reply to: Problem with multisite? #1475
    Byron DokimakisByron Dokimakis
    Participant

    I must be doing it wrong.

    Here is the relevant code from shortcodes.php:
    <pre class=”lang:php decode:true ” >else {
    global $wpdb;
    if (isset($wpdb->base_prefix)) {
    $_prefix = $wpdb->base_prefix;
    } else {
    $_prefix = $wpdb->prefix;
    }
    $search = $wpdb->get_results(“SELECT * FROM “.$_prefix.”ajaxsearchpro”, ARRAY_A);
    if (!isset($search[0])) {
    echo “This search form does not exist!”;
    $return = ob_get_clean();
    return $return;
    }
    if (isset($search[0][‘id’]) && isset($wpdreams_ajaxsearchpros[$search[0][‘id’]])) {
    echo “This search form is already on the page! You cannot use the same form twice on one page!”;
    $return = ob_get_clean();
    return $return;
    }
    $wpdreams_ajaxsearchpros[$search[0][‘id’]] = 1;

    $id = $search[0][‘id’];

    $search[0][‘data’] = json_decode($search[0][‘data’], true);
    $style = $search[0][‘data’];
    }

    And here is my shortcode:
    <pre class=”lang:default decode:true ” ><?php echo do_shortcode(‘[wpdreams_ajaxsearchpro_results id=0 element="div"]‘); ?>

    And here are my forms:
    http://prntscr.com/32qha1
    http://prntscr.com/32qhbj

    And here is the problem:
    http://prntscr.com/32qhdz

    The shortcode does not produce any output.

    Any ideas?

    • This reply was modified 12 years, 2 months ago by Byron DokimakisByron Dokimakis. Reason: tried to fix code tags (?)
    in reply to: Problem with multisite? #1474
    Byron DokimakisByron Dokimakis
    Participant

    Well, that was a smart workaround. Thanks a lot! (i think it would be great if the original functionality would also work – so as to avoid workarounds)

    in reply to: Problem with multisite? #1472
    Byron DokimakisByron Dokimakis
    Participant

    That would mean that i cannot have one search form for all sites, and thus cannot insert it in a template file, because each site will have a different form id, correct?

    in reply to: Problem with multisite? #1469
    Byron DokimakisByron Dokimakis
    Participant

    I can see all the sites that have the public attribute enabled. However, if i select one of them, what about the other sites’ results? I want each site to show its own results.

    Basically, the problem is that “If you not choose any site, then the currently active blog will be used!” doesn’t seem to be working.

Viewing 7 posts - 1 through 7 (of 7 total)