Home › Forum › Problemi Vari con WP › menu class=lightbox su widget gestione menu
-
AutorePost
-
-
27 Aprile 2011 alle 20:21 #17679vinarcid0810Partecipante
Ragazzi ho realizzato un menu con il widget menu di wordpress 3.0
ora vorrei che uno delle opzioni del menu invece di aprire una pagina html normalmente vorrei che venisse aperta tramite classe lightbox …. invece il widget mi inserisce in automatico la class=”menu item numeropagina”
non so se sono stato chiaro ….
insomma vorrei che il menu abbia questo codice:
< a href= ” pagina html” class = “lightbox” > Pagina </ a >
-
28 Aprile 2011 alle 7:54 #83910SteveAglAmministratore del forum
Non è banale modificare le classi, anche perchè se possibile (dovrebbe esserci qualche filtro) si applicherebbe a tutte…
-
28 Aprile 2011 alle 10:52 #83936vinarcid0810Partecipante
in che senso … dovrebbe esserci qualche filtro? …
SteveAgl allora come potrei bypassere l’ostacolo?
-
28 Aprile 2011 alle 10:59 #83937SteveAglAmministratore del forum
i filtri di WP ma se domandi mi sa che la programmazione di un filtro è oltre le tue capacità , ma come ho detto mi pare che anche ci fosse, NON si riuscirebbe a rsolvere… perchè il filtro si applicherebbe a tutto dire che non c’è modo o almeno al momento non me ne viene in mente nessuno.
-
28 Aprile 2011 alle 14:12 #83946vinarcid0810Partecipante
ci sono quasi ……..
wordpress ha un opzione nei menu che permette di aggiungere singole classi ad ogni link del menu
andando su “impostazione schermo” e selezionando Classi CSS (opzionale).
ora nel widget del menu mi esce l’opzione per inserire il css … infatti il lightbox funziona (in parte) perkè dal link che inserisco:
http: // 127.0.0.1:8888 /preventivo . htm ? lightbox[iframe] = true&lightbox[width]=920&lightbox[height]= 500
mi elimina in auto le parentesi quadre ... perkè?
-
28 Aprile 2011 alle 15:04 #83947vinarcid0810Partecipante
qual’è la tabella che gestisce i menu …. e se aggiungessi manualmente le parentesi [ ] ?
-
29 Aprile 2011 alle 14:22 #84004vinarcid0810Partecipante
niente zhenya ho provato inserendo
%5B e %5D ma non funziona ….
mentre se inserisco il link sopra indicato per linkare una parola del post funziona …. perchè le parentesi [] inserite nel link (finestra worpdress) rimangono tali …
non so che fare sono bloccato … per una cavolata
-
29 Aprile 2011 alle 14:33 #84005zhenyaPartecipante
La url codificata è questa:
preventivo.htm?lightbox%5Biframe%5D=true&lightbox%5Bwidth%5D=920&lightbox%5Bheight%5D=%20500
I risultati invece non li posso conoscere, giacché ho solo apportato il contributo sul tema di come devono essere codificati certi caratteri nelle url..
In basso a questa pagina c’è un campo per la codifica:
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
-
29 Aprile 2011 alle 14:44 #84006vinarcid0810Partecipante
si zhenya capito giustamente è come dici tu … ma ti ripeto che mettendo la url che dici tu il risultato è negativo ….
leggevo che su wordpress c’è una funzione che rimuove le parentesi quadre dall’url
questa:
function wp_sanitize_redirect($location)
leggi qui
http://core.trac.wordpress.org/ticket/17052
ho provato a modificare il codice del file pluggable.php
da
* @return string redirect-sanitized URL
**/
function wp_sanitize_redirect($location) {
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!]|i', '', $location);
$location = wp_kses_no_null($location);
a
* @return string redirect-sanitized URL
**/
function wp_sanitize_redirect($location) {
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!]|i', '', $location);
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%![]]|i', '', $location);
$location = wp_kses_no_null($location);
ma il risultato è sempre quello NEGATIVO.... il widget del menu elimina in auto le parentesi []
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.