Advertisement:

Author Topic: item.php field mobilephone  (Read 7008 times)

sniker234

  • Newbie
  • *
  • Posts: 15
item.php field mobilephone
« on: February 03, 2012, 01:24:40 pm »
I have put in the itempost.php the folowing cod :
<div class="row">
                                    <label for="phoneMobile"><?php _e('Cell phone', 'bcute') ; ?></label>
                                    <?php UserForm::mobile_text(osc_user()) ; ?>
                                </div>
Everything is ok.The user can add the ad without problems
I have put this this  cod in item.php

<?php if ( osc_item_phoneMobile != "" ) { ?><li><?php _e("Cell phone", 'bcute'); ?>: <strong><?php echo osc_item_phoneMobile ; ?></strong></li><?php } ?>

But he doesnt get me the mobilphone number
In the items page apear like this :  Mobil telefon: osc_get_phoneMobile

What do i do wrong?

RajaSekar

  • Hero Member
  • *****
  • Posts: 791
  • ராஜசேகர்
Re: item.php field mobilephone
« Reply #1 on: February 03, 2012, 07:20:18 pm »

try this code

<?php if ( osc_user_phone() != '' ) { ?>
<p class="phone"><?php _e("Cell phone", 'bcute'); ?>.: <?php echo osc_user_phone() ; ?></p>
<?php } ?>

sniker234

  • Newbie
  • *
  • Posts: 15
Re: item.php field mobilephone
« Reply #2 on: February 03, 2012, 10:35:37 pm »
Thanks Reja,

But it doesnt work.
I try to add this code because the costom field dont show up.

ingo

  • Full Member
  • ***
  • Posts: 216
Re: item.php field mobilephone
« Reply #3 on: February 03, 2012, 11:00:03 pm »
Hi sniker,

this will show cell phone with image in item page

<p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/tel.png') ; ?>" alt="" title="cell phone" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e("Mobil: ", 'modern') ; ?>  <?php echo osc_user_phone_mobile() ; ?>
                       </p>
 
this willl show  "phoneLand"with image in item page

           
                     <p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/tel1.png') ; ?>" alt="" title="land phone" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e("Phone: ", 'modern') ; ?>  <?php echo osc_user_phone(); ?>
                       </p> 


you must add phone images in current theme/images folder and rename blue part of code

this will appear only if user add phone numbers in "users -profil"

you can not add phone numbers from post / edit item page  which is not so bad beacuse user must to add phones only one time,

look at this page, there are lot's of helpers

http://wiki.osclass.org/Helpers

regards


                   
« Last Edit: February 03, 2012, 11:14:07 pm by ingo »

sniker234

  • Newbie
  • *
  • Posts: 15
Re: item.php field mobilephone
« Reply #4 on: February 04, 2012, 03:56:51 pm »
Thanks ingo

I ve got it now.
By the way it works.

Thanks

Kaskada

  • Newbie
  • *
  • Posts: 4
Re: item.php field mobilephone
« Reply #5 on: March 19, 2012, 09:40:52 am »
Thanks for code, but i have a little problem...
I use bcute theme and cell phone/land phone didn't show :(

I took a code which has published by ingo and has a little changed under bcute theme
Code: [Select]
<p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/tel.png') ; ?>" alt="" title="phoneMobile" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e('Cell phone''bcute') ; ?>  <?php echo osc_user_phone_mobile() ; ?>
                       </p>
   <p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/tel1.png') ; ?>" alt="" title="phoneLand" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e('Phone''bcute') ; ?>  <?php echo osc_user_phone() ; ?>
                       </p> 

What's wrong? I will be glad to any council.

Thanks

Sunkal

  • Sr. Member
  • ****
  • Posts: 445
  • everybody can help?
Re: item.php field mobilephone
« Reply #6 on: March 05, 2013, 08:48:42 pm »
Hi sniker,

this will show cell phone with image in item page

<p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/tel.png') ; ?>" alt="" title="cell phone" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e("Mobil: ", 'modern') ; ?>  <?php echo osc_user_phone_mobile() ; ?>
                       </p>
 
this willl show  "phoneLand"with image in item page

           
                     <p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/tel1.png') ; ?>" alt="" title="land phone" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e("Phone: ", 'modern') ; ?>  <?php echo osc_user_phone(); ?>
                       </p> 


you must add phone images in current theme/images folder and rename blue part of code

this will appear only if user add phone numbers in "users -profil"

you can not add phone numbers from post / edit item page  which is not so bad beacuse user must to add phones only one time,

look at this page, there are lot's of helpers

http://wiki.osclass.org/Helpers

regards


                 

Hello Ingo, must i put this code in item.post.php or a what?????? i don´t understand where i do this code inside..Must i do the code .please help...

robbie.kein

  • Full Member
  • ***
  • Posts: 205
Re: item.php field mobilephone
« Reply #7 on: May 24, 2013, 10:19:19 pm »
hi guys.
I entered all the codes you mentioned but does not appear in the ad phone number. Buy only the phone icon and the text "Cell phone".
where I went wrong?
Regards

chintor

  • Jr. Member
  • **
  • Posts: 95
Re: item.php field mobilephone
« Reply #8 on: May 24, 2013, 10:33:58 pm »
This may be not work.

Quote
<p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/tel.png') ; ?>" alt="" title="cell phone" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e("Mobil: ", 'modern') ; ?>  <?php echo osc_user_phone_mobile() ; ?>
                       </p>
 
this willl show  "phoneLand"with image in item page

           
                     <p style="clear: left;">
                           <img src="<?php echo osc_current_web_theme_url('images/tel1.png') ; ?>" alt="" title="land phone" style="float:left; margin-right:4px; margin-top:0px;">
                           <?php _e("Phone: ", 'modern') ; ?>  <?php echo osc_user_phone(); ?>
                       </p>



 Bcoz, U only calling the function, and doesn't have the code display the fields...

Try the below code...

Code: [Select]
<p style="clear: left;">
<img src="<?php echo osc_current_web_theme_url('images/tel.png') ; ?>" alt="" title="phoneMobile" style="float:left; margin-right:4px; margin-top:0px;">
<?php _e('Cell phone''Modern') ; ?> 
<?php View::newInstance()->_exportVariableToView('user'User::newInstance()->findByPrimaryKey(osc_item_user_id())); ?>
<?php echo osc_user_phone() ; ?>
</p>
   
« Last Edit: May 24, 2013, 10:37:12 pm by chintor »

robbie.kein

  • Full Member
  • ***
  • Posts: 205
Re: item.php field mobilephone
« Reply #9 on: May 25, 2013, 08:12:59 pm »
thanks chintor
i inserted the code you suggested but it does not work.
regards  :)
« Last Edit: May 25, 2013, 09:42:35 pm by robbie.kein »

sasashree

  • Newbie
  • *
  • Posts: 8
Re: item.php field mobilephone
« Reply #10 on: September 28, 2013, 12:03:52 pm »

try this code

<?php if ( osc_user_phone() != '' ) { ?>
<p class="phone"><?php _e("Cell phone", 'bcute'); ?>.: <?php echo osc_user_phone() ; ?></p>
<?php } ?>