Home › Forum › Plugin e temi di WP › PLUGIN PER IMPOSTARE DATA E ORA CORRENTE SUL BLOG
-
AutorePost
-
-
6 Giugno 2008 alle 19:17 #6892IlbellodelwebPartecipante
Ciao!!
premetto che siete geniali (soprattutto wolly, un mito!)
Esiste un plugin che ti permetta di avere data ed ora sul tuo blog wp?
fatemi sapere presto, please
Damiano
-
6 Giugno 2008 alle 19:35 #54441ondapiPartecipante
http://www.wpitaly.it/forum/topic/7389
in www trovi anche script per date in php o simpatice animazioni in flash e roba del genere
-
6 Giugno 2008 alle 19:54 #54443IlbellodelwebPartecipante
Che significa in www ?
l’ho provata, ma mi sembra mooolto semplica, questa, nessuna animazione o altro
-
6 Giugno 2008 alle 20:00 #54444IlbellodelwebPartecipante
Altra cosa: <?php
setlocale(LC_TIME, “italian”);
setlocale(LC_TIME, “it_IT”);
echo htmlentities(strftime(“%A, %e %B %Y “));
?>
ok, ma qual’è il tag per metterlo al lato destro?
-
7 Giugno 2008 alle 6:24 #54449ondapiPartecipante
Che significa in www ?
intendevo nella rete, con google trovi diversa roba
l’ho provata, ma mi sembra mooolto semplice…
si in effetti restituisce solo un file di testo che puoi tranquillamente formattare inserendolo in un div e applicando un css opportuno
-
7 Giugno 2008 alle 23:00 #54483RobertoRuoccoPartecipante
Ciao,
puoi essere più chiaro?
Dove devo inserire ed in quale parte
<?php
setlocale(LC_TIME, “italian”);
setlocale(LC_TIME, “it_IT”);
echo htmlentities(strftime(“%A, %e %B %Y “));
?>
Non vorrei fare fesserie.
Grazie
Roberto
-
8 Giugno 2008 alle 8:42 #54486ondapiPartecipante
lo script va inserito nei file del tema grafico in uso
tipo in fondo all’header.php o all’inizio dell’index.php o del sidebar.phh, ovviamente devi stare attento ai div, ti convienet fare delle prove in locale prima di combinare pasticci nel server, eventualmente fai un backup del file modificato prima di…
-
5 Settembre 2008 alle 19:07 #57367milesfaberPartecipante
Ho scritto e usato questo codice per visualizzare una navigazione per mese solo se viene richiesto un mese dall’archivio:
<?php
// se richiedo un mese dell’archivio
if (is_month()) {
// recupero il mese richiesto che è nella forma: aaaamm e divido l’anno dal mese
$datarichiesta = $_GET;
$meserichiesto = substr($datarichiesta,4,2);
$annorichiesto = substr($datarichiesta,0,4);
// recupero il mese e l’anno correnti
$mesecorrente = date(‘m’, strtotime($date));
$annocorrente = date(‘Y’, strtotime($date));
// imposto il mese e l’anno in cui inizia il blog
$annoinizio = 2003;
$meseinizio = 1;
// imposto le query per i link al mese precedente e successivo
if ($meserichiesto != 1) {
$mesemeno = $meserichiesto-1;
if ($mesemeno<10) $mesemeno = “0”.$mesemeno;
$annomeno = $annorichiesto;
$querymeno = $annomeno.$mesemeno;
} else {
$mesemeno = 12;
$annomeno = $annorichiesto-1;
$querymeno= $annomeno.$mesemeno;
}
if ($meserichiesto != 12) {
$mesepiu = $meserichiesto+1;
if ($mesepiu<10) $mesepiu = “0”.$mesepiu;
$annopiu = $annorichiesto;
$querypiu= $annopiu.$mesepiu;
} else {
$mesepiu = “01”;
$annopiu = $annorichiesto+1;
$querypiu= $annopiu.$mesepiu;
}
//se esiste precedente mostro link
if ($annorichiesto>$annoinizio) {
echo “<a href='”;
bloginfo(‘url’);
echo “?m=”.$querymeno.”‘>« Mese precedente | “;
} elseif ($annorichiesto==$annoinizio && $meserichiesto>$meseinizio) {
echo “<a href='”;
bloginfo(‘url’);
echo “?m=”.$querymeno.”‘>« Mese precedente | “;
}
//mostro mese attualmente visualizzato
$meseanno = single_month_title(‘ ‘,false);
echo ” “.$meseanno.” “;
//se esiste successivo mostro link
if ($annorichiesto<$annocorrente) {
echo ” | <a href='”;
bloginfo(‘url’);
echo “?m=”.$querypiu.”‘>Mese successivo »”;
} elseif ($annorichiesto==$annocorrente && $meserichiesto<$mesecorrente) {
echo ” | <a href='”;
bloginfo(‘url’);
echo “?m=”.$querypiu.”‘>Mese successivo »”;
}
}
?>
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.