<div><a class="post_userlink" href="javascript:addNickname(\''.$p['author'].'\');" title="'.$_LANG['ADD_NICKNAME'].'"/>'.$p['author'].'</a></div>';
Версия 1.10.1
<div><a class="post_userlink" href="javascript:addNickname(\''.$p['author'].'\');" title="'.$_LANG['ADD_NICKNAME'].'"/>'.$p['author'].'</a></div>';
Видимо никому не нужно...
$nickname = cmsCore::request('nickname', 'str', '');
<span class="cmm_author"><a href="javascript:void(0)" onclick="addComment('{$target|escape:'html'}', '{$target_id}', {$comment.id}, '[b]{$comment.author.nickname}[/b],')" title="{$LANG.ADD_NICKNAME}" class="ajaxlink">{$comment.author.nickname}</a> {if $is_admin && $comment.ip}({$comment.ip}){/if}</span>
function addComment(target, target_id, parent_id, nickname){ $('.cm_addentry').remove(); $('.cm_add_link').show(); $link_span = $('#cm_add_link'+parent_id); old_html = $link_span.html(); loading_img = '<img src="/images/ajax-loader.gif"/>'; $link_span.html(loading_img); $.post('/components/comments/addform.php', {target: target, target_id: target_id, parent_id: parent_id, nickname: nickname}, function(data) { if(data){ $("#cm_addentry"+parent_id).html(data).fadeIn(); $('#content').focusToEnd(); $().br; $link_span.html(old_html).hide(); $('#submit_cmm').click(function() { $('#submit_cmm').prop('disabled', true); $('#cancel_cmm').hide(); $('.submit_cmm').append(loading_img); var options = { success: showResponseAdd, dataType: 'json' }; $('#msgform').ajaxSubmit(options); }); } }); } $.fn.focusToEnd = function() { var v = $(this).val(); $(this).focus().val("").val(v); }); };
cmsPage::initTemplate('components', 'com_comments_add')-> assign('user_can_add', $model->is_can_add)-> assign('is_can_bbcode', $model->is_can_bbcode)-> assign('do', $do)-> assign('is_user', $inUser->id)-> assign('nickname', $nickname." ")-> assign('cfg', $model->config)-> assign('target', $target)-> assign('target_id', $target_id)-> assign('parent_id', $parent_id)-> assign('user_subscribed', cmsUser::isSubscribed($inUser->id, $target, $target_id))-> assign('can_by_karma', $can_by_karma)-> assign('karma_need', $karma_need)-> assign('karma_has', $inUser->karma)-> assign('need_captcha', $need_captcha)-> display('com_comments_add.tpl');