Advertisement:

Author Topic: New Field in item-post.php help  (Read 24581 times)

TheDeadLives

  • Sr. Member
  • ****
  • Posts: 279
New Field in item-post.php help
« on: September 09, 2013, 02:11:28 am »
Well, i have tried to make a new field in item-post.php.

I put this code in item-post.php

Code: [Select]
<label for="contactPhone"><?php _e('Phone''modern'); ?> *</label>
                            <?php ItemForm::contact_phone_text(); ?>
                        </div>

And this one in the Item.Form.class.php

Code: [Select]
static public function contact_phone_text($item = null) {
            if($item==null) { $item = osc_item(); };
            if( Session::newInstance()->_getForm('contactPhone') != "" ) {
                $item['s_contact_phone'] = Session::newInstance()->_getForm('contactPhone');
            }
            parent::generic_input_text('contactPhone', (isset($item['s_contact_phone'])) ? $item['s_contact_phone'] : null);
            return true;
        }

The problem is whatever i write in this new field, the value that appears in the database is null.

What i´m doing wrong? Can you help me?

Grateful

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: New Field in item-post.php help
« Reply #1 on: September 09, 2013, 11:34:14 am »
Hi,

There's no phone field in the database.
You could create a custom field for the phone and it will be correctly saved.

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: New Field in item-post.php help
« Reply #2 on: September 09, 2013, 02:21:48 pm »
Trouble with any custom phone field is that it is required/optional each time item is posted. But, why don't you use s_phone_mobile and s_phone_land db entries which are created by core and if you install Required Fields at Registration plugin, by default s_phone_mobile is required field during registration process and this way you have more consistency and simplicity. Again, I am not sure what you try to achieve, so you need your own db field.

If you like the suggestion, in item.php place the code where you want it to appear:

Code: [Select]
<?php echo osc_user_phone() ; ?>

function osc_user_phone() is defined in /oc-includes/osclass/helpers/hUsers.php

Code: [Select]
    /**
     * Gets phone_land if exist, else if exist return phone_mobile,
     * else return string blank
     * @return string
     */
    function osc_user_phone() {
        if(osc_user_field("s_phone_land")!="") {
            return osc_user_field("s_phone_land");
        } else if(osc_user_field("s_phone_mobile")!="") {
            return osc_user_field("s_phone_mobile");
        }
        return "";
    }

I am still looking on forum topics how to also require s_phone_land field in db which is not used during user's registration procedure by default settings in this plugin, but user can access it and fill it later in the profile.

dev101

TheDeadLives

  • Sr. Member
  • ****
  • Posts: 279
Re: New Field in item-post.php help
« Reply #3 on: September 10, 2013, 01:24:05 am »
Hi,

There's no phone field in the database.
You could create a custom field for the phone and it will be correctly saved.

I'm not so dummy XD. I have modified the struct.sql, the Item.Form.class.php, item.php and item-post.php in theme, ItemActions.php, hItems and model/item.php

If i write the phone in item-post.php, in the database the result is null, but if i write the phone number in the database, it appears in the item.php, from the theme. So, i think that the problem is in the item-post.php.

Can you help me (if you need i can post all my modifications)?

Quote
Trouble with any custom phone field is that it is required/optional each time item is posted. But, why don't you use s_phone_mobile and s_phone_land db entries which are created by core and if you install Required Fields at Registration plugin, by default s_phone_mobile is required field during registration process and this way you have more consistency and simplicity. Again, I am not sure what you try to achieve, so you need your own db field.

If you like the suggestion, in item.php place the code where you want it to appear:

Code: [Select]
<?php echo osc_user_phone() ; ?>

function osc_user_phone() is defined in /oc-includes/osclass/helpers/hUsers.php

Code: [Select]
    /**
     * Gets phone_land if exist, else if exist return phone_mobile,
     * else return string blank
     * @return string
     */
    function osc_user_phone() {
        if(osc_user_field("s_phone_land")!="") {
            return osc_user_field("s_phone_land");
        } else if(osc_user_field("s_phone_mobile")!="") {
            return osc_user_field("s_phone_mobile");
        }
        return "";
    }

I am still looking on forum topics how to also require s_phone_land field in db which is not used during user's registration procedure by default settings in this plugin, but user can access it and fill it later in the profile.

dev101

osc_user_phone is a phone number associated with a user correct? I want to make this modification so that people without account, that create a new ad, can post their phone number, without this being associated with any account

