PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > Template last modification date
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Template last modification date

Réponse
 
LinkBack Outils de la discussion
Vieux 17/03/2006, 15h01   #1 (permalink)
Robert Hicks
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Template last modification date

I thought I had seen this somewhere on the site but I have been looking
all morning.

Is there a simple way to display the last mod date of a template?

Robert
  Réponse avec citation
Vieux 17/03/2006, 15h12   #2 (permalink)
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Template last modification date

On Fri, Mar 17, 2006 at 10:01:01AM -0500, Robert Hicks wrote:
> I thought I had seen this somewhere on the site but I have been looking
> all morning.
>
> Is there a simple way to display the last mod date of a template?


No, AFAIK there is not *simple* way. A not so simple way would be
using smarty's internal Smarty::_fetch_resource_info() function. But
this one is internal and not dokumented. You may have to figure it out
yourself and there is no warrenty that it's API may not change some
day (though it is very unlikely that it may change in Smarty-2.x)

> Robert
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEGtHoubKPpFA4n0URAmWFAJ4qo8lvBXN1I9YupDQ+x+ Gn/IMy3wCfUvXt
87V/1D5ssTPs9W6p6HRUiXY=
=5EXa
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 17/03/2006, 15h18   #3 (permalink)
Evan Wagner
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Template last modification date

Change the $filename variable to the path and filename of your template
file:

---- BEGIN PHP CODE --------
$filename = "templates/index.tpl";
$smarty->assign('filemodified', date ("F d Y H:i:s.",
filemtime($filename)));
------ END PHP CODE ---------

----- BEGIN TEMPLATE CODE -----
File last modified on {$filemodified}
----- END TEMPLATE CODE ------

On 3/17/06, Robert Hicks <sigzero@gmail.com> wrote:
>
> I thought I had seen this somewhere on the site but I have been looking
> all morning.
>
> Is there a simple way to display the last mod date of a template?
>
> Robert
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


  Réponse avec citation
Vieux 17/03/2006, 15h51   #4 (permalink)
Robert Hicks
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Template last modification date

Evan Wagner wrote:
> Change the $filename variable to the path and filename of your template
> file:
>
> ---- BEGIN PHP CODE --------
> $filename = "templates/index.tpl";
> $smarty->assign('filemodified', date ("F d Y H:i:s.",
> filemtime($filename)));
> ------ END PHP CODE ---------
>
> ----- BEGIN TEMPLATE CODE -----
> File last modified on {$filemodified}
> ----- END TEMPLATE CODE ------
>
> On 3/17/06, Robert Hicks <sigzero@gmail.com> wrote:


Thank you!

Robert
  Réponse avec citation
Vieux 17/03/2006, 18h13   #5 (permalink)
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Template last modification date

On Fri, Mar 17, 2006 at 10:51:08AM -0500, Robert Hicks wrote:
> Evan Wagner wrote:
> >Change the $filename variable to the path and filename of your template
> >file:
> >
> > ---- BEGIN PHP CODE --------
> >$filename = "templates/index.tpl";
> >$smarty->assign('filemodified', date ("F d Y H:i:s.",
> >filemtime($filename)));
> >------ END PHP CODE ---------
> >
> >----- BEGIN TEMPLATE CODE -----
> >File last modified on {$filemodified}
> >----- END TEMPLATE CODE ------


of course this doesn't work transparently with your smarty
configuration and it does not word for resources.

> >On 3/17/06, Robert Hicks <sigzero@gmail.com> wrote:

>
> Thank you!
>
> Robert
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEGvw6ubKPpFA4n0URAlCIAKCSM+1v3XVlE8upSJjAqV PT9kKpZwCfbMWh
KpF8Wjw835GedTTFyGTkmFg=
=Maol
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 17/03/2006, 18h23   #6 (permalink)
Evan Wagner
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Template last modification date

{flamewar}I think it works fine{/flamewar}

On 3/17/06, messju mohr <messju@lammfellpuschen.de> wrote:
>
> On Fri, Mar 17, 2006 at 10:51:08AM -0500, Robert Hicks wrote:
> > Evan Wagner wrote:
> > >Change the $filename variable to the path and filename of your template
> > >file:
> > >
> > > ---- BEGIN PHP CODE --------
> > >$filename = "templates/index.tpl";
> > >$smarty->assign('filemodified', date ("F d Y H:i:s.",
> > >filemtime($filename)));
> > >------ END PHP CODE ---------
> > >
> > >----- BEGIN TEMPLATE CODE -----
> > >File last modified on {$filemodified}
> > >----- END TEMPLATE CODE ------

>
> of course this doesn't work transparently with your smarty
> configuration and it does not word for resources.
>
> > >On 3/17/06, Robert Hicks <sigzero@gmail.com> wrote:

> >
> > Thank you!
> >
> > Robert
> >
> > --
> > Smarty General Mailing List (http://smarty.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

>
>
>


  Réponse avec citation
Vieux 17/03/2006, 18h39   #7 (permalink)
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Template last modification date

On Fri, Mar 17, 2006 at 01:23:41PM -0500, Evan Wagner wrote:
> {flamewar}I think it works fine{/flamewar}


yes it does work fine. but it does answer the wong question. it
answers "how can i display the modification time of a local file?" and
not "how can I display the modification time of a smarty template?".

> On 3/17/06, messju mohr <messju@lammfellpuschen.de> wrote:
> >
> > On Fri, Mar 17, 2006 at 10:51:08AM -0500, Robert Hicks wrote:
> > > Evan Wagner wrote:
> > > >Change the $filename variable to the path and filename of your template
> > > >file:
> > > >
> > > > ---- BEGIN PHP CODE --------
> > > >$filename = "templates/index.tpl";
> > > >$smarty->assign('filemodified', date ("F d Y H:i:s.",
> > > >filemtime($filename)));
> > > >------ END PHP CODE ---------
> > > >
> > > >----- BEGIN TEMPLATE CODE -----
> > > >File last modified on {$filemodified}
> > > >----- END TEMPLATE CODE ------

> >
> > of course this doesn't work transparently with your smarty
> > configuration and it does not word for resources.
> >
> > > >On 3/17/06, Robert Hicks <sigzero@gmail.com> wrote:
> > >
> > > Thank you!
> > >
> > > Robert
> > >
> > > --
> > > Smarty General Mailing List (http://smarty.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php

> >
> >
> >


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEGwJfubKPpFA4n0URAqSdAJ9TYRLfK1rrgf86NAPsed UMfUbadwCdGke7
cSq8hCJnZnwwhGbM2RkreqI=
=risc
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 20/03/2006, 13h20   #8 (permalink)
Robert Hicks
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Template last modification date

messju mohr wrote:
> On Fri, Mar 17, 2006 at 01:23:41PM -0500, Evan Wagner wrote:
>> {flamewar}I think it works fine{/flamewar}

>
> yes it does work fine. but it does answer the wong question. it
> answers "how can i display the modification time of a local file?" and
> not "how can I display the modification time of a smarty template?".
>

For "my" purposes, they are one and the same. : )

Robert
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h42.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13356 seconds with 16 queries