Home › Forum › Problemi Vari con WP › Localizzare data e ora di un tema
-
AutorePost
-
-
30 Gennaio 2008 alle 21:42 #5691brigittePartecipante
Grazie anche al vostro aiuto ho messo online il mio blog e ne sono contenta.
Ma ora e con calma sto cercando di risolvere piccole imperfezioni e di capire a fondo come funziona la localizzazione di WP, dei plugs e temi.
All’uopo mi sono fatta in locale un’istallazione vergine di WP e del tema Sandbox (che mi da tanta soddisfazione) in inglese. Tramite Poedit ho creato il MO e PO italiano del tema. Nel file |10n.php ho impostato che mi faccia vedere il tema in italiano, mentre tutto il resto rimane in inglese. Cosଠora posso vedere con chiarezza cosa ho tradotto io e dove invece intervenite voi con la traduzione ufficiale di WP e del tema di default.
Allora il mio prb è che vorrei nei META visualizzare solo la data e non anche l’ora, comportamento di default di Sandbox.
Esempio: January 30, 2008 – 8:59
Kubrick invece di default l’ora non la visualizza e quindi non avrei problemi.
Per togliere di torno l’ora (senza intervenire sul codice) non ho trovato altra soluzione che levarla dal campo “Default time format” in “General Options” e potrebbe andare bene. Ma purtroppo in questo modo riesco a levare solo l’ora e non anche il trattino che la congiunge con la data.
Esempio: January 30, 2008 –
Il codice incriminato è questo (copiato fresco, fresco da index.php):
<div class="entry-date">"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></div>
Ovviamente, se dal printf tolgo la entity – il trattino sparisce, ma vorrei veramente limitare i miei interventi al style.css. Riuscite a vedere qualche soluzione o si tratta di un bug di Sandbox?
PS: Ovviamente la entity ha il suo bravo ; (punto e virgola) alla fine ma l’ho dovuto togliere senno questa textarea me la traduce in – (trattino)
-
31 Gennaio 2008 alle 11:11 #50168SteveAglAmministratore del forum
All’uopo mi sono fatta in locale un’istallazione vergine di WP e del tema Sandbox (che mi da tanta soddisfazione) in inglese. Tramite Poedit ho creato il MO e PO italiano del tema. Nel file |10n.php ho impostato che mi faccia vedere il tema in italiano, mentre tutto il resto rimane in inglese. Cosଠora posso vedere con chiarezza cosa ho tradotto io e dove invece intervenite voi con la traduzione ufficiale di WP e del tema di default.
Se il tema carica il suo textdomain e quindi ha la sua localizzazione non viene presa alcuna localizzazione del file di localizzazione di WP che è pensato SOLO per il lato amministrativo. ILl tema di defaul NON è internazionalizzato (I18N) ma localizzzato a mano quindi non interferisce. Ergo cambiare i file core di WP non serve…
levarla dal campo “Default time format” in “General Options” e potrebbe andare bene. Ma purtroppo in questo modo riesco a levare solo l’ora e non anche il trattino che la congiunge con la data.
Esempio: January 30, 2008 –
Il codice incriminato è questo (copiato fresco, fresco da index.php):
<div class="entry-date">"><?php unset($previousday); printf(__('%1$s – %2$s', 'sandbox'), the_date('', '', '', false), get_the_time()) ?></div>
PS: Ovviamente la entity ha il suo bravo ; (punto e virgola) alla fine ma l’ho dovuto togliere senno questa textarea me la traduce in – (trattino)
Qui c’è un errore concettuale. su queste cose NON è possibile intervenire solo via CSS, a meno che il l’ora sia abbia una sua classe è quindi si potrebbe nasconderla con un margin -10000 (che comunque ritengo una porcata). Anche intervenire sulle opzioni di WP NON ha senso perchè non è detto che la data o l’ora non servano in altri punti del tema. Quindi si opera sul php e si elimina l’entità e il comando get_the_time() e si modifica il printf in maniera opportuna. E questa è la SOLA maniera corretta di operare, Sandbox, ma anche altri temi simili pensati come base per generare altri temi solo via CSS presuppongono però che se ne accetti l’impostazione strutturale a livello di HTML e PHP, quindi la presenza di data ed ora, se no si lavora sui file PHP e ci si accontenta di usare lo scheletro semantico del tema rinunciando alle sole modifiche CSScentriche.
Personalmente non ritengo Sandbox ne utile ne pratico, un utente medio non pratico di CSS non ha alcun vantaggio, un bravo designer che conosce bene il CSS non ha bisogno di questa gabbia, meglio a questo punto usare un framework CSS tipo l’ottimo Blueprint per layout con griglia o altri framework fluidi o conaltre impostazioni e sfruttarli per le garanzie di congrenza del layout che offrono ma poi sviluppare autonomamente il “contenuto” del tema. Ma questo è solo il mio parere, mentre l’idea di operare su CSSe su opzioni di WP invece che sui file PHP non è solo un mio suggerimento ma una constatazione di fatto, basata sulla filosofia “costruttiva” di WP.
-
31 Gennaio 2008 alle 11:59 #50174brigittePartecipante
WOW – che spiegazione dettagliata per dirmi che il trattino si toglie solo tramite PHP. Lo sospettavo, ma ne volevo la vostra qutorevole conferma.
Ho descritto il mio setup inglese/italiano solo per far vedere che io le prove le faccio prima di postare, e che del tempo lo investo assai prima di chiedere aiuto a voi, che lavorate volontariamente. E io apprezzo
@SteveAgl: Sanbox si rivolge a quella porzione di sviluppatori che si sentono a loro agio nei CSS o li vogliono imparare davvero. L’ho messo in chiaro fin dall’inizio.
Le vie al blogging sono infinite, e questo è bene.
E consentimi di mettere in chiaro che i margins negativi non sono una procheria, ma bensଠfanno parte degli specs ufficiali. Vengono usati con profitto da tutti i grandi CSSisti ai quali mi ispiro. (Meyer, Zeldman, etc.) Che poi qualcuno li usa per fare delle porcherie tipo cloaking è tutt’altro discorso.
-
31 Gennaio 2008 alle 13:27 #50178NokaoPartecipante
SandBox è il miglior tema in circolazione, e non sono daccordo con l’affermazione “un bravo designer che conosce bene il CSS non ha bisogno di questa gabbia”.
SandBox incarna perfettamente la filosofia di csszengarden e permette(rebbe) di ridurre notevolmente il numero di temi inutili che circolano liberamente per la blogosfera di WordPress.
Infondo tutti i temi fanno le stesse cose, imparare ad usare i css in modo professionale aiuterebbe a ridurre il codice inutile favorendone la modifica in futuro e permettendo anche di astrarre il tema dal blog, cioè io aggiorno il mio sandbox quando esce una nuova versione ed il sito si vede sempre uguale.
Ovviamente talvolta c’è bisogno di spostare qualche cosetta anche in php per non diventare matti, ma la semantica di sandbox è unica al mondo.
E i grabber/spider/SE apprezzano, vel’assicuro.
-
31 Gennaio 2008 alle 13:53 #50184SteveAglAmministratore del forum
@Brigitte bhe no non solo il tratttino visto che per far sparire la data hai usato un metodo non ortodosso ma va benese uno uso il tema sul suo blog, ma non è certo il metodo per fare un tema distribuibile a terzi.
Sul margine negativo non ho detto che è una porcheria generale, che è una porcheria usarlo in quel modo per nascondere un orario che se davvero non serve deve venir semplicemente eliminato!
@Nokao bel discorso… peccato non si possa applicare alle 2000 richieste di come cambio questo o quello che arrivano da utenti WP e che se già fan fatica a metter due righe di php preconfezionate con istruzioni che gli dicono cerca la riga blablabla e sotto incollaci questo… figuriamoci coi css. Sul fatto che i temi faccina tutti le stesse cose.. non concordo assolutamente, sono pochi ma in continua crescita temi con funzioni avanzate, i temi stile journal ad esempio o quelli personalizzabili da pannello di amministrazione in maniera anche molto sofisticata.. la strada è quella, ecco quindi che il codice cambia, si ha necessitò di elementi aggiuntivi anche a livello semantico etc etc.
La filosofia di csszengarden ha poi nella pratica poco seguito, si stanno affermando i framework che sono ad un livello di astrazione maggiore di un tema base ed alla fine csszengarden è molto fico quasi esclusivamente per l’uso di immagini molto belle e ben studiate ma non da nulla di più a livello dei contenuti e non potrebbe.
Il nuovo tema di WPIT è basato su Blueprint, che fornisce una gabbia coerente CCS e lascia lo sviluppo HTML allo sviluppatore… filosofia opposta ma che alla fine sia che utilizzino framework standard che pseudoframework personali è la strada che usano tutti gli sviluppatori professionisti consapevolmente o meno mentre non conosco siti grandi e famosi sviluppati su csszegarden o sandbox…
Sia chiaro poi il mondo web è grande e c’è posto per tutto e tutti… solo che da vecchio informatico ritengo le “religioni” la cosa più stupida dell’informatica e le evito accuratamente, tanto che se capita (pur non essendo un webdesigner) uso Blueprint ma non perderei due minuti a difenderlo contro che ne so le librerie YUI
-
31 Gennaio 2008 alle 15:01 #50188degraPartecipante
@Nokao e Brigitte: penso di aver capito male io, ma mi sembra che vogliate sponsorizare l’uso dei CSS come se fossero una novità .
Io i CSS li uso da moltissimo, e tutti i temi di WP che si trovano in giro (e anche molti plugin) ne fanno uso. Anzi, sono completamente gestiti da CSS. E non potrebbe essere diverso.
Ma non solo, anche quasi tutti i siti di contenuti statici li usano.
Come si fa una pagina “fluida” senza CSS?
Capisco voler essere il più possibile fedeli al W3C, che è uno standard, ma il CSS (che è solo un foglio di stile, come dice il suo nome) non è una filosofia contrapposta all’HTML. Sono due cose diverse: l’HTML determina il contenuto, il CSS la forma. Tutto qui.
Io ho scaricato Sandbox, ed è una scatola vuota: io voglio un tema che faccia ciò che dico io, come dico io. Questo implica lavorare pesantemente sul codice PHP e HTML, e non ci sono santi. Ovvio che per “fare quello che dico io” intendo le varie funioni di WP messe come e dove voglio io nella pagina.
Il mio tema (parecchio semplice, tra l’altro) era originariamente a 2 colonne fisse per Splinder, e ora è a 3 colonne con la centrale fluida per WP, però è predisposto per una ventina di plugin, e NON widget ready. E questo solo col CSS non si può fare.
-
31 Gennaio 2008 alle 15:02 #50189brigittePartecipante
Qui non ci siamo capiti: il mio scopo come ho scritto fin dal primo posting NON è lo sviluppo di un tema WP da vendere ad altri. Anzi se qualcuno copiasse il mio “Brigitte” a bwat.it mi rattristerei pure. àˆ mio personale, seppure con licenza CC.
Io voglio capire, imparare e sperimentare. Se poi in questo percorso mio personale capitano dei soldi – e talvolta capitano, ve lo assicuro – tanto meglio.
E quel che ho appreso lo condivido volentieri con gli altri, nel migliore spirito dell’OpenSource di cui WP fa parte.
Lo sviluppo di WP non è solo PHP. In tal senso ho trovato strano certe affermazioni lette qui che i problemi con i CSS non sarebbero problemi di WP e quindi non andrebbero discussi qui ma su HTML.it. E un pischello alle prime armi (raramente una pischella e del fatto mi dolgo) che ancora crede alle favole (cioé che sia facile usare e personalizzare una cosa sofisticata come WP) dove, di grazia, si deve rivolgere sennò a WPit_IT da dove ha scaricato il pacco?
E per quanto riguarda lo ZenGarden e la Sandbox (che ne è in qualche modo una conseguenza) vorrei invitare a riflettere. Su che cosa si baserebbero oggi gli sviluppatori dei frameworks CSS se non fosse stato per il coraggioso lavoro da pionieri che abbiamo svolto all’epoca in cui il web era pieno di pagine fatte con le tabelle e gli slices da Photoshop e aggiornare/mantenere un sito era un incubo. Per non parlare dei problemi che avevano i disabili con tali siti. Sono contenta di essere stata una di quei pionieri, nel mio piccolo. Dire oggi che lo ZenGarden è un esercizio nell’uso di immagini di background è fin troppo facile e soprattutto poco generoso.
-
31 Gennaio 2008 alle 15:27 #50191SteveAglAmministratore del forum
Ha scaricato il pacco qui ma poi vuole usare il tema scaricato da xyz.com, se chiede perchè il codice che mette in sidebar per mostrare che ne so la tag cloud non funziona (magari copiandolo a dimenticato un apostrofo o un punto e virgola) è una risposta che si può dare perchè generale, riguarda WP. Sul tema no, perchè non possiamo conoscere ile migliaia di temi che esistono,ne possiamo per ogni tema scaricarlo e studiarlo, o meglio a volte lo facciamo, almeno personalmente, a volte apro il sito che da il problema e con qualche strumento della developper toolbar di firefox scopro l’inghippo in un paio di minuti.
Sulla favola che WP sia semplice, qui non lo abbiamo mai detto ne sostenuto anche se E’ semplice ma richiede una sorta di “patente” minima per usarlo, ed un’altra “patente” per farci cose complicate, l’utente medio che non sa nulla di css e html e php può installarlo ed usarlo, ma poi non potrà pretendere di personalizzarlo più di tanto, scelga un tema ben configurabile da pannello, con i widget e si accontenti di ciò… oppure prenda la patente studiando.
Purtroppo pare che mentre è normale che si faccia la patente B per guidare la macchina e non si pretenda poi di andare dal concessionario a chiedergli come si fa a cambiare il cambio o rimappare la centralina, questo nell’informatica non avviene. Soluzione? Nessuna se non educare e far capire che se uno ha limiti tecnici poi dovrà accettare i limiti di utilizzo del prodotto e che se vuole di più o studia prima o lo fa fare a terzi. Sul far fare a terzi… non è detto che debbano essere costi enormi… anzi…
Purtroppo le modifiche ai temi i problemi di CSS sono impegnativi in termini di tempo e permettimi che in forum volontari non è facile trovare chi possa perdere 1 ora su un tema e relativo CSS per risolvere un problema di allineamento o per fare quella cosa strana che è sbocciata nella mente del’utente di WP, idem per chi chiede le soluzioni pronte e cotte, non posso e a volte non voglio perdere 40 minuti per spiegare e scrivere pezzi di codice per chi non sa nulla di PHP che poi magari copia male o inserisce nel posto sbagliato con successivi errori e altre domande, se non sai nulla di PHP rassegnati.. se no le indicazioni che diamo i suggerimenti, lo pseudocodice che spesso scrivo sono sufficienti a chi ne mastica anche poco, poi impazzirà perchè si dimentica un punto e virgola, o non chiuderà una parentesi, ma di certo alla fine saprà quel che ha fatto se domani cambierà tema saprà come rimettere quella pesonalizzzazione ed avrà imparato qualche cosa.
Insomma io ma anche altri preferiamo dare aiuto a chi vuol imparare e ci aiuta a farsi aiutare che a chi vuole risolto il problema e basta come comprare le lasagne in rosticceria.
Su zengarden non rposeguo, non dico non abbia contribuito allo sviluppo del web ma di certo molto molto meno anche solo di un ALA (A List Apart) o di altri siti, blog etc… ma ripeto poi si scade nelle guerre religiose, io non ho idoli diversi da csszengarden.. non ne ho proprio
-
31 Gennaio 2008 alle 16:53 #50195NokaoPartecipante
Ragazzi… non mi metto a rispondere perchè zio CapitanUncino mi conosce da molto tempo e sa che se inizio non finisco più.
Non stiamo assolutamente sponsorizzando l’uso di css, solo cerchiamo di farvi ragionare sulle potenzialità di SandBox, ma poi ognuno come sempre è libero di fare quello che gli pare.
Per quanto riguarda la risposta di SteveAgl, non vedo perchè chi non sa scrivere codice php debba farsi un tema.
Ce ne sono tanti di già fatti e se non è in grado di installarli può chiedere a persone come me e Brigitte che lo facciamo per lavoro.
Ciao
-
31 Gennaio 2008 alle 19:14 #50203brigittePartecipante
ma mi sembra che vogliate sponsorizare l’uso dei CSS
Non era questa la mia intenzione quando mi sono fiduciosamente rivolta a voi con i miei problemi di localizzazione. Ma francamente, trovandomi davanti a dei “vecchi informatici” ho talvolta la sensazione che non guasta parlarne e magari spendere una parola gentile su quel piccolo gioello, nato all’interno della stretta cerchia degli sviluppatori di WP, che è la Sandbox e che NON è un tema, ma un canovaccio per gli artisti dei CSS! Quando vedo uno sviluppatore che usa 100 righe di Javascript per far stare un footer in fondo alla pagina, mi viene voglia di dirgli che basterebbero due height:100% nel CSS. E una terza, ma per far rigare dritto anche quella disgrazia che è IE6.
Apprezzo la semplicità . Rende pure più facile la vita a chi deve mantenere un forum
Purtroppo le modifiche ai temi i problemi di CSS sono impegnativi in termini di tempo
Ne so qualcosa Uso FF e Firebug che per trovare gli inghippi, mi sembra più efficiente che non la Toolbar, che uso di più quando costruisco un CSS. Se rapidamente trovo il problema – e se è facile descrivere la correzione ad un principiante, posto. Altrimenti l’aspirante blogger ha sempre la scelta di studiare e per aiutarlo gli posto qualche URL o il titolo di qualche libro. Se le fonti che indico sono in inglese, come spesso capita, non è colpa mia. Per quanto ne so nessuno dei libri su WP – e ce ne sono – è stato tradotto. All’aspirante blogger la scelta, se studiare l’inglese per poter accedere alla documentazione che poi dovrà studiare, oppure percorrere una strada che più rapidamente lo conduce al blog online e funzionante. Quale potrebbe essere scegliere un altro tema che non dia problemi o leggersi almeno la FAQ qui che è in italiano.
A me sembra che qui fate un ottimo lavoro. Certamente più volte ho nelle vostre risposte trovato le parole chiavi che mi hanno permesso di andare avanti.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.