最近我使用這個功能來隱藏osc_user_phone()的最後一個號碼Osclass 3.6.1Osclass osc_user_phone()不工作
jQuery的
<script>
$(document).ready(function(){
$("#showPhone").click(function() {
$("#showPhone").hide();
$("#hidePhone").show();
});
$("#hidePhone").click(function() {
$("#showPhone").show();
$("#hidePhone").hide();
});
});
</script>
HTML
<?php _e('user phone'); ?> :
<span>
<a href="#" id="hidePhone" style="display: none;">
<?php echo osc_user_phone_mobile(); ?>
</a>
</span>
<span>
<a href="#" id="showPhone">
<?php echo substr(osc_user_phone_mobile(),0,-4).'XXXX'; ?>
</a>
</span>
在這裏一切都很好。如果完成用戶配置文件中的電話單元字段確定,則電話號碼顯示在項目頁面中。 如果發佈新廣告,並且沒有帳戶並完成手機輸入,則該電話號碼不會顯示在商品頁面中。
從項目-post.php中,問題是在這裏(我希望)
<div class="control-group">
<label class="control-label" for="phoneMobile"><?php _e('Cell phone', 'infinity'); ?></label>
<div class="controls">
<?php UserForm::mobile_text(osc_user()); ?>
</div>
</div>
,並從用戶profile.php,手機輸入:
<div class="control-group">
<label class="control-label" for="phoneMobile"><?php _e('Cell phone', 'infinity'); ?></label>
<div class="controls">
<?php UserForm::mobile_text(osc_user()); ?>
</div>
</div>
的同樣的代碼,項目-post.php中
如何輸入域工作和當用戶發佈新的廣告電話號碼顯示在項目頁面?