MyBB php export -> edit template script.

Started on the old forum in June 2013 · view the original in the archive · old links redirect here

#mybb-template-editor-php

2 replies · 490 views · started 13 years ago · 1 min read

2 participants
just_m3. Developer · 199 posts #1

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
###########################
# 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 .

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!

daizu Newbie · 8 posts #2

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

just_m3. Developer · 199 posts #3

daizu wrote: 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!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close