1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

template database

Discussion in 'Sitebuilder 4.2 for Linux' started by om4knowledge, Jun 6, 2008.

  1. om4knowledge

    om4knowledge Guest

    0
     
    I'm running sb 4.2 on cent os (linux).

    Where is my template database located?
    I add a few templates that didn't work and I've heard I should clean up the tables in my database.

    Thanks.
     
  2. Dmitry Frantsev

    Dmitry Frantsev Golden Pleskian

    28
    57%
    Joined:
    Sep 19, 2005
    Messages:
    1,911
    Likes Received:
    0
    After new template is added you need to run:

    # sb_config --update_templates

    Tempalte should be prepared properly. All templates are stored in 'sitebuilder3.template' table:

    mysql> desc sitebuilder3.template;
    +-----------------------+--------------+------+-----+---------+----------------+
    | Field | Type | Null | Key | Default | Extra |
    +-----------------------+--------------+------+-----+---------+----------------+
    | id | int(11) | NO | PRI | NULL | auto_increment |
    | code | varchar(32) | NO | UNI | | |
    | name | varchar(32) | NO | | | |
    | is_active | int(1) | NO | | 1 | |
    | template_category_id | int(11) | NO | | 0 | |
    | version | varchar(16) | NO | | | |
    | defaults | varchar(128) | NO | | | |
    | schemes | varchar(128) | NO | | | |
    | header_upload_support | tinyint(1) | YES | | NULL | |
    | keywords | text | YES | | NULL | |
    +-----------------------+--------------+------+-----+---------+----------------+
    10 rows in set (0.00 sec)
     
  3. om4knowledge

    om4knowledge Guest

    0
     
    D,
    I was told that if you manually remove a template you need to go into the db and clean up the table. I logged in as my primary user and I don't see the database in mysql admin.

    As you know, your crew did my install. How can I clean up my database? Thanks for ALL your work. :)
     
  4. Dmitry Frantsev

    Dmitry Frantsev Golden Pleskian

    28
    57%
    Joined:
    Sep 19, 2005
    Messages:
    1,911
    Likes Received:
    0
    After template is removed, template list should be updated with:

    #sb_config --update_templates

    For example, I want to delete 'zsk-20' template:

    Appropriate record in database exists:
    # mysql -uuser -ppassword sitebuilder3 -e "select * from template where code='zsk-20';"
    +-----+--------+----------------------+-----------+----------------------+---------+---------------------------------+-------------------+-----------------------+----------+
    | id | code | name | is_active | template_category_id | version | defaults | schemes | header_upload_support | keywords |
    +-----+--------+----------------------+-----------+----------------------+---------+---------------------------------+-------------------+-----------------------+----------+
    | 502 | zsk-20 | Photogallery company | 1 | 18 | 4.0.0 | logo.gif|headers1|buttons1|blue | green|blue|yellow | NULL | NULL |
    +-----+--------+----------------------+-----------+----------------------+---------+---------------------------------+-------------------+-----------------------+----------+

    Removing:

    # rm -rf /usr/local/sitebuilder/htdocs/templates/zsk-20/

    Updating database:

    # sb_config --update_templates
    Templates have been successfully updated

    No records after update:
    # mysql -uuser -ppassword sitebuilder3 -e "select * from template where code='zsk-20';"
    #
     
  5. om4knowledge

    om4knowledge Guest

    0
     
    D,
    Your team did my install.
    How can I find (or reset) the user and pass?
    Thanks.
     
  6. Dmitry Frantsev

    Dmitry Frantsev Golden Pleskian

    28
    57%
    Joined:
    Sep 19, 2005
    Messages:
    1,911
    Likes Received:
    0
    Default Sitebuilder administrator credentials are admin/admin. If it was an upgrade administrator password should not be changed. Anyway, you can find information about how to get/reset password here:

    http://kb.odin.com/en/1184
     
Loading...