Открыть \components\users\frontend.php
Найти
$usr['comments_count'] = (int)$inDB->rows_count('cms_comments', "user_id=$id AND published=1");
$usr['articles_count'] = (int)$inDB->rows_count('cms_content', "user_id=$id AND published=1");
Открыть \templates\_default_\components\com_users_profile.tpl
Найти
{if $cfg.sw_board} <div id="usr_board"> <a href="/users/{$usr.id}/board.html">{$LANG.ADVS}</a> ({$usr.board_count}) </div> {/if}
<div id="usr_articles"> <a href="/my-{$usr.id}.html">Статей</a> ({$usr.articles_count}) </div>
Открыть \components\content\frontend.php
Найти
if ($do=='my'){ if (!$inCore->isUserCan('content/add')){
if ($do=='my'){ if (!$inCore->isUserCan('content/add') && (!isset($_REQUEST['user_id']) || $_REQUEST['user_id'] < 1)){
Найти
$user_id = $inUser->id; $inPage->setTitle($_LANG['MY_ARTICLES']); $inPage->addPathway($_LANG['MY_ARTICLES']); $inPage->printHeading($_LANG['MY_ARTICLES']);
$_REQUEST['page'] = 1; $page_url = ''; $canEdit = false; if($_REQUEST['user_id'] > 0) { $user_id = (int)$_REQUEST['user_id']; $query = "SELECT nickname FROM cms_users WHERE id = '".$user_id."'"; if($res = $inDB->query($query)) { $row = $inDB->fetch_assoc($res); $mytitle = "Статті користувача - ".$row['nickname']; $inPage->setTitle($mytitle); $inPage->addPathway($mytitle); $inPage->printHeading($mytitle); $page_url = '-'.$user_id; } else { $inPage->setTitle($_LANG['MY_ARTICLES']); $inPage->addPathway($_LANG['MY_ARTICLES']); $inPage->printHeading($_LANG['MY_ARTICLES']); $user_id = $inUser->id; } } else { $user_id = $inUser->id; $inPage->setTitle($_LANG['MY_ARTICLES']); $inPage->addPathway($_LANG['MY_ARTICLES']); $inPage->printHeading($_LANG['MY_ARTICLES']); $canEdit = true; }
Найти
$smarty->assign('pagebar', cmsPage::getPagebar($total, $page, $perpage, '/content/my%page%.html'));
$smarty->assign('canEdit', $canEdit); $smarty->assign('pagebar', cmsPage::getPagebar($total, $page, $perpage, '/content/my%page%'.$page_url.'.html'));
Открыть \components\content\router.php
Найти
//RewriteRule ^content/my.html$ /index.php?view=content&do=my&page=1 '_uri' => '/^content\/my.html$/i', 'do' => 'my', 1 => 'page' ); //RewriteRule ^content/my([0-9]*).html$ /index.php?view=content&do=my&page=$1 '_uri' => '/^content\/my([0-9]+).html$/i', 'do' => 'my', 1 => 'page' );
//RewriteRule ^content/my.html$ /index.php?view=content&do=my&page=1 '_uri' => '/^content\/my.html$/i', 'do' => 'my' ); '_uri' => '/^content\/my-([0-9]+).html$/i', 'do' => 'my', 1 => 'user_id' ); //RewriteRule ^content/my([0-9]*).html$ /index.php?view=content&do=my&page=$1 '_uri' => '/^content\/my([0-9]+).html$/i', 'do' => 'my', 1 => 'page' ); '_uri' => '/^content\/my([0-9]+)-([0-9]+).html$/i', 'do' => 'my', 1 => 'page', 2 => 'user_id' );
Открыть \templates\_default_\components\com_content_my.tpl
Найти
<td width="50" class="td" align="center"><strong>{$LANG.ACTION}</strong></td>
{if $canEdit || $user_can_delete} <td width="50" class="td" align="center"><strong>{$LANG.ACTION}</strong></td> {/if}
Найти
<td class="{$article.class}" align="center"> <a href="/content/edit{$article.id}.html" title="{$LANG.EDIT}"><img src="/admin/images/actions/edit.gif" /></a> {if $user_can_delete} <a href="javascript:deleteArticle({$article.id})" title="{$LANG.DELETE}"><img src="/admin/images/actions/delete.gif" /></a> {/if} </td>
{if $canEdit || $user_can_delete} <td class="{$article.class}" align="center"> {if $canEdit} <a href="/content/edit{$article.id}.html" title="{$LANG.EDIT}"><img src="/admin/images/actions/edit.gif" /></a> {/if} {if $user_can_delete} <a href="javascript:deleteArticle({$article.id})" title="{$LANG.DELETE}"><img src="/admin/images/actions/delete.gif" /></a> {/if} </td> {/if}
Реклама #
nikolas 14 лет назад #
Fuze 14 лет назад #