Forum Replies Created

Viewing 12 replies - 16 through 27 (of 27 total)
  • Hi Alan,
    I went through the posts and feel the only one who cannot delete his files after moving them to another folder. The database entries are gone but the file still remains.
    I also tried it with subfolders like /wp-content/subtest/ or /wp-content/uploads/subbtest/. Anyone else? Im with WP 2.8.2 and RU 0.14

    zorrocket, thanks for providing the link. I run WP 2.8.2. Even as admin I cannot send emails = access level issues.

    Thread Starter karimun

    (@karimun)

    Just a short note. The problem described is not the plugin but my mail server settings.

    Yes, it works after a WP 2.5 upgrade. The plugin stood active during the upgrade process.

    I have played a bit with actual request of this post. Yes it is of course possible to store the post data in an array.

    Heres a VERY basic way of doing it:

    $array = array();
    query_posts("showposts=-1&order=asc"); ?>
    <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    <?php if (in_category(4)){ ?>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><br>
    <?php } ?>
    <?php if (in_category(3)){
    $permalink = get_permalink();
    $title = get_the_title();
    array_push($array,$permalink,$title);
     } ?>
    <?php endwhile; ?><?php endif; ?>

    And now output the array somewhere else:

    $Arraypointer = -1;
    while (++$Arraypointer <= count($array)){ ?>
    <a href="<?php echo $array[$Arraypointer]; $Arraypointer++; ?>"> <?php echo $array[$Arraypointer]; ?></a><br>
    <?php }?>

    I could imaging associative arrays provide you with more flexibility here.

    BUT: I agree with Kafkaesqui. Its wise to handle things in the loop like he described it.

    Thread Starter karimun

    (@karimun)

    Thank you.

    Thread Starter karimun

    (@karimun)

    Perfect! It works now. Thank you for your assistance.

    Thread Starter karimun

    (@karimun)

    still nothing.

    Page has ID 85.
    My code in the page template (note, its not directly in page.php, template is set in the admin panel under “Page template”):

    <?php query_posts("cat=4&showposts=-1&orderby=title&order=asc");
    
    $wp_query->is_category = false;
    $wp_query->is_page = true;
    ...
    ?>

    My code in the sidebar template:

    if (is_page(85)){echo "sidebar content for page 85";}

    .. nothing displays in the sidebar.

    Thread Starter karimun

    (@karimun)

    Thank you for your detailed answer.
    Unfortunately in my case your suggestions dont help. CONDITIONAL TAGS in the SIDEBAR TEMPLATE are not processed if I implement query_posts() in the page main template:

    is_page() | is_page(8) | is_page(‘test-page’) | is_page(‘Test page’) wont work.

    Thread Starter karimun

    (@karimun)

    jleez, just try my $_SESSION[] example. In your case maybe you have to play around with the $wp_query.
    Good luck.

    I recently worked on a very similar task with multiple drop-downs that contained tags.

    First one simplified approach.
    Add posts from selected categories to ONE drop-down with some style-filtering:

    <form action="<?php $PHP_SELF ?>" name="searchbyname" id="searchbyname" >
    <select name="nameselect">
    <?php query_posts("cat=3,4&showposts=-1&orderby=title&order=asc"); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    <option <?php if(in_category(4)) echo 'style="font-weight: bold;"'; ?> value="<?php echo get_permalink(); ?>">
    <?php the_title_attribute('before=&after=');?>
    </option>
    
    <?php endwhile; ?><?php else : ?><?php //smething ?><?php endif; ?>
      </select>
      <input type="button" name="Button1" value="Go" />
    </form>

    —–
    With some java-script you could directly redirect on select.

    Second, a form with multiple drop-downs that hold manually defined tags to output only posts that contain the chosen tag combination.

    <form action="<?php $PHP_SELF ?>" method="post" name="searchbytags">
    
    <select name="group1">
    <option value="tag1">tag1</option>
    <option value="notype">No Choice</option>
    </select>
    
    <select name="group2">
    <option value="tag5">tag5</option>
    <option value="notype">No Choice</option>
    </select>
    <input type="hidden" name="sent" value="1">
    <input type="submit" name="Submit" value="search" />
    </form>

    —-
    Some hints to capture the data submitted by 2nd. example:

    <?php 
    
    $formfields = array("group1", "group2");
    $formdata=$GLOBALS["_REQUEST"];
    
    foreach ($formfields as $formfields2)
    {
    if ($formdata[$formfields2] !== "notype")
    $tagsearchall = $tagsearchall . $formdata[$formfields2] . "+";
    }
    
    $tagsearchall = "tag=" . substr($tagsearchall, 0, -1); //remove last " + "
    if ($tagsearchall !== "tag=+++") {echo "SEARCH TAG: $tagsearchall";}
    ?>

    —–
    Now pass $tagsearchall to the loop:

    <?php if ($_REQUEST["sent"]){?>
    <?php query_posts("$tagsearchall"); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    
    ... continue as usual and do a lot of fancy stuff here.

    Hope it helps.

    Thread Starter karimun

    (@karimun)

    Well guys, I did some try&error with the v2.3 beta3 copy now and found out how to solve my probs mentioned above.

    Retrieve current category ID or category name:

    < ? php
    foreach((get_the_category()) as $category) {}
    $cat = $category->cat_ID;
    $catname = $wpdb->get_var("SELECT name FROM $wpdb->terms WHERE term_ID=$cat");
    echo $cat ." - ". $catname;
    ? >

    Total posts in a specific category (could be combined with the code above):

    < ? php
    $totalposts = $wpdb->get_var("SELECT count FROM $wpdb->term_taxonomy WHERE term_ID=THE_CAT_ID");
    ? >

    Show certain numbers of posts of specific category(same as for v2.2.x; place it above the loop):
    < ? php query_posts("cat=7&showposts=3"); ? >

    Maybe someone finds it helpful.

Viewing 12 replies - 16 through 27 (of 27 total)