Вот пример не работает
url: '{profile_url login=$friend.login}', title: '{$friend.nickname}',
url: '{profile_url login=$friend.login}', title: '{$friend.nickname}',
{if $myprofile} <div align="center"><script type="text/javascript"> <!-- document.write(VK.Share.button({ url: {literal}'<?echo $usr['imageurl']?>'{/literal}, title: <?echo $usr['nickname'];?>, description: 'Нашел друга {$friend.nickname} на TYUMEHA.RU', image: '{$friend.avatar}', noparse: true }, { type: 'round_nocount', text: 'Нашел друга' })); </script> </div> {/if}
{if $myprofile} <div align="center"><script type="text/javascript"> {literal} <!-- document.write(VK.Share.button({{/literal} url: '{$friend.avatar}', title: '{$friend.nickname}', description: 'Нашел друга {$friend.nickname} на TYUMEHA.RU', image: '{$friend.avatar}', noparse: true {literal} }, { type: 'round_nocount', text: 'Нашел друга' })); {/literal}</script> </div> {/if}
В-общем, очень плохо с матчастью (((
<!-- document.write(VK.Share.button({ url: '<img border="0" class="usr_img_small" src="/images/users/avatars/small/b2959508a7f67a8eea5b37935734cd65.jpg">', title: 'First', description: 'Нашел друга First на XXX.RU', image: '<img border="0" class="usr_img_small" src="/images/users/avatars/small/b2959508a7f67a8eea5b37935734cd65.jpg" />', noparse: true }, { type: 'round_nocount', text: 'Нашел друга' }));
{if $myprofile} <div align="center"> <script type="text/javascript"> {literal} document.write(VK.Share.button({ url: {/literal}'{$friend.avatar}'{literal}, title: {/literal}'{$friend.nickname}'{literal}, description: {/literal}'Нашел друга {$friend.nickname} на TYUMEHA.RU'{literal}, image: {/literal}'{$friend.avatar}'{literal}, noparse: true },{ type: 'round_nocount', text: 'Нашел друга' })); {/literal} </script> </div> {/if}
{if $friends} <tr> <td width="80" valign="top"> <div class="avatar"><a href="{profile_url login=$friend.login}">{$friend.avatar}</a></div> </td> <td valign="top"> <div class="status">{$friend.flogdate}<br /> <a href="/users/{$friend.id}/sendmessage.html">{$LANG.WRITE_MESS}</a> {if $myprofile}<br /><a href="/users/{$friend.id}/nofriends.html">{$LANG.STOP_FRIENDLY}</a>{/if} </div> <div class="nickname"> <a class="friend_link" href="{profile_url login=$friend.login}">{$friend.nickname}</a><br /> {if $friend.status} <span class="microstatus">{$friend.status}</span> {/if} {if $myprofile} <div> <script type='text/javascript'> {literal}document.write(VK.Share.button( {{/literal}url: 'http://tyumeha.ru/users/{$friend.login}',title: 'Нашел друга {$friend.nickname} на TYUMEHA.RU',description: 'Нашел друга {$friend.nickname} на TYUMEHA.RU',image: '',noparse: true {literal}},{type: 'round_nocount',text: 'Нашел'})); </script>{/literal} </div> {/if} </div> </td> </tr> {/foreach} {/if}
/////////////////////////////// FRIENDS LIST ///////////////////////////////////////////////////////////////////////////////////////// if ($do=='friendlist'){ $usr = $model->getUserShort($id); if (!$usr) { cmsCore::error404(); } $page = $inCore->request('page', 'int', 1); $perpage = 2; if (!usrCheckAuth()) { cmsUser::goToLogin(); } $inPage->addPathway($usr['nickname'], cmsUser::getProfileURL($usr['login'])); $inPage->addPathway($_LANG['FRIENDS'], $_SERVER['REQUEST_URI']); $inPage->setTitle($_LANG['FRIENDS']); $inPage->backButton(false); $friends = usrFriends($usr['id'], $total, $perpage, $page); $smarty = $inCore->initSmarty('components', 'com_users_friends.tpl'); $smarty->assign('friends', $friends); $smarty->assign('usr', $usr); $smarty->assign('myprofile', ($id == $inUser->id)); $smarty->assign('total', $total); $smarty->assign('pagebar', cmsPage::getPagebar($total, $page, $perpage, 'javascript:centerLink(\'/users/'.$id.'/friendlist'.$id.'.html\')')); $smarty->display('com_users_friends.tpl'); }
function centerLink(href){ $('div.component').css({opacity:0.4, filter:'alpha(opacity=40)'}); $.post(href, {'of_ajax': 1}, function(data){ $('div.component').html(data); $('div.component').css({opacity:1.0, filter:'alpha(opacity=100)'}); }); }