Grateful

Sunkal

  • Sr. Member
  • ****
  • Posts: 445
  • everybody can help?
Re: New Field in item-post.php help
« Reply #4 on: September 11, 2013, 10:07:19 pm »
Well, i have tried to make a new field in item-post.php.

I put this code in item-post.php

Code: [Select]
<label for="contactPhone"><?php _e('Phone''modern'); ?> *</label>
                            <?php ItemForm::contact_phone_text(); ?>
                        </div>

And this one in the Item.Form.class.php

Code: [Select]
static public function contact_phone_text($item = null) {
            if($item==null) { $item = osc_item(); };
            if( Session::newInstance()->_getForm('contactPhone') != "" ) {
                $item['s_contact_phone'] = Session::newInstance()->_getForm('contactPhone');
            }
            parent::generic_input_text('contactPhone', (isset($item['s_contact_phone'])) ? $item['s_contact_phone'] : null);
            return true;
        }

The problem is whatever i write in this new field, the value that appears in the database is null.

What i´m doing wrong? Can you help me?

Grateful

put this Code in item.post.php.........For modern Theme

 <!-- seller info -->
                    <?php if(!osc_is_web_user_logged_in() ) { ?>
                    <div class="box seller_info">
                        <h2><?php _e("Anbieter information", 'modern'); ?></h2>
                        <div class="row">
                            <label for="contactName"><?php _e('Name', 'modern'); ?></label>
                            <?php ItemForm::contact_name_text(); ?>
                        </div>
<div class="row">
                            <label for="phone">Mobil</label>
                            <input id="cityArea" type="text" name="cityArea" value="" /><input id="cityAreaId" type="hidden" name="cityAreaId" value="" />                       
                            </div>
                        <div class="row">
                            <label for="contactEmail"><?php _e('E-Mail', 'modern'); ?> *</label>
                            <?php ItemForm::contact_email_text(); ?>
                        </div>
                        <div class="row">
                            <div style="width: 120px;text-align: right;float:left;">
                                <?php ItemForm::show_email_checkbox(); ?>
                            </div>
                            <label for="showEmail" style="width: 250px;"><?php _e('E-Mail Adresse anzeigen', 'modern'); ?></label>
                        </div>
                    </div>
                    <?php }; ?>
                    <?php ItemForm::plugin_post_item(); ?>
                    <?php if( osc_recaptcha_items_enabled() ) {?>
                    <div class="box">
                        <div class="row">
                            <?php osc_show_recaptcha(); ?>
                        </div>
                    </div>
                    <?php }?>
                <div class="clear"></div>
                <button  type="submit"><?php _e('Absenden', 'modern'); ?></button>
                </fieldset>
            </form>
        </div>
        <?php osc_current_web_theme_path('footer.php'); ?>
    </body>
</html>


and this Code in Item.php......Modern Theme

