Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthornicolas2k15
    • CommentTimeNov 24th 2006 edited
     # 1
    Developers of extension, this message is for you.

    Hello community (it's my first message :)),
    I made a command (for Unix-Like users) for convert your extension(s) from the old system (Dictionary) to the new (SetDefinition).

    Original file 'default.php' (mix " with ' and multiple spaces or no space near the '=' for example)
    $Context->Dictionary["Test_1"] = "Blabla 1";
    $Context->Dictionary['Test_2'] = 'Blabla 2';
    $Context->Dictionary["Test_3"] = 'Blabla 3';
    $Context->Dictionary['Test_4'] = "Blabla 4";
    $Context->Dictionary["Test_5"]="Blabla 5";
    $Context->Dictionary["Test_6"]*multiple_spaces_here*=*multiple_spaces_here*"Blabla 6";
    $Context->Dictionary['Test_7'] = $Variable = 'Blabla 7';


    File 'default_with_SetDefinition.php' generated after to have started the command
    (default.php has not been modified !)

    $Context->SetDefinition('Test_1', 'Blabla 1');
    $Context->SetDefinition('Test_2', 'Blabla 2');
    $Context->SetDefinition('Test_3', 'Blabla 3');
    $Context->SetDefinition('Test_4', 'Blabla 4');
    $Context->SetDefinition('Test_5', 'Blabla 5');
    $Context->SetDefinition('Test_6', 'Blabla 6');
    $Context->SetDefinition('Test_7', 'Blabla 7');


    --> The command


    Result : good and unique presentation and SetDefinition used. :)

    Sorry for my bad english, I'm French.
    • CommentAuthorSirNot
    • CommentTimeNov 24th 2006
     # 2
    Not to sound ungrateful or anything, but supposing someone had something like this?$Context->Dictionary['DiscussionFilters'] = $DiscussionFilters = 'Discussion Filters';
    • CommentAuthornicolas2k15
    • CommentTimeNov 24th 2006 edited
     # 3
    Info : If the EXACT pattern is not found in the current line, the line will be not modified, just skipped.
    • CommentAuthornicolas2k15
    • CommentTimeNov 25th 2006 edited
     # 4
    Works now with SirNot's line. :)
    • CommentAuthornicolas2k15
    • CommentTimeNov 25th 2006 edited
     # 5
    Oupssss, sorry !!
    Missing define "space" variable in the "new version".

    N.B. : New post for up (because missing element).
Add your comments
    Username Password
  • Format comments as