[campsite-dev] changes in the file includes
  • Hi,

    I modified all Campsite PHP files to use $GLOBALS['g_campsiteDir'] as the
    base path when generating file include paths. From now on please DO NOT use
    $_SERVER['DOCUMENT_ROOT'] or $g_documentRoot variables. This is to make
    Campsite directory independent.

    Mugur
  • 4 Comments sorted by
  • Hi all,

    i'm having a problem upgrading from 3.1.3-rc3 to 3.2.3. It fails on
    converted database import:

    Do you want to continue the conversion now? (y/N): y
    UTF8 Converter script version: 3.2.3 "David"
    Converting the database from 'latin1' to 'UTF-8'...

    ERROR!
    Unable to import database. (Command: mysql -u kolubara
    --host=kolubara.info --port306 --password="***" kolubara_cs <
    kolubara_cs-database-utf8.sql)

    Then I tried to import both versions manualy, but i get this error:

    [root@my72px bin]# mysql -u kolubara --host=kolubara.info --port306
    --password="***" kolubara_cs < kolubara_cs-database-utf8.sql
    ERROR 1062 (23000) at line 450: Duplicate entry '10-??????' for key 2

    Original database is this: http://kolubara.info/db/kolubara_cs-database.sql
    Latin1 exported is this:
    http://kolubara.info/db/kolubara_cs-database-latin1.sql
    Converted to UTF: http://kolubara.info/db/kolubara_cs-database-utf8.sql

    Can you please explore what is the problem/rule here, and how can we
    solve such a problems in order to be able to use new campsite
    possibilities.

    Best, Ljuba
  • Ljubo,

    Have you read this?

    http://trac.campware.org/campsite/wiki/FixDatabaseEncoding

    All the best,

    Sava



    From: ljuba.rankovic@mediaonweb.org

    To: campsite-dev@campware.org

    Date: 05/29/2009 12:53 PM

    Subject: [campsite-dev] database conversion






    Hi all,

    i'm having a problem upgrading from 3.1.3-rc3 to 3.2.3. It fails on
    converted database import:

    Do you want to continue the conversion now? (y/N): y
    UTF8 Converter script version: 3.2.3 "David"
    Converting the database from 'latin1' to 'UTF-8'...

    ERROR!
    Unable to import database. (Command: mysql -u kolubara
    --host=kolubara.info --port=3306 --password="***" kolubara_cs <
    kolubara_cs-database-utf8.sql)

    Then I tried to import both versions manualy, but i get this error:

    [root@my72px bin]# mysql -u kolubara --host=kolubara.info --port=3306
    --password="***" kolubara_cs < kolubara_cs-database-utf8.sql
    ERROR 1062 (23000) at line 450: Duplicate entry '10-??????' for key 2

    Original database is this: http://kolubara.info/db/kolubara_cs-database.sql
    Latin1 exported is this:
    http://kolubara.info/db/kolubara_cs-database-latin1.sql
    Converted to UTF: http://kolubara.info/db/kolubara_cs-database-utf8.sql

    Can you please explore what is the problem/rule here, and how can we
    solve such a problems in order to be able to use new campsite
    possibilities.

    Best, Ljuba
  • Hi all,

    does someone have an "best practice" for includes in smarty templates? My problem is that the {{ include file=some_file.tpl }} does not work right with relative filenames. We are developing template sets, which have an tree structure, and we like to rename the base folder without changing all include statements.

    An possible workaround is this:

    {{ assign var="path" value=$smarty.template|dirname }}


    First the current path is extracted from $smarty.template and assigned to $path, which can be used afterwards. Maybee there is an better solution?

    Sebastian
  • Hi Sebastian,

    maybe to do the same thing but in the form of smarty custom plugin function
    (using PHP require/include etc.). After that you can use some function like
    {{ my_include file="some_file.tpl }} and it will work as you wish and will
    be even a little bit faster, I guess. Just an idea, I didn't try to make it
    this way.

    Michal





    |------------>
    | From: |
    |------------>
    >------------------------------------------------------------------------------------------------------------------------------------------------|
    |"Sebastian Goebel" |
    >------------------------------------------------------------------------------------------------------------------------------------------------|
    |------------>
    | To: |
    |------------>
    >------------------------------------------------------------------------------------------------------------------------------------------------|
    | |
    >------------------------------------------------------------------------------------------------------------------------------------------------|
    |------------>
    | Date: |
    |------------>
    >------------------------------------------------------------------------------------------------------------------------------------------------|
    |06/17/2009 04:26 PM |
    >------------------------------------------------------------------------------------------------------------------------------------------------|
    |------------>
    | Subject: |
    |------------>
    >------------------------------------------------------------------------------------------------------------------------------------------------|
    |[campsite-dev] Best practice for template includes |
    >------------------------------------------------------------------------------------------------------------------------------------------------|





    Hi all,

    does someone have an "best practice" for includes in smarty templates? My
    problem is that the {{ include file=some_file.tpl }} does not work right
    with relative filenames. We are developing template sets, which have an
    tree structure, and we like to rename the base folder without changing all
    include statements.

    An possible workaround is this:

    {{ assign var="path" value=$smarty.template|dirname }}


    First the current path is extracted from $smarty.template and assigned to
    $path, which can be used afterwards. Maybee there is an better solution?

    Sebastian