<div id="contact">
                    <h2><?php _e("Anbieter kontaktieren", 'modern'); ?></h2>

                    <?php if( osc_item_is_expired () ) { ?>
                        <p>
                            <?php _e("Das Inserat ist abgelaufen!. Kein Kontakt mehr m&ouml;glich.", 'modern'); ?>
                        </p>
                    <?php } else if( ( osc_logged_user_id() == osc_item_user_id() ) && osc_logged_user_id() != 0 ) { ?>
                        <p>
                            <?php _e("Das ist ihr eigenes Inserat.", 'modern'); ?>
                        </p>
                    <?php } else if( osc_reg_user_can_contact() && !osc_is_web_user_logged_in() ) { ?>
                        <p>
                            <?php _e("Du musst Dich einloggen oder ein Konto erstellen, um den Inserenten zu kontaktieren", 'modern'); ?>
                        </p>
                        <p class="contact_button">
                            <strong><a href="<?php echo osc_user_login_url(); ?>"><?php _e('Einloggen', 'modern'); ?></a></strong>
                            <strong><a href="<?php echo osc_register_account_url(); ?>"><?php _e('Registrieren Sie sich für ein kostenloses Konto', 'modern'); ?></a></strong>
                        </p>
                    <?php } else { ?>
                        <?php if( osc_item_user_id() != null ) { ?>
                            <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>
                        <?php } else { ?>
                            <p class="name"><?php _e('Name', 'modern') ?>: <?php echo osc_item_contact_name(); ?></p>
                        <?php } ?>
                        <?php if( osc_item_show_email() ) { ?>
                            <p class="email"><?php _e('E-Mail', 'modern'); ?>: <?php echo osc_item_contact_email(); ?></p>
                        <?php } ?>

                        <?php if( osc_item_city_area() ) { ?>
                            <p class="phone"><?php _e('Mobil', 'modern'); ?>: <?php echo osc_item_city_area(); ?></p>
                        <?php } ?>


                       
                        <?php if ( osc_user_phone() != '' ) { ?>
                            <p class="phone"><?php _e("Tel", 'modern'); ?>.: <?php echo osc_user_phone(); ?></p>
                        <?php } ?>
                        <ul id="error_list"></ul>
                        <?php ContactForm::js_validation(); ?>
                        <form action="<?php echo osc_base_url(true); ?>" method="post" name="contact_form" id="contact_form">
                            <?php osc_prepare_user_info(); ?>
                            <fieldset>
                                <label for="yourName"><?php _e('Ihr Name', 'modern'); ?>:</label> <?php ContactForm::your_name(); ?>
                                <label for="yourEmail"><?php _e('Ihre E-Mail Adresse', 'modern'); ?>:</label> <?php ContactForm::your_email(); ?>
                                <label for="phoneNumber"><?php _e('Phone number', 'modern'); ?> (<?php _e('optional', 'modern'); ?>):</label> <?php ContactForm::your_phone_number(); ?>
                                <?php osc_run_hook('item_contact_form', osc_item_id()); ?>
                                <label for="message"><?php _e('Nachricht', 'modern'); ?>:</label> <?php ContactForm::your_message(); ?>
                                <input type="hidden" name="action" value="contact_post" />
                                <input type="hidden" name="page" value="item" />
                                <input type="hidden" name="id" value="<?php echo osc_item_id(); ?>" />
                                <?php if( osc_recaptcha_public_key() ) { ?>
                                <script type="text/javascript">
                                    var RecaptchaOptions = {
                                        theme : 'custom',
                                        custom_theme_widget: 'recaptcha_widget'
                                    };
                                </script>
                                <style type="text/css"> div#recaptcha_widget, div#recaptcha_image > img { width:280px; } </style>
                                <div id="recaptcha_widget">
                                    <div id="recaptcha_image"><img /></div>
                                    <span class="recaptcha_only_if_image"><?php _e('Geben Sie den Code ein','modern'); ?>:</span>
                                    <input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
                                    <div><a href="javascript:Recaptcha.showhelp()"><?php _e('Hilfe', 'modern'); ?></a></div>
                                </div>
                                <?php } ?>
                                <?php osc_show_recaptcha(); ?>
                                <button type="submit"><?php _e('Senden', 'modern'); ?></button>
                            </fieldset>
                        </form>
                    <?php } ?>
                </div>
            </div>
        </div>
        <?php osc_current_web_theme_path('footer.php'); ?>
    </body>
</html>

TheDeadLives

  • Sr. Member
  • ****
  • Posts: 279
Re: New Field in item-post.php help
« Reply #5 on: September 13, 2013, 12:38:33 am »
Ok, i have found what was happening. Now everything work ok. Tomorrow i will post the code.

strata

  • Sr. Member
  • ****
  • Posts: 411
  • Always good, always...
Re: New Field in item-post.php help
« Reply #6 on: September 13, 2013, 11:59:45 am »
Ok, i have found what was happening. Now everything work ok. Tomorrow i will post the code.
I'm waiting the fix code because need to add the form on the item-post for unregistered member  :P

TheDeadLives

  • Sr. Member
  • ****
  • Posts: 279
Re: New Field in item-post.php help
« Reply #7 on: September 15, 2013, 12:02:24 am »
So, as promised, here is what you need to modify to create a contact field for non-registered users:

At your themes folder, go to item-post.php and add this code where you want the box for contact phone to appear (in this version, the code has a button for hide or show the contact phone in the item page):

Code: [Select]
<div class="row">
                            <label for="contactPhone"><?php _e('Phone''modern'); ?> *</label>
                            <?php ItemForm::contact_phone_text(); ?>
                        </div>
                          <div class="row">
                            <div style="width: 120px;text-align: right;float:left;">
                                <?php ItemForm::show_phone_checkbox(); ?>
                            </div>
                             <label for="showPhone" style="width: 250px;"><?php _e('Show e-mail on the listing page''modern'); ?></label>
                        </div>

Go to you themes folder, item.php and add this where you want the contact phone to appear:

