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"
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 .
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();
?>
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 .
Comment