*

Ansel Mae

  • *
  • 1 posts
Publish button for logged in and logged out users
« on: October 27, 2017, 03:33:48 AM »
Hi i'm using Osclass script and have a problem with the publish button on my item post page!

Listing Location: The publish button needs to hide for the not registered users and appears for the registered users.

How do i change this code to hide when logged out??

Code: [Select]
<?php if(!osc_is_web_user_logged_in() ) { ?>
Publisher Information: publish button needs to appears for not registered users and hide for the registered users. For this i use this code and looks like this works great!

Code: [Select]
    <?php if(!osc_is_web_user_logged_in() ) { ?>
    <fieldset>
      <h2>
         <strong><?php _e("Publisher Information"'ctg_housing'); ?></strong>
      </h2>
      <div class="item-post-user-name item-post-columns">
        <label class="control-label" for="contactName">
          <span class="required_fields">*</span>
          <?php _e('Name''ctg_housing'); ?>
        </label>
        <?php ItemForm::contact_name_text(); ?>
      </div>
      <div class="item-post-user-email item-post-columns">
        <label class="control-label" for="contactEmail">
          <span class="required_fields">*</span>
          <?php _e('E-mail''ctg_housing'); ?>
        </label>
        <?php ItemForm::contact_email_text(); ?>
      </div>
      <div class="clearfix"></div>
      <div id="submit-button" class="item-post-button text-center">
        <button type="submit" class="small button_radius">
          <?php if($edit) { _e("Update Listing"'ctg_housing'); } else { _e("Publish Listing"'ctg_housing'); } ?>
        </button>
      </div>
    </fieldset>
    <?php  ?> 

Thanks

*

MB Themes

Re: Publish button for logged in and logged out users
« Reply #1 on: October 27, 2017, 05:39:11 PM »
@Ansel
Code: [Select]
<?php if(osc_is_web_user_logged_in() ) { ?>
... content for logged in...
<?php ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots