mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
r450
YouTube панель git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@450 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
b57acb7c2b
commit
0eb8c05f79
8 changed files with 206 additions and 23 deletions
|
@ -56,7 +56,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.5 Beta';
|
||||
$bb_cfg['tp_release_state'] = 'R449';
|
||||
$bb_cfg['tp_release_state'] = 'R450';
|
||||
$bb_cfg['tp_release_date'] = '04-09-2012';
|
||||
|
||||
// Database
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/**
|
||||
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
|
||||
*
|
||||
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
*/
|
||||
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVer
|
||||
sion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
|
||||
|
||||
// prototype $
|
||||
function $p() {
|
||||
|
@ -484,7 +493,7 @@ $(document).ready(function(){
|
|||
var text = xml.statusText;
|
||||
if (status == 200) {
|
||||
status = '';
|
||||
text = 'invalid data format';
|
||||
text = 'неверный формат данных';
|
||||
}
|
||||
$(this).html(
|
||||
"Ошибка в: <i>"+ ajax.url +"</i><br /><b>"+ status +" "+ text +"</b>"
|
||||
|
|
|
@ -12,18 +12,16 @@
|
|||
* Quote blocks
|
||||
* Spoiler
|
||||
|
||||
? Infoboxes
|
||||
* Infoboxes
|
||||
* Inputs, buttons, forms
|
||||
* Text replacement for buttons
|
||||
* Basic tables
|
||||
|
||||
* Page header
|
||||
- TopMenu, Quick Login, PM Info, Loguot..
|
||||
- TopMenu, Quick Login, PM Info, Loguot, Search..
|
||||
- Logo
|
||||
- Main navigation
|
||||
- Latest News
|
||||
? Breadcrumb
|
||||
? Important info
|
||||
|
||||
* Page content
|
||||
* Sidebar 1
|
||||
|
@ -44,6 +42,7 @@
|
|||
* Misc
|
||||
* Reports
|
||||
* Shortcuts
|
||||
* YouTube Panel
|
||||
*/
|
||||
|
||||
/* ================================================================ *
|
||||
|
@ -545,13 +544,20 @@ table.smilies td { padding: 3px; text-align: center; }
|
|||
#latest_news a { text-decoration: none; color: #000000; }
|
||||
#latest_news .new a { color: #A52A2A; font-weight: bold; }
|
||||
/* ---------------------------------- *
|
||||
Breadcrumb [ home >> forum1 >> etc. ]
|
||||
Search input
|
||||
* ---------------------------------- */
|
||||
#breadcrumb {}
|
||||
/* ---------------------------------- *
|
||||
Important info
|
||||
* ---------------------------------- */
|
||||
#important_info {}
|
||||
#search-text {
|
||||
background: white;
|
||||
border: 1px solid silver;
|
||||
padding: 1px;
|
||||
width: 250px;
|
||||
}
|
||||
#search-text:hover {
|
||||
border: 1px solid #aaaaaa;
|
||||
}
|
||||
#search-text:focus {
|
||||
border: 1px solid #aaaaaa;
|
||||
}
|
||||
/* ================================================================ *
|
||||
Page content
|
||||
* ================================================================ */
|
||||
|
@ -1185,3 +1191,143 @@ select.report_mode option.report_open {
|
|||
.tRight { text-align: right !important; }
|
||||
.vBottom { vertical-align: bottom !important; }
|
||||
.vTop { vertical-align: top !important; }
|
||||
/* ================================================================ *
|
||||
YouTube.Panel
|
||||
* ================================================================ */
|
||||
.Panels {
|
||||
z-index:200;
|
||||
top:50%;
|
||||
left:50%;
|
||||
background-attachment:fixed, scroll;
|
||||
background: url(../images/aerobg.png), -moz-linear-gradient(top, rgba(200,200,200,0.4) 0%, rgba(255,255,255,1) 100%);
|
||||
background: url(../images/aerobg.png), -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(200,200,200,0.4)), color-stop(100%,rgba(255,255,255,1)));
|
||||
background: url(../images/aerobg.png), -webkit-linear-gradient(top, rgba(200,200,200,0.4) 0%,rgba(255,255,255,1) 100%);
|
||||
background: url(../images/aerobg.png), -o-linear-gradient(top, rgba(200,200,200,0.4) 0%,rgba(255,255,255,1) 100%);
|
||||
background: url(../images/aerobg.png), -ms-linear-gradient(top, rgba(200,200,200,0.4) 0%,rgba(255,255,255,1) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#66c8c8c8', endColorstr='#ffffff',GradientType=0 );
|
||||
background: url(../images/aerobg.png), linear-gradient(top, rgba(200,200,200,0.4) 0%,rgba(255,255,255,1) 100%);
|
||||
background-size:cover;
|
||||
-moz-background-size:cover;
|
||||
-webkit-background-size:cover;
|
||||
border:1px solid gray;
|
||||
border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-webkit-border-radius:3px;
|
||||
box-shadow:0 2px 5px rgba(0,0,0,0.3),0 0 1px #FFF inset;
|
||||
-moz-box-shadow:0 2px 5px rgba(0,0,0,0.3),0 0 1px #FFF inset;
|
||||
-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.3),0 0 1px #FFF inset;
|
||||
position:fixed;
|
||||
max-width:99%;
|
||||
min-width:100px;
|
||||
min-height:24px;
|
||||
overflow:hidden;
|
||||
margin:1px;
|
||||
}
|
||||
|
||||
.Panels.Minimized {
|
||||
position:relative;
|
||||
top:auto!important;
|
||||
left:auto!important;
|
||||
float:left;
|
||||
max-width:200px;
|
||||
height:24px!important;
|
||||
margin:0!important;
|
||||
}
|
||||
|
||||
.PanelsButton {
|
||||
float:right;
|
||||
overflow:hidden;
|
||||
margin:5px 5px 0px 10px;
|
||||
}
|
||||
|
||||
.PanelsClose { color: #006699; cursor: pointer; }
|
||||
|
||||
.PanelsClose:hover { color: #DD6900; text-decoration: underline !important; }
|
||||
.PanelsTitle {
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
max-height:20px;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
.Panels.Minimized .PanelsTitle.Hidden {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.PanelsTitle,.PanelsMenu {
|
||||
padding:5px 5px 0;
|
||||
}
|
||||
|
||||
.Panels.Minimized .PanelsTitle,.Panels.Minimized .PanelsMenu {
|
||||
cursor:inherit;
|
||||
}
|
||||
|
||||
.PanelsContent,.PanelsFooter {
|
||||
border-top:1px dashed #A9A9A9;
|
||||
clear:both;
|
||||
margin:5px 0 0;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
#PanelsDock {
|
||||
bottom:0;
|
||||
left:0;
|
||||
position:fixed;
|
||||
padding:0 0 0 5px;
|
||||
}
|
||||
|
||||
#PanelsDockToggle {
|
||||
border:1px solid gray;
|
||||
box-shadow:0 2px 5px rgba(0,0,0,0.3),0 0 1px #FFF inset;
|
||||
-moz-box-shadow:0 2px 5px rgba(0,0,0,0.3),0 0 1px #FFF inset;
|
||||
-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.3),0 0 1px #FFF inset;
|
||||
float:left;
|
||||
border-radius:0 3px 3px 0;
|
||||
-moz-border-radius:0 3px 3px 0;
|
||||
-webkit-border-radius:0 3px 3px 0;
|
||||
margin:1px 1px 1px 0;
|
||||
padding:4px 10px;
|
||||
}
|
||||
|
||||
.Panels.Minimized .PanelsMenu,.Panels.Minimized .PanelsContent,.Panels.Minimized .PanelsFooter,.PanelsTitle.Hidden,.PanelsMenu.Hidden {
|
||||
display:none;
|
||||
}
|
||||
span.button {
|
||||
background-image:url(../images/def_button.png);
|
||||
}
|
||||
|
||||
span.button:hover {
|
||||
background-image:url(../images/def_button_light.png);
|
||||
}
|
||||
|
||||
span.YTLink{
|
||||
background-color:gray;
|
||||
border:1px solid #333333;
|
||||
display:inline-block;
|
||||
font-weight:bold;
|
||||
padding:2px 2px 2px 5px;
|
||||
margin:1px 2px -6px;
|
||||
border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-webkit-border-radius:3px;
|
||||
}
|
||||
span.YTLinkButton{
|
||||
background-color:#008500;
|
||||
border:1px solid #333333;
|
||||
color:white;
|
||||
display:inline-block;
|
||||
float:right;
|
||||
margin:-3px -3px -3px 4px;
|
||||
padding:2px 4px;
|
||||
-webkit-border-top-right-radius: 3px;
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
-moz-border-radius-topright: 3px;
|
||||
-moz-border-radius-bottomright: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
cursor: url(../images/link_help.cur), pointer;
|
||||
}
|
||||
span.YTLink a.postLink{
|
||||
color:white;
|
||||
float:left;
|
||||
}
|
||||
|
|
BIN
upload/templates/default/images/aerobg.png
Normal file
BIN
upload/templates/default/images/aerobg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
BIN
upload/templates/default/images/def_button.png
Normal file
BIN
upload/templates/default/images/def_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 174 B |
BIN
upload/templates/default/images/def_button_light.png
Normal file
BIN
upload/templates/default/images/def_button_light.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 B |
BIN
upload/templates/default/images/link_help.cur
Normal file
BIN
upload/templates/default/images/link_help.cur
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -36,6 +36,7 @@ function initPostBBCode(context)
|
|||
initExternalLinks(context);
|
||||
initPostImages(context);
|
||||
initSpoilers(context);
|
||||
initMedia(context);
|
||||
}
|
||||
function initQuotes(context)
|
||||
{
|
||||
|
@ -123,6 +124,35 @@ function fixPostImage ($img)
|
|||
}
|
||||
return $img;
|
||||
}
|
||||
function initMedia(context)
|
||||
{
|
||||
var apostLink = $('a.postLink', context);
|
||||
for (var i = 0; i < apostLink.length; i++) {
|
||||
var link = apostLink[i];
|
||||
if (typeof link.href != 'string') {
|
||||
continue;
|
||||
}
|
||||
if (/^http(?:s|):\/\/www.youtube.com\/watch\?(.*)?(&?v=([a-z0-9\-_]+))(.*)?|http:\/\/youtu.be\/.+/i.test(link.href)) {
|
||||
var a = document.createElement('span');
|
||||
a.className = 'YTLink';
|
||||
a.innerHTML = '<span title="Начать проигрывание на текущей странице" class="YTLinkButton">►</span>';
|
||||
window.addEvent(a, 'click', function (e) {
|
||||
var vhref = e.target.nextSibling.href.replace(/^http(?:s|):\/\/www.youtube.com\/watch\?(.*)?(&?v=([a-z0-9\-_]+))(.*)?|http:\/\/youtu.be\//ig, "http://www.youtube.com/embed/$3");
|
||||
var text = e.target.nextSibling.innerText != "" ? e.target.nextSibling.innerText : e.target.nextSibling.href;
|
||||
$('#Panel_youtube').remove();
|
||||
ypanel('youtube', {
|
||||
title: '<b>' + text + '</b>',
|
||||
resizing: 0,
|
||||
width: 862,
|
||||
height: 550,
|
||||
content: '<iframe width="853" height="510" frameborder="0" allowfullscreen="" src="' + vhref + '?wmode=opaque"></iframe>'
|
||||
});
|
||||
});
|
||||
link.parentNode.insertBefore(a, link);
|
||||
a.appendChild(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$('div.post_wrap, div.signature').each(function(){ initPostBBCode( $(this) ) });
|
||||
});
|
||||
|
@ -340,6 +370,13 @@ if (top != self) {
|
|||
<!-- IF SEO_LINK_MEMEBERLIST_PAGE --><a href="{U_MEMBERLIST}"><!-- ENDIF --><b>{L_MEMBERLIST}</b><!-- IF SEO_LINK_MEMEBERLIST_PAGE --></a><!-- ENDIF --><span style="color:#CDCDCD;">|</span>
|
||||
</td>
|
||||
<td class="nowrap" align="right">
|
||||
<!-- BEGIN switch_report_list -->
|
||||
<a href="{U_REPORT_LIST}" class="mainmenu">{REPORT_LIST}</a> ·
|
||||
<!-- END switch_report_list -->
|
||||
<!-- BEGIN switch_report_list_new -->
|
||||
<strong><a href="{U_REPORT_LIST}" class="mainmenu">{REPORT_LIST} · </a></strong>
|
||||
<!-- END switch_report_list_new -->
|
||||
|
||||
<!-- IF LOGGED_IN -->
|
||||
<!-- IF HAVE_NEW_PM || HAVE_UNREAD_PM -->
|
||||
<a href="{U_READ_PM}" class="new-pm-link"><b>{L_PRIVATE_MESSAGES}: {PM_INFO}</b></a>
|
||||
|
@ -389,26 +426,17 @@ $(document).ready(function() {
|
|||
{L_USER_WELCOME} <b class="med">{THIS_USER}</b> [ <a href="{U_LOGIN_LOGOUT}" onclick="return confirm('{L_CONFIRM_LOGOUT}');">{L_LOGOUT}</a> ]
|
||||
</td>
|
||||
|
||||
<td align="center" nowrap="nowrap">
|
||||
<!-- BEGIN switch_report_list -->
|
||||
<a href="{U_REPORT_LIST}" class="mainmenu">{REPORT_LIST}</a> ·
|
||||
<!-- END switch_report_list -->
|
||||
<!-- BEGIN switch_report_list_new -->
|
||||
<strong><a href="{U_REPORT_LIST}" class="mainmenu">{REPORT_LIST} · </a></strong>
|
||||
<!-- END switch_report_list_new -->
|
||||
</td>
|
||||
|
||||
<td style="padding: 2px;">
|
||||
<div>
|
||||
<form id="quick-search" action="" method="post" onsubmit="$(this).attr('action', $('#search-action').val());">
|
||||
<input type="hidden" name="max" value="1" />
|
||||
<input type="hidden" name="to" value="1" />
|
||||
<input id="search-text" type="text" name="nm" class="hint" style="width: 120px;" placeholder="{L_SEARCH_S}" required />
|
||||
<input id="search-text" type="text" name="nm" class="hint" placeholder="{L_SEARCH_S}" required />
|
||||
<select id="search-action">
|
||||
<option value="tracker.php#results" selected="selected"> {L_TRACKER_S} </option>
|
||||
<option value="search.php"> {L_FORUM_S} </option>
|
||||
</select>
|
||||
<input type="submit" class="med bold" value="»" style="width: 30px;" />
|
||||
<input type="submit" class="med" value="{L_SEARCH}" style="width: 55px;" />
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue