Repost-youtube

Материал из wiki-MyMakerBot

Назад: Авто репост

{key_clear}
{if !isset($black_list)}{$black_list=[]}{/if}
{if !isset($white_list)}{$white_list=[]}{/if}
{if !isset($registered)}{$registered=1}{/if}
{if !isset($src_link)}{$src_link=1}{/if}
{if !isset($sign)}{$sign=''}{/if}
{if !isset($group)}{$group='youtube'}{/if}

{if $v.title|check_black_list:$black_list && $v.title|check_white_list:$white_list 
	&& (!$registered || !$v.id|group_youtube:$group:1) }

{if !isset($keys)}
   {$keys=0}
{/if}


{capture 'block'}

<a href='{$v['link']['@attributes']['href']}'>{$v.title}</a>

Опубликовано: <code>{date('d.m.Y H:i:s', strtotime($v.published))}</code>
<i>{$v.author.name}</i>
{if $keys}
{key l=1 t=$v.title c=$v['link']['@attributes']['href']}
{/if}

{/capture}

{if isset($like) && $like}
	{import c=$like}
{/if}

{tg_sendMessage text=$smarty.capture.block chat_id=$chat_id keys=1}
{/if}
{key_clear}