Discussion: XML ver feed
Afficher un message
Vieux 23/11/2006, 18h44   #2
Pedro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: XML ver feed - updated

Maybe I should explain the underlying reasoning so is real like problem!
(and I don't use caching much).. and some pseudo code..

I maintain a lot of "brochure static" web sites as well as all the
total web 1.0+ applications ones with db/soap etc which I fathered and
baby sit..

and host them as well with me own application's on a virtual server and
use a shared compile_dir. THere are other ftp sites and VPN's etc

Then uploading/upgrading I have no problems with generally just
replacing libs with new eg ADODB/phpmailer and the olde Smarty lib with
new.. Its not likely to break all on the php level. .compile .. then yes

One of the original bummers/mistakes/shit was to include a SMARTY_DIR =
Smarty/libs/*. ie no VER in path as per extracted tarball (wind no
symb) The problem there was that the update of the "engine" to a site
did not update or recompile the templates and they went mad

SO I use the following construct
define('SITE_KEY', 'Some-Wb-siteSite');


and compile with
define('SMARTY_DIR','/lib.etc.php');
require_once(smarty);
define('SMARTY_VERSION', $smarty->version() );
$smarty->compile_dir = '/path to shared/dir/';
$smarty->compile_id = SITE_KEY.SMARTY_VERSION;

All the above is in a common_config.inc.php file.

now what I almost got working is a script that will get the latest
smarty and then nuke the olde compiled templates when the version changes

As well it auto replaces the path.. to smarty version as a define()

I got Ten Smarty-2* dirs atmo so want to resolve this by visit all the
sites once and then implement a more automatic method
../smarty_update.sh
Detected version x.y.z. in /here/path/
Latest: Latest smart version is Smarty-{$REMOTE_VERSION}?
Do you want to download an install latest version ?
Y
;

What this means at the end of the day is the smarty-installer script I
suppose.


Hope it makes sense


pedro morgan


Pedro wrote:
> Would it be possible to create simple file on the smarty.php.net server
> that "contains" the current version...
>
> eg
> smarty-ver.txt and the contents are
> stable=2.6.789
>
> This would be very useful as am working on an install script that either
> snaphot's or fetches tarball (and its working locally in a hyp situation
> prototype)
>
> Part of that action is that it "recompiles" templates and can flush case
> on change etc within an application.
>
> even cleverer would be rss/xml but for my purpose's that would be
> ful to the max.
>
> Am I talking outta my ass ?
>
> Pete

  Réponse avec citation
 
Page generated in 0,06712 seconds with 9 queries