That's what the create_temp() function does in layout/class/Box.php
I used that in an update to the announcement module to split the
view_small and view_full views from using the same content variable.
just call create_temp in update.php.
Yes it's a crap function name. One of the other modules did the same
in one of it's updates.
On 12 Oct 2005, at 13:00, Ken Nordquist wrote:
> Hey Everyone,
>
> I am putting the final touches on the v0.2.0 update to my Nakes module
> (Business / Organization Listings). I added a layout box so I could
> have a random business / organization show on the front page. This is
> not a problem for an original install, but was giving me problems with
> an update because there was no set way to update mod_layout_box.
> Following is the code which will do just that...
>
> And oddly enough, it works!
>
>
> **********
> $themeList = PHPWS_Layout::get_themes();
>
> foreach ($themeList as $theme){
> if(!$_SESSION["OBJ_layout"]->_addBox($theme, '*mod_title*',
> '*content_var*', '*theme_var*', 0)) {
> $status = 0;
> }
> }
>
> if (isset($_SESSION["OBJ_layout"])){
> $_SESSION["OBJ_layout"]->initializeLayout();
> $_SESSION["OBJ_layout"]->loadBoxInfo();
> }
> **********
>
> *mod_title*, *content_var*, and *theme_var* above are not literal,
> you will have to use variables or hard code the appropriate names.
> For my purposes, I hard coded mod_title, content_var, and theme_var.
>
> The next logical step would be to have a way to synchronize the box
> locations for all themes using a specific theme. For example, I
> just spent an hour or so arranging the boxes for one theme, then
> install a new theme and do not want to go through the process
> again... I can just synchronize the themes.
>
> HTH,
>
> Ken
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads,
> discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Phpwebsite-developers mailing list
> Php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers
>
>
>
Shaun
aegis design - http://www.aegisdesign.co.uk
aegis hosting - http://www.aegishosting.co.uk
|