Отображение пользователей (решено)
Спасибо!
Проблему решил посредством добавления:
{if $oUserList->getProfileSex()=='man'}
в файл "/templates/skin/synio/user_list.tpl
{if $oUserList->getProfileSex()=='man'}
{foreach from=$aCityList item=oCity} <li><a class="tag-size-{$oCity->getSize()}" href="{router page='people'}city/{$oCity->getId()}/">{$oCity->getName()|escape:'html'}</a></li> {/foreach}
<select onchange="javascript: window.location = DIR_WEB_ROOT +'/people/city/' + this.value"> {foreach from=$aCityList item=oCity} <option value="{$oCity->getId()}">{$oCity->getName()|escape:'html'}</option> {/foreach} </select>
class PluginAfisha_BlockAfisha extends Block {
public function Exec() {
/**
* Получаем список топиков
*/
$aResultMain=$this->Topic_GetTopicsByBlogId(Config::Get('plugin.afisha.topics_blog_id'), 1,1);
$aMainEvent = $this->Topic_GetTopicsAdditionalData($aResultMain);
$aResult=$this->Topic_GetTopicsByBlogId(Config::Get('plugin.afisha.topics_blog_id'), 1,Config::Get('plugin.afisha.topics_count'));
$aEvents = $this->Topic_GetTopicsAdditionalData($aResult);
/**
* Загружаем переменные в шаблон
*/
$this->Viewer_Assign("aMainEvent", $aMainEvent);
$this->Viewer_Assign("aEvents", $aEvents);
}
}
class PluginUserhacks_HookUserhacks extends Hook {
public function RegisterHook() {
$this->AddHook('profile_whois_show','SetUserPosition',__CLASS__,-3);
$this->AddHook('template_userhacks_whois', 'tplWhois', __CLASS__, -10);
}
public function SetUserPosition($aVars) {
$iPos = $this->PluginUserhacks_Userhacks_GetUserPosition($aVars['oUserProfile']);
$this->Viewer_Assign('iUserPosition',$iPos);
}
public function tplWhois($aVars) {
return $this->Viewer_Fetch(Plugin::GetTemplatePath('userhacks').'/inject.whois.tpl');
}
}
class PluginUserhacks_HookUserhacks extends Hook {
public function RegisterHook() {
$this->AddHook('people_index_show','SetUserPosition',__CLASS__,-3);
$this->AddHook('template_userhacks_index', 'tplindex', __CLASS__, -10);
}
public function SetUserPosition($aVars) {
$iPos = $this->PluginUserhacks_Userhacks_GetUserPosition($aVars['oUser']);
$this->Viewer_Assign('iUserPosition',$iPos);
}
public function tplWhois($aVars) {
return $this->Viewer_Fetch(Plugin::GetTemplatePath('userhacks').'/inject.index.tpl');
}
}