Risposte nei forum create
-
AutorePost
-
xdaniel2Partecipante
Scusate la banalità , ho creato questo semplice plugin.
Non dovrebbe funzionare cosi:
quando un utente si disconnette mi il messaggio
<?php
/*
Plugin Name: m-license-plugin
Plugin URI:
Description: prova
Version: 1.0
Author:
Author URI:
*/
function m_print_comment()
{
?>
<h1>PROVAAAAAAAAAAAAAAAAAAAAAAAAA</h1>
<?php
}
add_action(‘wp_logout’, ‘m_print_comment’);
?>
xdaniel2PartecipanteHo visto l’hook login_form ma il plugin parte subito prima dell’autenticazione a me serve uno che parti subito dopo :S!!! Ho visto che c’è uno wp_login ma nn ho capito quando aggisce in realtà !
xdaniel2PartecipanteOk grazie mille !
xdaniel2PartecipanteOk grazie mille, ho pensato a un altra soluzione, e possibile agganciare un plugin al tasto di collegati della login di defaul ti wp??
Cioè anche lasciando la login invariata posso attraverso un plugin recuperare i dati di quella login per poi effettuare delle operazioni!
xdaniel2Partecipanteforse devo modificare anche il file wp-login.php per catturare i file del mio form sulla sidebar?
xdaniel2PartecipanteNon capisco xke mi da questo errore :
Accesso negato!
Non disponi dei permessi necessari per accedere all’oggetto richiesto, oppure l’oggetto non può essere letto dal server.
il campo action l’ho impostato cosi, premetto che per fini didattici ho wordpress in locale:
<form name=”loginform” id=”loginform” action=”<?php bloginfo(‘siteurl’); ?>http://127.0.0.1:8887/wordpress/wp-login.php?loggedout=true” method=”post”>
Non riesco a capire quale sia l’url precisa di wp-login ho provato a inserire anche solo:
<form name=”loginform” id=”loginform” action=”<?php bloginfo(‘siteurl’); ?>http://127.0.0.1:8887/wordpress/wp-login.php” method=”post”>
ma nada.
xdaniel2PartecipanteGrazie mille!
xdaniel2PartecipanteLa funzione md5 funziona solo nonostante abbia inserito tutti i privilegi mi dice che nn ho abbastanza permessi per accedere alla pagina :S
In pratica perche l’utente registrato non gli è stato assegnato nessun ruolo, eppure in impostazione->generale e selezionato chiunque può iscriversi e come ruolo base ho assegnato il sottoscrittore bah :S!!!
xdaniel2PartecipanteNon è per usi professionali ma per usi didattici, il mio progetto deve essere sviluppato in WP e credo che il prof voglia farci scrivere quanto più codice a mano,
cmq ho trovato anche una funzione per trasformare la password in hash ora la provo spero che basterà per avere almeno una corrispondenza quando dopo andrò a fare il login attraverso WP.
La funzione si chiama proprio md5.(http://it2.php.net/md5).
Non so davvero come ringraziarti, inoltre questo è solo l’inzio poi dopo si va nella parte complicata visto che per quanto riguarda l’autenticazione Radius nn ho trovato molto in rete c’è qualcosa in inglese ma per il resto ancora niente.
xdaniel2PartecipanteHo capito,
quindi in pratica posso fare cosà¬:
– in una pagina di WP (la chiama Registrazione)inserisco questo codice:
<form method="post" action="registrazioni/registra_utente.php">
<p style="text-align: left;">Username: <input name="uuname" type="text" /></p>
<p style="text-align: left;">Password: <input name="password" type="password" /></p>
<p style="text-align: left;">E-mail: <input name="email" type="text" /></p>
<p style="text-align: left;">Nome visualizzato: <input name="dname" type="text" /></p>
<input name="submit" type="submit" value="Registra">
<input type="reset" name="Submit" value="Reset">
</form>
Successivamente inserisco un plug-in, la mia domanda e quindi esiste un plugin con aggangio al tasto 'submit'. In questo modo effettuo una registrazione attraverso i moduli di wordpress e posso riutilizzare anche il login di WP stesso. Solo che non mi trovo perche non so cosa dichiare al posto di:
<form method="post" action="registrazioni/registra_utente.php">
E come poi una volta dichiarato l'aggangio nel plugin va scritta qualche altra cosa nella pagina di Registrazione di WP, anche perche nn ho capito bene come un plugin si riferisce a una pagine/action.
Grazie ancora e perdona la mia inesperienza! -
AutorePost