Авторизуйтесь по паролю
Или через соцсеть
ser4740 19.07.2015 Все вопросы » Общие вопросы по PHP 1929
height: 24px;
osimi - 2015-07-1919 июля 2015 17:55 - #46454
osimi - 2015-07-1919 июля 2015 17:56 - #46456
ser4740 - 2015-07-1919 июля 2015 18:12 - #46457
osimi - 2015-07-1919 июля 2015 19:11 - #46460
osimi - 2015-07-1919 июля 2015 19:05 - #46459
ser4740 - 2015-07-1919 июля 2015 19:12 - #46461
osimi - 2015-07-1919 июля 2015 19:14 - #46462
osimi - 2015-07-1919 июля 2015 19:29 - #46463
if( !$title ) {
} } function clear_url($url) {
ser4740 - 2015-07-1919 июля 2015 19:30 - #46464
osimi - 2015-07-1919 июля 2015 19:41 - #46465
.title_spoiler a { background: url(../images/title_spoiler.jpg) left top repeat-x; display: block; line-height: 24px; padding: 0 10px 0 30px; text-decoration: none; color: #3b3b3b; font-weight: bold; border-radius:5px; -webkit-border-radius:5px; -moz-border-radius:5px; height: 24px;}
.title_spoiler a { background: url(../images/title_spoiler.jpg) left top repeat-x; display: block; line-height: 24px; padding: 0 10px 0 30px; text-decoration: none; color: #3b3b3b; font-weight: bold; border-radius:5px; -webkit-border-radius:5px; -moz-border-radius:5px; }
osimi - 2015-07-1919 июля 2015 19:43 - #46467
ser4740 - 2015-07-1919 июля 2015 19:42 - #46466
if ($spoiler['title']) return "[{$tag}={$spoiler['title']}]".$spoiler['txt']."[/{$tag}]"; else return "[{$tag}]".$spoiler['txt']."[/{$tag}]"; } function build_thumb( $matches=array() ) { global $config; if (count($matches) == 2 ) { $align = ""; $gurl = $matches[1]; } else { $align = $matches[1]; $gurl = $matches[2]; } if( preg_match( "/[?&;%<\[\]]/", $gurl ) ) { if( $align != "" ) return "[thumb=" . $align . "]" . $gurl . "[/thumb]"; else return "[thumb]" . $gurl . "[/thumb]"; } $gurl = $this->clear_url( urldecode( $gurl ) ); $url = preg_replace( "'([^\[]*)([/\\\\])(.*?)'i", "\\1\\2thumbs\\2\\3", $gurl ); $url = trim( $url ); $gurl = trim( $gurl ); $option = explode( "|", trim( $align ) ); $align = $option[0]; if( $align != "left" and $align != "right" ) $align = ''; $url = $this->clear_url( urldecode( $url ) ); $info = $gurl; $info = $info."|".$align; if( $gurl == "" or $url == "" ) return; if( $option[1] != "" ) { $alt = htmlspecialchars( strip_tags( stripslashes( $option[1] ) ), ENT_QUOTES, $config['charset'] ); $info = $info."|".$alt; $caption = "<span class=\"highslide-caption\">" . $alt . "</span>"; $alt = "alt=\"" . $alt . "\" title=\"" . $alt . "\" "; } else { $alt = htmlspecialchars( strip_tags( stripslashes( $_POST['title'] ) ), ENT_QUOTES, $config['charset'] ); $alt = "alt='" . $alt . "' title='" . $alt . "' "; $caption = ""; } if( $align == '' ) return "<!--TBegin:{$info}--><a href=\"$gurl\" rel=\"highslide\" class=\"highslide\"><img src=\"$url\" {$alt} /></a>{$caption}<!--TEnd-->"; else return "<!--TBegin:{$info}--><a href=\"$gurl\" rel=\"highslide\" class=\"highslide\"><img src=\"$url\" style=\"float:{$align};\" {$alt} /></a>{$caption}<!--TEnd-->"; } function build_spoiler( $matches=array() ) { global $lang; $title = $matches[1]; $title = trim( $title ); $title = str_replace( "&amp;", "&", $title ); $title = preg_replace( "/javascript:/i", "javascript: ", $title ); $id_spoiler = "sp".md5( microtime().uniqid( mt_rand(), TRUE ) ); if( ! $title ) { return "<!--dle_spoiler--><div class=\"title_spoiler\"><a href=\"javascript:ShowOrHide('" . $id_spoiler . "')\"><img id=\"image-" . $id_spoiler . "\" style=\"vertical-align: middle;border: none;\" alt=\"\" src=\"{THEME}/dleimages/spoiler-plus.gif\" /></a> <a href=\"javascript:ShowOrHide('" . $id_spoiler . "')\"><!--spoiler_title-->" . $lang['spoiler_title'] . "<!--spoiler_title_end--></a></div><div id=\"" . $id_spoiler . "\" class=\"text_spoiler\" style=\"display:none;\"><!--spoiler_text-->"; } else { return "<!--dle_spoiler $title --><div class=\"title_spoiler\"><a href=\"javascript:ShowOrHide('" . $id_spoiler . "')\"><img id=\"image-" . $id_spoiler . "\" style=\"vertical-align: middle;border: none;\" alt=\"\" src=\"{THEME}/dleimages/spoiler-plus.gif\" /></a> <a href=\"javascript:ShowOrHide('" . $id_spoiler . "')\"><!--spoiler_title-->" . $title . "<!--spoiler_title_end--></a></div><div id=\"" . $id_spoiler . "\" class=\"text_spoiler\" style=\"display:none;\"><!--spoiler_text-->"; } }
osimi - 2015-07-1919 июля 2015 19:48 - #46468
osimi - 2015-07-1919 июля 2015 19:50 - #46469
ser4740 - 2015-07-1919 июля 2015 20:00 - #46472
osimi - 2015-07-1919 июля 2015 20:08 - #46473
osimi - 2015-07-1919 июля 2015 20:20 - #46474
ser4740 - 2015-07-1919 июля 2015 20:43 - #46476
Serik - 2015-07-1919 июля 2015 20:48 - #46477
http://joxi.ru/GrqyGKjTWw3erz
ser4740 - 2015-07-1919 июля 2015 20:58 - #46479
ScreN - 2015-07-1919 июля 2015 22:03 - #46481
ser4740 - 2015-07-1919 июля 2015 22:10 - #46482
<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>