Jump to content

Update skin macro system


Guest Luke

Recommended Posts

I find that the macro system is a bit out-dated... The macro's are replaced on-the-fly, and it can be rather un-necessary.

My suggestion is save the macro's in a seperate cache file, along with the skin cache. Something like "macros.php". Then when you build the skins replace the macro's with something like:

{$this->ipsclass->skin->macros['MY_MACRO_HERE']}

The macro's text would be inside the file. Something like:

$this->macros['MY_MACRO_HERE'] = "macro text here";

Not only can you eliminate the search and replace here, you can also add the ability to macro's to use variables. Like the $this->ipsclass->lang_id variable.

If opening another file it more than doing the replaces, then you could always load the macro's as a variable while you load them from the database (but then you couldn't use the variables). Then again if they were cached in the file, then IPB wouldn't have to access the macro database (which I'm not sure if it does... does it?), but it wouldn't have to do the find and replace either.

Also would be neat to store the board wrapper in skin_global.php (or something) instead of loading it out of the table. Could even replace the tags with variables, like with the macro's, to eliminate the search and replace.... heck you could put he macro's in the skin_global.php file as well.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...