Events Made Easy Forums How do I … make author always contact

  • This topic has 6 replies, 2 voices, and was last updated 14 years ago by Anonymous.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #42217
    Anonymous
    Inactive

    Hi,

    is there a way to make the author always the contact (for non admins) and then remove the “contact select box” from panel?

    Thanks, its a great tool!

    Sven

    #45301
    Franky
    Keymaster

    Sorry, but this is not possible. The default contact is selected in the EME settings, and for each event the event creator can change this to their liking.

    #45302
    Anonymous
    Inactive

    ok, thanks!

    Do you have a search.php sample for me?

    I’m not a programmer and somehow dont get your code into my search.php or at least no results are shown.

    This is my search.php:

    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    <?php if (have_posts()) : ?>
    <h2 class="pagetitle">Suchergebnisse</h2>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post">
    <h2 id="post-<?php the_ID(); ?>"><a>" rel="bookmark" title="Permanenter Link zu <?php the_title(); ?>">
    <?php the_title(); ?>
    </a></h2>
    <p class="meta">
    <span class="timr"><?php the_time('F d, Y') ?></span>
    <span class="user">Von: <?php the_author() ?> </span>
    <span class="catr">Kategorie: <?php the_category(', ') ?></span>
    <?php edit_post_link('Bearbeiten', '<span class="editr">', '</span>'); ?>
    </p>
    <?php the_content('<p class="serif">Lies den rest des Eintrags »</p>'); ?>
    <?php wp_link_pages(array('vorige' => '<p><strong>Pages:</strong> ', 'nachfolgende' => '</p>', 'next_or_number' => 'number')); ?>
    <p class="postmeta">
    <span class="commr"><?php comments_popup_link('Noch keine Kommentare →', 'Kommentar (1)', 'Kommentare (%)'); ?></span>
    </p>
    </div>
    <?php endwhile; ?>
    <div class="navigation">
    <div class="alignleft">
    <?php next_posts_link('← Vorige Artikel') ?>
    </div>
    <div class="alignright">
    <?php previous_posts_link('Nachfolgende Artikel →') ?>
    </div>
    </div>
    <?php else : ?>
    <div class="post">
    <h2>Keine Artikel gefunden. Bitte suche mit einem anderen Begriff</h2>
    <p><?php include (TEMPLATEPATH . '/searchform.php'); ?></p>
    </div>
    <?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    #45303
    Franky
    Keymaster

    See this code:

    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">

    <?php
    $table = $wpdb->prefix."dbem_events";
    $s = mysql_real_escape_string($_REQUEST['s']); // The search key words
    $found_event = false;

    $query = "SELECT * FROM $table WHERE (event_name LIKE '%".$s."%') OR
    (event_notes LIKE '%".$s."%') ORDER BY event_start_date";
    $events = $wpdb->get_results ( $query, ARRAY_A );
    foreach ($events as $row) {
    print "<h2><a href='".get_bloginfo('url')."/events/?event_id=".$row['event_id']."'>".$row['event_name']."</a> ".$row['event_start_date']."</h2>";
    print substr($row['event_notes'],0,250)."[...]";
    print "<div style='clear:both;'></div>";
    $found_event = true;
    }

    ?>

    <?php if (have_posts()) : ?>
    <h2 class="pagetitle">Suchergebnisse</h2>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post">
    <h2 id="post-<?php the_ID(); ?>"><a>" rel="bookmark" title="Permanenter Link zu <?php the_title(); ?>">
    <?php the_title(); ?>
    </a></h2>
    <p class="meta">
    <span class="timr"><?php the_time('F d, Y') ?></span>
    <span class="user">Von: <?php the_author() ?> </span>
    <span class="catr">Kategorie: <?php the_category(', ') ?></span>
    <?php edit_post_link('Bearbeiten', '<span class="editr">', '</span>'); ?>
    </p>
    <?php the_content('<p class="serif">Lies den rest des Eintrags »</p>'); ?>
    <?php wp_link_pages(array('vorige' => '<p><strong>Pages:</strong> ', 'nachfolgende' => '</p>', 'next_or_number' => 'number')); ?>
    <p class="postmeta">
    <span class="commr"><?php comments_popup_link('Noch keine Kommentare →', 'Kommentar (1)', 'Kommentare (%)'); ?></span>
    </p>
    </div>
    <?php endwhile; ?>
    <div class="navigation">
    <div class="alignleft">
    <?php next_posts_link('← Vorige Artikel') ?>
    </div>
    <div class="alignright">
    <?php previous_posts_link('Nachfolgende Artikel →') ?>
    </div>
    </div>
    <?php else : ?>

    <?php if (!$found_event) { ?>
    <div class="post">
    <h2>Keine Artikel gefunden. Bitte suche mit einem anderen Begriff</h2>
    <p><?php include (TEMPLATEPATH . '/searchform.php'); ?></p>
    </div>
    <?php } ?>

    <?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I included the code from http://www.e-dynamics.be/bbpress/topic.php?id=197 above your line containing “if (have_posts())” and at the bottom I added the “if (!$found_event)” before showing you don’t have any results.

    #45304
    Anonymous
    Inactive

    cool, thanks.

    It somehow got a problem with

    <?php if (!$found_event) { ?>

    <?php endif; ?>

    says sth like “}” missing.

    Do you know where to insert it?

    #45305
    Franky
    Keymaster

    See the code above … it’s there, before the endif.

    #45306
    Anonymous
    Inactive

    Many thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top