Авторизуйтесь по паролю
Или через соцсеть
3970 04.12.2016 Все вопросы » Общие вопросы по PHP 2890
Верстала - 2016-12-044 декабря 2016 14:08 - #60359
if ($titl_e) $s_navigation .= " {$config['speedbar_separator']} " . $titl_e;
if ($titl_e) $s_navigation .= " {$config['speedbar_separator']} ";
3970 - 2016-12-0421 декабря 2016 19:48 - #60635
Softg - 2016-12-0425 марта 2020 23:42 - #75352
LazyDev - 2016-12-0426 марта 2020 00:54 - #75354
Softg - 2016-12-0426 марта 2020 01:18 - #75355
LazyDev - 2016-12-0426 марта 2020 01:37 - #75356
Softg - 2016-12-0426 марта 2020 02:12 - #75357
Softg - 2016-12-0426 марта 2020 02:17 - #75358
if ($config['speedbar'] AND !$view_template ) { function getSpeedbarCategory($id = 0, $separator = '»', $is_link = false, $pos = 2) { global $cat_info, $config; $temp_id = $id = (int)$id; if (!$id) return ''; $catlist = [$temp_id]; while ($parentid = $cat_info[$temp_id]['parentid']) { array_unshift($catlist, $parentid); $temp_id = $parentid; }; $speedbar = ''; foreach ($catlist as $cat_id) { $speedbar .= " $separator "; if (!$is_link && $cat_id == $id) { $speedbar .= $cat_info[$cat_id]['name']; } else { $speedbar .= "<span itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\"><meta itemprop=\"position\" content=\"{$pos}\"><a href=\"" . $config['http_home_url'] . get_url($cat_id) . "/\" itemprop=\"item\"><span itemprop=\"name\">{$cat_info[$cat_id]['name']}</span></a></span>"; } $pos++; } return $speedbar; } $s_navigation = "<span itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\"><meta itemprop=\"position\" content=\"1\"><a href=\"{$config['http_home_url']}\" itemprop=\"item\"><span itemprop=\"name\">" . $config['short_title'] . "</span></a></span>"; if ($config['start_site'] == 3 AND $_SERVER['QUERY_STRING'] == "" AND !$_POST['do']) $titl_e = ""; $config['speedbar_separator'] || $config['speedbar_separator'] = ' » '; if (intval($category_id)){ if($titl_e OR (isset($_GET['cstart']) AND intval($_GET['cstart']) > 1) ) { $last_link = true; } else $last_link = false; $s_navigation .= getSpeedbarCategory($category_id, $config['speedbar_separator'], $last_link); } elseif ($do == 'tags') { $s_navigation .= " {$config['speedbar_separator']} <span itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\"><meta itemprop=\"position\" content=\"2\"><a href=\"" . $config['http_home_url'] . "tags/\" itemprop=\"item\"><span itemprop=\"name\">" . $lang['tag_cloud'] . "</span></a></span> {$config['speedbar_separator']} " . $tag; } elseif ($nam_e) $s_navigation .= " {$config['speedbar_separator']} " . $nam_e; if ($titl_e) { $s_navigation .= " {$config['speedbar_separator']} " . $titl_e; } else { if ( isset($_GET['cstart']) AND intval($_GET['cstart']) > 1 ){ $page_extra = " {$config['speedbar_separator']} ".$lang['news_site']." ".intval($_GET['cstart']); } else $page_extra = ''; $s_navigation .= $page_extra; } $tpl->result['speedbar'] = ''; $tpl->load_template('speedbar.tpl'); $tpl->set('{speedbar}', '<span id="dle-speedbar"><span itemscope itemtype="https://schema.org/BreadcrumbList">' . stripslashes ($s_navigation) . '</span></span>'); $tpl->compile('speedbar'); $tpl->clear (); }
LazyDev - 2016-12-0426 марта 2020 02:23 - #75359
if ($titl_e) { $s_navigation .= " {$config['speedbar_separator']} " . $titl_e; } else { if ( isset($_GET['cstart']) AND intval($_GET['cstart']) > 1 ){ $page_extra = " {$config['speedbar_separator']} ".$lang['news_site']." ".intval($_GET['cstart']); } else $page_extra = ''; $s_navigation .= $page_extra; }
if ( isset($_GET['cstart']) AND intval($_GET['cstart']) > 1 ){ $page_extra = " {$config['speedbar_separator']} ".$lang['news_site']." ".intval($_GET['cstart']); } else $page_extra = ''; $s_navigation .= $page_extra;
Softg - 2016-12-0426 марта 2020 02:43 - #75360
<style> .sociallinks { display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4); } .sociallinks-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 500px; border-radius: 10px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } .close { color: #aaa; position: absolute; top: 10px; right: 10px; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; } .social-container { display: flex; align-items: center; } .social-container > div { margin-left: 10px; } h2, p { margin: 5px 0; } .social { padding-top: 20px; } .social img { margin: 10px; } .sharebtn { padding-top: 20px; width: 100%; } .sharebtn_area { border: 1px solid black; height: 40px; } .sharebtn input[type="text"] { width: 70%; border: none; height: 95%; } .sharebtn button { width: 25%; height: 95%; border: none; background-color: #fff; } </style> <button id="opensociallinksBtn">Поделиться</button> <div id="mysociallinks" class="sociallinks"> <div class="sociallinks-content"> <span class="close">×</span> <div class="social-container"> <img src="{image-1}" alt="Icon" width="30" height="30"> <div> <h2>{title}</h2> <p>Поделиться</p> </div> </div> <div class="social"> <a href="https://api.whatsapp.com/send/?text={full-link}"><img src="whatsapp.png" alt="WhatsApp" width="30" height="30"></a> <a href="https://www.facebook.com/sharer/sharer.php?u={full-link}"><img src="facebook.png" alt="Facebook" width="30" height="30"></a> <a href="https://twitter.com/intent/post?url={full-link}"><img src="twitter.png" alt="Twitter" width="30" height="30"></a> <a href="https://www.instagram.com/share?url={full-link}"><img src="instagram.png" alt="Instagram" width="30" height="30"></a> </div> <div class="sharebtn"> <div class="sharebtn_area"> <input type="text" id="inputText" value="{full-link}" readonly="true"> <button id="copyBtn">Поделиться <img src="share.png" width="10px" alt="Share Icon"></button> </div> </div> </div> </div> <script> var sociallinks = document.getElementById("mysociallinks"); var opensociallinksBtn = document.getElementById("opensociallinksBtn"); var closeBtn = document.getElementsByClassName("close")[0]; var copyBtn = document.getElementById("copyBtn"); var inputText = document.getElementById("inputText"); opensociallinksBtn.onclick = function() { sociallinks.style.display = "block"; } closeBtn.onclick = function() { sociallinks.style.display = "none"; } window.onclick = function(event) { if (event.target == sociallinks) { sociallinks.style.display = "none"; } } copyBtn.onclick = function() { inputText.select(); document.execCommand("copy"); } </script>