Results 1 to 5 of 5

Thread: More fields in idx_category ??

  1. #1
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default More fields in idx_category ??

    Hello,
    ok, I can't wait longer for the new version, because perhaps it will come never - sorry dody, but how my spanish wife you said every time "tomorrow".and this nearly since 6 months...

    I want to use more own fields for the category table (idx_category) to use the category "name, "decription", "content", "meta_keyword" and "meta_description" also in english for the english part of my directory.

    My problem how to add these fields and what should I change in the code to use these new fields in all my templates ?

    Hope someone can help.

    Greetings
    Frank

  2. #2
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    211

    Default

    Frank,


    To add the fields in idx_category, you need to add manually (phpMyAdmin will ease you to do that). You also need to change cat_add.php, cat_edit.php, and category.class.php. The template also need to be modified.

    Sofiah

  3. #3
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default Thanks

    Thank you, I will try this, but please ask dody for V3.1.
    We are waiting nearly 6 months...
    Frank

  4. #4
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default uff ;)

    Hello Sofiah,
    Please can you give me a short excample what I have to change / add in category.class.php, then i create a new field for the categories ?
    Greetings
    Frank

  5. #5
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    211

    Default

    Here is the example :

    This is the query in Add function :
    PHP Code:
        $query "insert into $this->table_name
          (name, parent_id, description, image, content, visible, links, permission, meta_keyword, meta_description, registered_only)
          values ('$name', $parent_id, '$description', '$image', '$content', $visible, 0, $permission, '$meta_keyword', '$meta_description', $registered_only)"

    If you add fields myfield1,myfield2 then it will be :
    PHP Code:
        $query "insert into $this->table_name
          (name, parent_id, description, image, content, visible, links, permission, meta_keyword, meta_description, registered_only,myfield1,myfield2)
          values ('$name', $parent_id, '$description', '$image', '$content', $visible, 0, $permission, '$meta_keyword', '$meta_description', $registered_only, '$myfield1', '$myfield2')"

    And the function parameters will be :
    PHP Code:
      function Add($name$parent_id$description$image$content$visible$permission$meta_keyword$meta_description$registered_only$myfield1$myfield2
    Btw, you should add the fields in idx_category first.

Similar Threads

  1. changing requied fields
    By vakil in forum Blocks and Modification
    Replies: 8
    Last Post: 06-09-2007, 10:18 AM
  2. Add Fields To Submit form
    By 4webmasters in forum v5.x
    Replies: 2
    Last Post: 06-17-2004, 11:37 PM
  3. Replies: 4
    Last Post: 05-28-2003, 06:39 AM
  4. Add fields to Detail Page?
    By awebb1 in forum Pre-Sales Questions
    Replies: 5
    Last Post: 09-08-2002, 02:45 PM

Posting Permissions

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