Code: [Select]
<?php if( osc_item_show_phone() ) { ?>
                            <p class="phone"><?php _e('Phone''modern'); ?>: <?php echo osc_item_contact_phone(); ?></p>
                        <?php ?>

Now, the hard part. Go to osclass/oc-includes/osclass/frm and open Item.form.class.php. Add:

Code: [Select]
static public function contact_phone_text($item = null) {
            if($item==null) { $item = osc_item(); };
            if( Session::newInstance()->_getForm('contactPhone') != "" ) {
                $item['s_contact_phone'] = Session::newInstance()->_getForm('contactPhone');
            }
            parent::generic_input_text('contactPhone', (isset($item['s_contact_phone'])) ? $item['s_contact_phone'] : null);
            return true;
        }
static public function show_phone_checkbox($item = null) {
            if($item==null) { $item = osc_item(); };
            if( Session::newInstance()->_getForm('showPhone') != 0) {
                $item['b_show_phone'] = Session::newInstance()->_getForm('showPhone');
            }
            parent::generic_input_checkbox('showPhone', '1', (isset($item['b_show_phone']) ) ? $item['b_show_phone'] : false );
            return true;
        }

Now go to osclass/oc-includes/osclass/ItemActions.php

Change this:

Code: [Select]
if($userId != null) {
                $aItem['contactName']   = $data['s_name'];
                $aItem['contactEmail']  = $data['s_email'];
                Params::setParam('contactName', $data['s_name']);
                Params::setParam('contactEmail', $data['s_email']);
            } else {
                $aItem['contactName']   = Params::getParam('contactName');
                $aItem['contactEmail']  = Params::getParam('contactEmail');
            }

For this:
Code: [Select]
if($userId != null) {
                $aItem['contactName']   = $data['s_name'];
                $aItem['contactEmail']  = $data['s_email'];
                Params::setParam('contactName', $data['s_name']);
                Params::setParam('contactEmail', $data['s_email']);
            } else {
                $aItem['contactName']   = Params::getParam('contactName');
                $aItem['contactEmail']  = Params::getParam('contactEmail');
$aItem['contactPhone']  = Params::getParam('contactPhone');
            }
This:

 
Code: [Select]
$aItem['price']    = !is_null($aItem['price']) ? strip_tags( trim( $aItem['price'] ) ) : $aItem['price'];
            $contactName       = osc_sanitize_name( strip_tags( trim( $aItem['contactName'] ) ) );
            $contactEmail      = strip_tags( trim( $aItem['contactEmail'] ) );
            $aItem['cityArea'] = osc_sanitize_name( strip_tags( trim( $aItem['cityArea'] ) ) );
            $aItem['address']  = osc_sanitize_name( strip_tags( trim( $aItem['address'] ) ) );

For this:

Code: [Select]
$aItem['price']    = !is_null($aItem['price']) ? strip_tags( trim( $aItem['price'] ) ) : $aItem['price'];
            $contactName       = osc_sanitize_name( strip_tags( trim( $aItem['contactName'] ) ) );
            $contactEmail      = strip_tags( trim( $aItem['contactEmail'] ) );
$contactPhone      = strip_tags( trim( $aItem['contactPhone'] ) );
            $aItem['cityArea'] = osc_sanitize_name( strip_tags( trim( $aItem['cityArea'] ) ) );
            $aItem['address']  = osc_sanitize_name( strip_tags( trim( $aItem['address'] ) ) );

This:

Code: [Select]
'fk_i_user_id'          => $aItem['userId'],
                    'dt_pub_date'           => date('Y-m-d H:i:s'),
                    'fk_i_category_id'      => $aItem['catId'],
                    'i_price'               => $aItem['price'],
                    'fk_c_currency_code'    => $aItem['currency'],
                    's_contact_name'        => $contactName,
                    's_contact_email'       => $contactEmail,
                    's_secret'              => $code,
                    'b_active'              => ($active=='ACTIVE'?1:0),
                    'b_enabled'             => 1,
                    'b_show_email'          => $aItem['showEmail'],
                    's_ip'                  => $aItem['s_ip']

For this:

Code: [Select]
'fk_i_user_id'          => $aItem['userId'],
                    'dt_pub_date'           => date('Y-m-d H:i:s'),
                    'fk_i_category_id'      => $aItem['catId'],
                    'i_price'               => $aItem['price'],
                    'fk_c_currency_code'    => $aItem['currency'],
                    's_contact_name'        => $contactName,
                    's_contact_email'       => $contactEmail,
    's_contact_phone'       => $contactPhone,
                    's_secret'              => $code,
                    'b_active'              => ($active=='ACTIVE'?1:0),
                    'b_enabled'             => 1,
                    'b_show_email'          => $aItem['showEmail'],
    'b_show_phone'          => $aItem['showPhone'],
                    's_ip'                  => $aItem['s_ip']
This:

 
Code: [Select]
if( $this->is_admin ) {
                    $aUpdate['fk_i_user_id']    = $aItem['userId'];
                    $aUpdate['s_contact_name']  = $aItem['contactName'];
                    $aUpdate['s_contact_email'] = $aItem['contactEmail'];
                } else {
                    $aUpdate['s_ip'] = $aItem['s_ip'];
                }

For this:

Code: [Select]
  if( $this->is_admin ) {
                    $aUpdate['fk_i_user_id']    = $aItem['userId'];
                    $aUpdate['s_contact_name']  = $aItem['contactName'];
                    $aUpdate['s_contact_email'] = $aItem['contactEmail'];
                    $aUpdate['s_contact_phone'] = $aItem['contactPhone'];
                } else {
                    $aUpdate['s_ip'] = $aItem['s_ip'];
                }

Now in osclass/oc-includes/osclass/installer/struct.sql. Modify this:

Code: [Select]
CREATE TABLE /*TABLE_PREFIX*/t_item (
    pk_i_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    fk_i_user_id INT(10) UNSIGNED NULL,
    fk_i_category_id INT(10) UNSIGNED NOT NULL,
    dt_pub_date DATETIME NOT NULL,
    dt_mod_date DATETIME NULL,
    f_price FLOAT NULL,
    i_price BIGINT(20) NULL,
    fk_c_currency_code CHAR(3) NULL,
    s_contact_name VARCHAR(100) NULL,
    s_contact_email VARCHAR(140) NULL,
    s_ip VARCHAR(64) NOT NULL DEFAULT '',
    b_premium TINYINT(1) NOT NULL DEFAULT 0,
    b_enabled TINYINT(1) NOT NULL DEFAULT 1,
    b_active TINYINT(1) NOT NULL DEFAULT 0,
    b_spam TINYINT(1) NOT NULL DEFAULT 0,
    s_secret VARCHAR(40) NULL,
    b_show_email TINYINT(1) NULL,
    dt_expiration datetime NOT NULL DEFAULT '9999-12-31 23:59:59',

        PRIMARY KEY (pk_i_id),
        FOREIGN KEY (fk_i_user_id) REFERENCES /*TABLE_PREFIX*/t_user (pk_i_id),
        FOREIGN KEY (fk_i_category_id) REFERENCES /*TABLE_PREFIX*/t_category (pk_i_id),
        FOREIGN KEY (fk_c_currency_code) REFERENCES /*TABLE_PREFIX*/t_currency (pk_c_code),

        INDEX (fk_i_user_id),
        INDEX idx_s_contact_email (s_contact_email(10)),
        INDEX (fk_i_category_id),
        INDEX (fk_c_currency_code),
        INDEX idx_pub_date (dt_pub_date),
        INDEX idx_price (i_price)
) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';

For this:

Code: [Select]
CREATE TABLE /*TABLE_PREFIX*/t_item (
    pk_i_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    fk_i_user_id INT(10) UNSIGNED NULL,
    fk_i_category_id INT(10) UNSIGNED NOT NULL,
    dt_pub_date DATETIME NOT NULL,
    dt_mod_date DATETIME NULL,
    f_price FLOAT NULL,
    i_price BIGINT(20) NULL,
    fk_c_currency_code CHAR(3) NULL,
    s_contact_name VARCHAR(100) NULL,
    s_contact_email VARCHAR(140) NULL,
    s_contact_phone VARCHAR(15) NULL,
    s_ip VARCHAR(64) NOT NULL DEFAULT '',
    b_premium TINYINT(1) NOT NULL DEFAULT 0,
    b_enabled TINYINT(1) NOT NULL DEFAULT 1,
    b_active TINYINT(1) NOT NULL DEFAULT 0,
    b_spam TINYINT(1) NOT NULL DEFAULT 0,
    s_secret VARCHAR(40) NULL,
    b_show_email TINYINT(1) NULL,
    b_show_phone TINYINT(1) NULL,
    dt_expiration datetime NOT NULL DEFAULT '9999-12-31 23:59:59',

        PRIMARY KEY (pk_i_id),
        FOREIGN KEY (fk_i_user_id) REFERENCES /*TABLE_PREFIX*/t_user (pk_i_id),
        FOREIGN KEY (fk_i_category_id) REFERENCES /*TABLE_PREFIX*/t_category (pk_i_id),
        FOREIGN KEY (fk_c_currency_code) REFERENCES /*TABLE_PREFIX*/t_currency (pk_c_code),

        INDEX (fk_i_user_id),
        INDEX idx_s_contact_email (s_contact_email(10)),
        INDEX (fk_i_category_id),
        INDEX (fk_c_currency_code),
        INDEX idx_pub_date (dt_pub_date),
        INDEX idx_price (i_price)
) ENGINE=InnoDB DEFAULT CHARACTER SET 'UTF8' COLLATE 'UTF8_GENERAL_CI';

In helpers, open hPreference.php. And add:

Code: [Select]
function osc_contact_phone() {
        return(getPreference('contactPhone'));
    }

And, still in the helpers paste, open hItems.php and add this:

Code: [Select]
function osc_item_show_phone() {
        return (boolean) osc_item_field("b_show_phone");
    }

Very IMPORTANT - go to your themes folder and open style.css Add this code:

Code: [Select]
.add_item input#showPhone { border:1px solid #BBB; padding:7px 7px 6px; width:20px; }
That's all, now you have a phone field for all users, in the item-post page.

There is a little problem, with the button of hide/show phone number. The box is out of place. If you could help me fix this problem it would be great
« Last Edit: September 15, 2013, 10:58:08 pm by TheDeadLives »

strata

  • Sr. Member
  • ****
  • Posts: 411
  • Always good, always...
Re: New Field in item-post.php help
« Reply #8 on: September 15, 2013, 03:36:09 am »
Thank you @QTheDeadLives very need this tuts, good job :)

