Results 1 to 10 of 10

Thread: Adding Custom Fields

  1. #1
    Join Date
    Oct 2003
    Location
    R.T.U
    Posts
    580

    Default Adding Custom Fields

    Can someone explain me with a little more step-by-step on how to add custom fields.

    I tried searching the forums and readin the technotes, but that didnt help.

    I would really appreciate it.

  2. #2
    Join Date
    Oct 2003
    Location
    R.T.U
    Posts
    580

    Default

    anyone

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    89

    Default

    Adding custom fields are only applicable to links and are added from the IndexU control panel clicking on AlterAlter from under Database Tables

    Simply type in your new field name and the type field type. If you find the field type you require is not listed, once you have created your field name you can use something like PHPMyadmin to change the field type from say varchar(255) to text but fields must be created within IndexU before using PHPMyadmin.

    You can see how I have used a number of custom fields by visiting Add a link

    If you would like any further help please get in touch

  4. #4
    Join Date
    Oct 2003
    Location
    R.T.U
    Posts
    580

    Default

    I would like to use the custom fields that already come with indexu...

    I think I know how to do it, but what I completely do not know how to do, is to put then in the form when people add their websites...

    can you help me with this?
    Polo

    --------------------------------------
    Christian Website

  5. #5
    Join Date
    Oct 2003
    Location
    R.T.U
    Posts
    580

    Default

    Anyone?
    Polo

    --------------------------------------
    Christian Website

  6. #6
    Join Date
    Feb 2004
    Posts
    16

    Default

    You have to add them in the database and then call them:

    Database Fields > Alter > add your field say: newname

    then call it with:
    PHP Code:
    <%newname%> 

  7. #7
    Join Date
    Oct 2003
    Location
    R.T.U
    Posts
    580

    Default

    Oh man, Im getting frustrated...

    can someone tell me what I'm doing wrong?

    I altered mysql and added the following:

    version double YES [Change] [Drop]
    Then when to add_form.html and added the following:

    <%version%>
    then went to custom_field_from_rows.html and edited the follwing:

    <tr class="tbl_normal">
    <td valign=top><%version%>d</td>
    <td><%version%></td>
    </tr>
    then finally to msg.php and edited the following:

    // generate form from additional field - integer, float, double, varchar, char, date
    $msg["00001"] = "<input class=text3 type=text name=\"<%version%>\" size=40 value=\"<%version%>\">";
    But nothing happens! can someone tell me what I'm doing wrong pleasE?
    Polo

    --------------------------------------
    Christian Website

  8. #8
    Join Date
    Sep 2002
    Location
    UK
    Posts
    89

    Default

    It would appear that where you are going wrong is in the process of custom fields itself.

    Within the files add_form.html and modify_form.html there is a tag <%custom_fields%>

    This tag is used to compile your custom fields products within IndexU but when the page compiles it will only display the fields as you have named them in IndexU. I have removed this tag and compiled my own froms.

    Here is the complete html from my modify_form.html which should give you a good idea on how to compile your forms.

    <script language="JavaScript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
    }
    //-->
    </script>










    <table width=100% cellpadding="5" cellspacing="0">
    <tr>
    <td valign="top">

    <!-- banner code goes below between the p's -->
    <center>
    <p></p>
    </center>





    <form action="modify.php" method=post>
    <input type=hidden name=pflag value=modify>
    <input type=hidden name=link_id value=<%link_id%>>

    <p><center><font color="Red"><b><%error_msg%></b></font></center></p>

    <table cellpadding='4' cellspacing='1' border='0' align='center' width='90%' class=tbl_border>
    <tr>
    <td class=tbl_caption colspan="2">
    Update your Site
    </td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Title</td>
    <td valign="top"><input class=text3 type=text name=title size=80 value="<%title%>"></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Description</td>
    <td valign="top"><textarea name="description" cols="80" rows="10" wrap="virtual"><%description%></textarea></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Category</td>
    <td><%category%></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Additional Category 1</td>
    <td><%add_cat1%></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Additional Category 2</td>
    <td><%add_cat2%></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Contact Name</td>
    <td valign="top"><input class=text3 type=text name=contact_name size=80 value="<%contact_name%>"></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Keywords up to 3072 characters</td>
    <td valign="top">
    <input class=text3 type=text name=keywords size=80 value="<%keywords%>" maxlength="3072"></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Email</td>
    <td valign="top"><input class=text3 type=text name=email size=80 value="<%email%>"></td>
    </tr>

    <!-- uncomment if you want to generate field automatically -->
    <tr class="tbl_normal">
    <td valign="top">Address</td>
    <td valign="top">
    <input class=text3 type=text name=address size=80 value="<%address%>" maxlength="255"></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Telephone No</td>
    <td valign="top">
    <input class=text3 type=text name=telephone_number size=80 value="<%telephone_number%>" maxlength="255"></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Fax Number</td>
    <td valign="top"><input class=text3 type=text name=fax_number size=80 value="<%fax_number%>" maxlength="255"></td></tr>
    <tr class="tbl_normal">
    <td valign="top">Store logo<br>size up to 120 x 60</td>
    <td valign="top"><%photo_upload%><br><%photo_remove%>
    </td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Shipping Policy<br>HTML may be used</td>
    <td valign="top">
    <textarea class=text3 type=text name=shipping_policy wrap=virtual cols=80 rows=6 wrap=virtual><%shipping_policy%></textarea></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Returns policy<br>HTML may be used</td>
    <td valign="top">
    <textarea class=text3 type=text name=returns_policy wrap=virtual cols=80 rows=6 wrap=virtual><%returns_policy%></textarea></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Security Policy<br>HTML may be used</td>
    <td valign="top">
    <textarea class=text3 type=text name=security_policy wrap=virtual cols=80 rows=6 wrap=virtual><%security_policy%></textarea></td>
    </tr>
    <tr class="tbl_normal">
    <td valign="top">Privacy Policy<br>HTML may be used</td>
    <td valign="top">
    <textarea class=text3 type=text name=privacy_policy wrap=virtual cols=80 rows=6 wrap=virtual><%privacy_policy%></textarea></td>
    </tr>

    <tr class="tbl_normal">

    <td valign="top">Browser Status Bar Message</td>
    <td valign="top">
    <input class=text3 type=text name=status_bar size=80 value="<%status_bar%>" maxlength="255"></td>
    </tr>


    <tr bgcolor="#F1F3F9">
    <td valign="top">Password</td>
    <td>
    <input class=text3 type=password name=password size=20>
    (<a href="send_pwd.php?pflag=lp&lid=<%link_id%>">forgo t your password</a>?)
    </td>
    </tr>

    <tr class="tbl_caption">
    <td colspan="2">
    <center><input type=submit name=submit value="Update your website" class="std_button">
    </center>
    </td>
    </tr>
    </form>
    </table>






    </td>
    </tr>
    </table>

  9. #9
    Join Date
    Feb 2004
    Posts
    16

    Default

    is that what you named the custom tag? version double?

    version (space) double ?

    if so add an underscore as the spaces don't stick, and its not even in your db probably.

    make it: version, version_double, or versiondouble

    and call the tag like this: <%version%>, <%version_double%>, <%versiondouble%>

  10. #10
    Join Date
    Oct 2003
    Location
    R.T.U
    Posts
    580

    Default

    problem fixed thank all very much... indexu sure needs more clear instructions on how to add custom fields
    Polo

    --------------------------------------
    Christian Website

Similar Threads

  1. Replies: 1
    Last Post: 11-04-2003, 11:47 AM
  2. Replies: 4
    Last Post: 05-28-2003, 06:39 AM
  3. Ability to search custom fields
    By Hart_House in forum v3.2
    Replies: 1
    Last Post: 08-07-2002, 01:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •