Íåäàâíî ñòîëêíóëñÿ ñ ñèñåìîé MODx íèêàê íå ìîãó ðàçîáðàòü ïî÷åìó íå ðàáîòàåò ðåãèñòðàöèÿ(ñòðàíèöà ïðîñòî îáíîâëÿåòñÿ è âñå íèêàêèõ ñîîáùåíèé è íàäïèñåé î òîì ÷òî ðåãèñòðàöèÿ ïðîéäåíà óñïåøíî), ñäåëàë âðîäå âñå ïðàâèëüíî,
êîä ñíèïïåòà:
<?php
# WebSignup 1.1
# Created By Raymond Irving April, 2005
#::::::::::::::::::::::::::::::::::::::::
# Usage:
# Allows a web user to signup for a new web account from the website
# This snippet provides a basic set of form fields for the signup form
# You can customize this snippet to create your own signup form
#
# Params:
#
# &tpl - (Optional) Chunk name or document id to use as a template
# &groups - Web users groups to be assigned to users
# &useCaptcha - (Optional) Determine to use (1) or not to use (0) captcha
# on signup form - if not defined, will default to system
# setting. GD is required for this feature. If GD is not
# available, useCaptcha will automatically be set to false;
#
# Note: Templats design:
# section 1: signup template
# section 2: notification template
#
# Examples:
#
# [[WebSignup? &tpl=`SignupForm` &groups=`NewsReaders,WebUsers`]]
# Set Snippet Paths
$snipPath = $modx->config[’base_path’] . "assets/snippets/";
# check if inside manager
if ($m = $modx->insideManager()) {
return ’’; # don’t go any further when inside manager
}
# Snippet customize settings
$tpl = isset($tpl)? $tpl:"";
$useCaptcha = isset($useCaptcha)? $useCaptcha : $modx->config[’use_captcha’] ;
// Override captcha if no GD
if ($useCaptcha && !gd_info()) $useCaptcha = 0;
# setup web groups
$groups = isset($groups) ? explode(’,’,$groups):array();
for($i=0;$i<count($groups);$i++) $groups[$i] = trim($groups[$i]);
# System settings
$isPostBack = count($_POST) && isset($_POST[’cmdwebsignup’]);
$output = ’’;
# Start processing
include_once $snipPath."weblogin/weblogin.common.inc.php";
include_once $snipPath."weblogin/websignup.inc.php";
# Return
return $output;
?>
íà ñàìîé ñòðàíèöå:
[[WebSignup? &groups=`Registered Users`]]
Ïîìîãèòå ïîæ-òà êòî ðàçáèðàåòñÿ â ÌÎDx, ìîæåò êóäà-òî íàäî ïðîïèñàòü àäðåñ ñ êîòîðîãî áóäåò èäòè îòïðàâêà?
разберитесь с кодировкой своего браузера. поставьте кодировку страниц в "автоматический выбор".
"Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich hinein."
Не используйте Revo для "просто сайтов". Используйте Evo
Who can defeat
the Russian bear?
Недавно столкнулся с сисемой MODx никак не могу разобрать почему не работает регистрация(страница просто обновляется и все никаких сообщений и надписей о том что регистрация пройдена успешно), сделал вроде все правильно,
код сниппета:
<?php
# WebSignup 1.1
# Created By Raymond Irving April, 2005
#::::::::::::::::::::::::::::::::::::::::
# Usage:
# Allows a web user to signup for a new web account from the website
# This snippet provides a basic set of form fields for the signup form
# You can customize this snippet to create your own signup form
#
# Params:
#
# &tpl - (Optional) Chunk name or document id to use as a template
# &groups - Web users groups to be assigned to users
# &useCaptcha - (Optional) Determine to use (1) or not to use (0) captcha
# on signup form - if not defined, will default to system
# setting. GD is required for this feature. If GD is not
# available, useCaptcha will automatically be set to false;
#
# Note: Templats design:
# section 1: signup template
# section 2: notification template
#
# Examples:
#
# [[WebSignup? &tpl=`SignupForm` &groups=`NewsReaders,WebUsers`]]
# Set Snippet Paths
$snipPath = $modx->config[’base_path’] . "assets/snippets/";
# check if inside manager
if ($m = $modx->insideManager()) {
return ’’; # don’t go any further when inside manager
}
# Snippet customize settings
$tpl = isset($tpl)? $tpl:"";
$useCaptcha = isset($useCaptcha)? $useCaptcha : $modx->config[’use_captcha’] ;
// Override captcha if no GD
if ($useCaptcha && !gd_info()) $useCaptcha = 0;
# setup web groups
$groups = isset($groups) ? explode(’,’,$groups):array();
for($i=0;$i<count($groups);$i++) $groups[$i] = trim($groups[$i]);
# System settings
$isPostBack = count($_POST) && isset($_POST[’cmdwebsignup’]);
$output = ’’;
# Start processing
include_once $snipPath."weblogin/weblogin.common.inc.php";
include_once $snipPath."weblogin/websignup.inc.php";
# Return
return $output;
?>
на самой странице:
[[WebSignup? &groups=`Registered Users`]]
Помогите пож-та кто разбирается в МОDx, может куда-то надо прописать адрес с которого будет идти отправка?
Хотел бы напомнить, что все сниппеты, использующие формы, особенно регистрация и вход пользователя, должны быть вызваны как некешируемые, т.е. не [[ ]], а [! !] Или же страница, на которой вызывается сниппет, должна быть некешируемой (это выставляется в свойстве документа). иначе будут проблемы.