TheDeadLives

  • Sr. Member
  • ****
  • Posts: 279
Re: New Field in item-post.php help
« Reply #9 on: September 15, 2013, 03:41:01 am »
Thank you @QTheDeadLives very need this tuts, good job :)

You are welcome. Took a little bit to understand how to make it. But i must warn you, the hide/show box stays misaligned. Already opened a topic to see if someona can help

byteGator

  • Osclass Hero
  • Sr. Member
  • *
  • Posts: 346
  • Simple Mind is a Beautiful Mind
Re: New Field in item-post.php help
« Reply #10 on: September 15, 2013, 07:57:36 am »
Hi TheDeadLives

Sorry, I create same post on this topik at http://forums.osclass.org/themes/. I don't know that you already create this post.

I just want to add that osc_contact_phone at helpers is not needed. This function is never called.

Regards.

TheDeadLives

  • Sr. Member
  • ****
  • Posts: 279
Re: New Field in item-post.php help
« Reply #11 on: September 15, 2013, 06:42:37 pm »
Already saw that byteGator, sorry for the mistake  :-\.

My code is a little different, i have a hide/show button to show the phone number in item page. So, both codes are good.

Quote
I just want to add that osc_contact_phone at helpers is not needed. This function is never called.

For the hide/show checkbox we need to use it, i think  :D
« Last Edit: September 15, 2013, 10:58:30 pm by TheDeadLives »

aks

  • Full Member
  • ***
  • Posts: 179
Re: New Field in item-post.php help
« Reply #12 on: September 30, 2013, 09:27:48 pm »
WONDERFUL DEAR MEMBER - TheDeadLives ... I APPRECIATE YOUR HARD WORK AND THANKS FOR SHARING SUCH FEATURE...
THIS FORUM HAS HIDDEN TREASURE...
:-)

STAY BLESSED.
AKS

aks

  • Full Member
  • ***
  • Posts: 179
Re: New Field in item-post.php help
« Reply #13 on: September 30, 2013, 11:13:30 pm »
DONE ALL ABOVE
WHEN I SUBMIT AD,MESSAGE APPEARS TO VALIDATE LISTING
BUT AD NOT SAVING
« Last Edit: October 01, 2013, 12:13:09 am by aks »

mr_ixs

  • Jr. Member
  • **
  • Posts: 53
Re: New Field in item-post.php help
« Reply #14 on: October 03, 2013, 03:21:45 pm »
Thats true when you do everything, and whenyou ad post nothig will be added.