Advertisement:

Author Topic: Disable buttons - option  (Read 1910 times)

mscro

  • Newbie
  • *
  • Posts: 4
Disable buttons - option
« on: August 02, 2011, 12:16:19 pm »
Hi all,

Have question maybe if can be built in script option to disable buttons share and contact seller.

- Share button from General settings to disable  - from all posts
- And disable Contact Seller button from page when you create new item
  ( this will be good for items where are all infos clearly written and it's no extra contact needed via email)


Tnx, Great script

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: Disable buttons - option
« Reply #1 on: August 02, 2011, 12:43:24 pm »
Hi,

You can modify the theme and remove this buttons and contact form, for all items on your website.

Editing item.php (located at oc-content/themes/modern/item.php) find the following code and remove it.

at l.98 - l.105 (buttons code)
Code: [Select]
<p class="contact_button">
    <?php if( !osc_item_is_expired () ) { ?>
    <?php     if(osc_reg_user_can_contact() && osc_is_web_user_logged_in() || !osc_reg_user_can_contact() ) { ?>
    <strong><a href="#contact"><?php _e('Contact seller''modern') ; ?></a></strong>
    <?php     ?>
    <?php ?>
    <strong class="share"><a href="<?php echo osc_item_send_friend_url() ; ?>" rel="nofollow"><?php _e('Share''modern') ; ?></a></
</p>

and you need remove more code at item.php,

at l.180- l.224 (div contact seller)
Code: [Select]
<?php if( !osc_item_is_expired () ) { ?>
<?php     if(osc_reg_user_can_contact() && osc_is_web_user_logged_in() || !osc_reg_user_can_contact() ) { ?>
<div id="contact">
    <h2><?php _e("Contact publisher"'modern') ; ?></h2>
    <p class="name"><?php _e('Name''modern'?>: <?php echo osc_item_contact_name(); ?></p>
    ....
    </form>
</div>
<?php     ?>
<?php ?>

For the moment we will not implement this options at core.

Thanks