Archives

Entries Tagged 'js'

Problèmes Register Plus Arrangement prise après avoir déménagé à WordPress 2.7

Nous avons tous probablement familier avec le plugin très utile - Register Plus .

Après le passage à la version 2.7 de WordPress, plusieurs problèmes ont été additifs;

  1. Essais de résistance d'inscription mot de passe ne fonctionne pas.
  2. Problème de fichier Common.js (s wp-admin/js annuaire). Fonction GetAllUserSettings (): variable UserSettings n'est pas défini.
  3. Après avoir téléchargé l'image personnalisée - personnellement connecter / fichier Lharsh ne fonctionne plus.

Les développeurs de mod sans doute "oublié" de prendre un patch série version 2.7, bien que plusieurs mois se sont écoulés bonne.

Merci à la communauté WordPress est une solution à ces problèmes (crédit à MarQ_ZA Val - Mdvaldosta la solution).

La force de mot de passe Modification de contrôle problème -

Ouvrez le fichier de registre-plus.php dans le répertoire / wp-content/plugins/register-plus /, et chercher la section suivante:

if ( strength == pwsL10n.bad ) {
jQuery(res).addClass('bad');
jQuery(res).html( pwsL10n.bad );
}
else if ( strength == pwsL10n.good ) {
jQuery(res).addClass('good');
jQuery(res).html( pwsL10n.good );
}
else if ( strength == pwsL10n.strong ) {
jQuery(res).addClass('strong');
jQuery(res).html( pwsL10n.strong );
}
else {
// this catches 'Too short' and the off chance anything else comes along
jQuery(res).addClass('short');
jQuery(res).html( pwsL10n.short );
}

לאחר שמצאתם את המקטע, החליפו אותו בקוד הבא:

if ( strength == 2 ) {
jQuery(res).addClass('bad');
jQuery(res).html( pwsL10n.bad );
}
else if ( strength == 3 ) {
jQuery(res).addClass('good');
jQuery(res).html( pwsL10n.good );
}
else if ( strength == 4 ) {
jQuery(res).addClass('strong');
jQuery(res).html( pwsL10n.strong );
}
else {
// this catches 'Too short' and the off chance anything else comes along
jQuery(res).addClass('short');
jQuery(res).html( pwsL10n.short );
}

תיקון הבעיה בקובץ commen.js -

פתחו את הקובץ commen.js הנמצא בתקייה /wp-admin/js/ , וחפשו את המקטע הבא:

// Returns all settings as js object.
function getAllUserSettings() {
return wpCookies.getHash('wp-settings-'+userSettings.uid) || {};
}

והחליפו אותו בקוד הבא:

// Returns all settings as js object.
function getAllUserSettings() {
if (typeof(userSettings) == 'undefined')
{
return {};
}
else
{
return wpCookies.getHash('wp-settings-'+userSettings.uid) || {};
}
}

תיקון בעיית העלאת לוגו מותאם-אישית -

פתחו את הקובץ register-plus.php הנמצא בתקייה /wp-content/plugins/register-plus/ , וחפשו את השורה הבאה:

$upload_dir = ABSPATH . get_option('upload_path');

והחליפו בשורה הבאה:

$upload_dir = get_option('upload_path');

בהצלחה :)

קטגוריות: WordPress Modim תגיות: , , , , ,