Advertisement:

Author Topic: Publisher contact details  (Read 1438 times)

ingo

  • Full Member
  • ***
  • Posts: 216
Publisher contact details
« on: January 14, 2012, 04:29:33 pm »
Hi,
Most of customers want to have their contact details on top of the itempage,
so I try to create one,
If somebody want to make the same, try it:

ingo

  • Full Member
  • ***
  • Posts: 216
Re: Publisher contact details
« Reply #1 on: January 14, 2012, 04:31:49 pm »
I have made it like this:​

First step
Quote
paste your icons (User/phone/email -all obaut 22x22px) in images folder of your theme
Second step
code:
Code: [Select]
<div id="sidebar">
                  <div id="contact"> 
                    <p style="clear: left;">   
                           <img src="<?php echo osc_current_web_theme_url('images/user.png') ; ?>" alt="" title="User Profile" style="float:left; margin-right:4px; margin-top:-4px;">
                           <?php _e("User Profile: "'modern') ; ?><a href="<?php echo osc_user_public_profile_urlosc_item_user_id() ); ?>" ><?php echo osc_item_contact_name(); ?></a>
                       </p>
                     <p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/phone.png') ; ?>" alt="" title="Phone" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e("Phone: "'modern') ; ?>  <?php echo osc_user_phone(); ?>
                       </p>
                    <p style="clear: left;">
                         <img src="<?php echo osc_current_web_theme_url('images/email.png') ; ?>" alt="" title="eMail" style="float:left; margin-right:4px; margin-top:0px;">
                         <?php _e("eMail: "'modern') ; ?>  <?php echo osc_user_email(); ?>
                      </p>
                        <br/>
                    </div> 
                  </div>
Quote
put the code in item.php,  line about -184, before <div id="contact">
                                                                                                <h2><?php _e("Contact publisher", 'modern') ; ?></h2>
Third step
go to line:
Quote
<p class="name"><?php _e('Name', 'modern') ?>: <a href="<?php echo osc_user_public_profile_url( osc_item_user_id() ); ?>" ><?php echo osc_item_contact_name(); ?></a></p>

and replace it with this code:
<p class="name"><?php _e('published by', 'modern') ?>: <?php echo osc_item_contact_name(); ?></p>
Fourth step
go to line:
Quote
                           <?php if ( osc_user_phone() != '' ) { ?>
                                <p class="phone"><?php _e("Tel", 'modern'); ?>.: <?php echo osc_user_phone() ; ?></p>
                            <?php } ?>
and take this code away

Fifth step
Add this on the first line of item.php page
Quote
<?php View::newInstance()->_exportVariableToView('user', User::newInstance()->findByPrimaryKey(osc_item_user_id())); ?>

save

regards
« Last Edit: January 15, 2012, 01:02:00 am by ingo »