WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Item details only for registered users

[Resolved] Item details only for registered users

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey,

    i found the solution for me…

    edit in plugins/”bdp”/templates/businessdirectory-listing.tpl.php

    edit first lines

    <?php if ($is_sticky): ?>
        <?php echo $sticky_tag; ?>
    <?php endif;
    if (is_user_logged_in()) {
    ?>

    line 32 (end of doc)
    } else { echo 'Login text!';}?>

    hey, i would like to give you my new and clean edition:
    this is the whole site
    plugins/”bdp”/templates/businessdirectory-listing.tpl.php

    <?php if ($is_sticky): ?>
        <?php echo $sticky_tag; ?>
    <?php endif;
    //check login
    //if logged in
    //show details
    if (is_user_logged_in()) {
    ?>
    
    <div class="listing-title">
        <h2><?php echo $title; ?></h2>
    </div>
    
    <?php if ($actions): ?>
        <?php echo $actions; ?>
    <?php endif; ?>
    
    <?php if ($main_image): ?>
        <div class="main-image"><?php echo $main_image; ?></div>
    <?php endif; ?>
    
    <div class="listing-details cf <?php if ($main_image): ?>with-image<?php endif; ?>">
        <?php echo $listing_fields; ?>
    </div>
    
    <?php if ($extra_images): ?>
    <div class="extra-images">
        <ul>
        <?php foreach ($extra_images as $image): ?>
            <li><?php echo $image; ?></li>
        <?php endforeach; ?>
        </ul>
    </div>
    <?php endif;
    
    } else {
    //wenn nicht eingelogt dann anmeldung zeigen
    //teil kopiert aus parts/login-required.tpl.php
    ?>
    <?php echo wpbdp_render_msg(_x("You are not currently logged in. Please login or register first. When registering, you will receive an activation email. Be sure to check your spam if you don't see it in your email within 60 minutes.", 'templates', 'WPBDM')); ?>
    
    <p></p>
    
    <h2><?php _ex('Login', 'templates', 'WPBDM'); ?></h2>
    <?php wp_login_form(); ?>
    
    <?php if (get_option('users_can_register')): ?>
    <a href="<?php echo site_url('wp-login.php?action=register', 'login'); ?>"><?php _ex('Not yet registered?', 'templates', 'WPBDM'); ?></a>
    <?php endif; ?>
    
    <?php }?>
    Plugin Author businessdirectoryplugin

    @businessdirectoryplugin

    Thanks for the tip!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Item details only for registered users’ is closed to new replies.