MyBB php export -> edit template script.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MyBB php export -> edit template script.

    Yesterday i was thinking ho to edit a mybb template xml based skin ,
    the only one convenient method wich i came with is this !


    The following script splits the xml templates in pieces so you would be able to edit the html elements more easily ,
    but that's not all it can also bind back the parts , joining them into one final xml template working!


    Features :

    - PHP -> OOP CLASS EASY TO MANAGE
    - Exports in .tmpl format from xml file.
    - Re-builder , join all the splited parts toghether.
    - Gets title for exported file from "template header"

    PHP Code:
    <?php
    ###########################
    # MyBB theme (un)+patcher #
    ###########################
    #   forged on gowap.ro    #
    ###########################

    $xml="mobile.xml";

    include
    "make.class.php";


    $skin=file_get_contents($xml);

    #### call the class
    $split=new mybbxsplit();
    #### check for directories required
    $split->check_dirs();
    #### create the header from file
    $split->header_write($skin,$xml);
    #### split templates on files
    $split->template_write($skin);
    #### create standard footer end
    $split->footer_add();



    /* call the class required for patching */
    #$build=new mybbxpatch();
    /*patch modified templates in one compatible xml*/
    #$build->patch_list();




    ?>
    It has lack of features such as showing "success" or "failed" you'll see instead
    a blank page when exporting its successful and lots of errors when something wrong happens.


    The script is fully functional you may customize it as more as you want to .
    Attached Files
    Last edited by just_m3.; 02.06.13, 13:51. Reason: Updated files !!
    This is ten percent luck, twenty percent skill
    Fifteen percent concentrated power of will
    Five percent pleasure, fifty percent pain

    And a hundred percent reason to remember the name!

    #2
    Wow nice..
    CAn i also put this script on my download site?
    how can i run tmpl files on my site?
    thanks..

    Comment


      #3
      Originally posted by daizu View Post
      Wow nice..
      CAn i also put this script on my download site?
      how can i run tmpl files on my site?
      thanks..
      tmpl files are "html templates" you can't run them this script helps you for further edit mybb skins ,
      it splits them into parts so you can edit the templates with a html editor (design purposes).
      This is ten percent luck, twenty percent skill
      Fifteen percent concentrated power of will
      Five percent pleasure, fifty percent pain

      And a hundred percent reason to remember the name!

      Comment

      Working...
      X