iDEV Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

IDEVSPOT COMMUNITY FORUMS. -----( ( ( NOT FOR OFFICIAL TECH SUPPORT ) ) )-----

Author Topic: (Solution) How Can I display default text contact info in the listing page ?  (Read 1590 times)

0 Members and 1 Guest are viewing this topic.

nacar

  • Newbie
  • *
  • Gender: Male
  • Posts: 30
    • View Profile
    • WWW
If your customers do not written their contact info in the listing. You can write the automatic text this contact info fields.

Example :
Originially Field => Telephone Number : +44000000000000 or empty
Modified Field  => Telephone Number : Empty or Not Written This Field



Important Warning : Before you take a backup of your old files do strongly remember. Don't forget this! For this reason, you do not responsible for the negative consequences that may arise from transactions. I did it for my own site and I wanted to share with you.


Edit the file to : detail.php (open this file)

Step 1 - Find this code :

Code: [Select]
<?php if ($row[PHONE] != $nil) { ?>
              <tr class="itty_link">
                <td class="padder5">Contact Phone</td>
                <td class="padder5">
                  <?php echo $row[PHONE]; ?>
                </td>
              </tr>
<?PHP } ?>

Step 2 - Replace this :

Code: [Select]
<?php if ($row[PHONE] != $nil) { ?>
              <tr class="itty_link">
                <td class="padder5"><b>Contact Phone</b></td>
                <td class="padder5">
                  <?php echo $row[PHONE]; ?>
                </td>
              </tr>
<?PHP } else { ?>
              <tr class="itty_link" title="This field is empty or not written...">
                <td class="padder5"><b>Contact Phone</b></td>
                <td class="padder5">Not Written</td>
              </tr>
<?PHP } ?>

Statemen About Code :
If the field on database, writing originially data (telephone number)
If the field on database, writing the second part (else / "Not Written"),




Good use.

Screenshot has been added to this message.
« Last Edit: December 22, 2009, 02:05:14 AM by arron »
Logged

USER SIGNATURE :
NacarX
NacarWEB Internet Solutions (Commercial Site)
http://www.nacarweb.com
Using The BizDirectory Script Site
http://www.cekmekoyhizmet.com