<input
type="password"
name="password"
readonly
onfocus="this.removeAttribute('readonly')">
const smiles = {
1: 'smile for mobile version',
2: 'smile for iPhone',
// ...
};
function getSmile(user) {
return smiles[user.last_seen.platform];
}
@font-face {
font-family: "OpenSans";
src: url("fonts/opensans.woff2") format("woff2")
url("fonts/opensans.woff") format("woff") ;
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "OpenSans";
src: url("fonts/opensansbold.woff2") format("woff2"),
url("fonts/opensansbold.woff") format("woff");
font-weight: 700;
font-style: normal;
}
<div id="portfoliowrap">
<div class="portfolio-centered">
<div class="recentitems portfolio">
<?php if( have_rows('gallery') ):
while( have_rows('gallery') ) : the_row();
?>
<div class="portfolio-item graphic-design">
<div class="he-wrap tpl6">
<?php $image = get_sub_field('image');
if( !empty($image) ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
<div class="he-view">
<div class="bg a0" data-animate="fadeIn">
<h3 class="a1" data-animate="fadeInDown"><?php the_sub_field('title'); ?></h3>
<a data-rel="prettyPhoto" href="<?php echo $image['url']; ?>" class="dmbutton a2" data-animate="fadeInUp"><i class="fa fa-search"></i></a>
<a href="<?php echo get_sub_field('page_link');?>" class="dmbutton a2" data-animate="fadeInUp"><i class="fa fa-link"></i></a>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
</div>
</div>
<?php echo $image['url']; ?>
<?php the_sub_field('page_link');?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
передать урл миниатюры. <meta charset="utf-8">
<?php
$token = ""; // access_token
$group_id = 51204300; // ID Группы без минуса
$topic_id = 33003964; // ID Топика
$get_count = curl('https://api.vk.com/method/board.getComments?group_id='.$group_id.'&topic_id='.$topic_id.'&v=5.60&access_token='.$token);
$jsonGetCount = json_decode($get_count,true);
$count = $jsonGetCount['response']['count'];
for ($i = 1; $i <= $count; $i++) {
$get = curl('https://api.vk.com/method/board.getComments?group_id='.$group_id.'&topic_id='.$topic_id.'&offset='.$i.'&count=1&v=5.60&access_token='.$token);
$jsonGet = json_decode($get,true);
$user_id = $jsonGet['response']['items'][0]['from_id']; // ID Автора
$date = $jsonGet['response']['items'][0]['date']; // Дата в unixtime
$text = $jsonGet['response']['items'][0]['text']; // Текст
$fname = $jsonGet['response']['profiles'][0]['first_name']; // Имя Автора
$lname = $jsonGet['response']['profiles'][0]['last_name']; // Фамилия Автора
/*
ОСТАЛОСЬ ТОЛЬКО ВЫВЕСТИ ЭТО ВСЕ. ДУМАЮ САМ СПРАВИШЬСЯ
*/
}
function curl($url) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
?>