Hjælp til at få javascript vist på siden Jquery BlockUI Plugin
Hej Eksperter.Jeg kunne godt tænke mig, at få Auto-unblock ind på min side, som i kan se en demo af her + koden
http://malsup.com/jquery/block/#demos
Mit problem er bare at jeg ikke ved hvordan jeg får det tilføjet til min side, da jeg overhovedet ikke har kendskab til javascript!
min kildekode på min side er som følger:
<?php
include("config.php");
include("lib/MyVideo.php");
$q=mysql_query("select * from settings");
$r=mysql_fetch_assoc($q);
$fbp=$r['fbpage'];
$fbid=$r['fbappid'];
$title=$r['title'];
?>
<?php
$vid=$_GET['id'];
$vq=mysql_query("select * from videos where video_id=$vid limit 1");
$vr=mysql_fetch_assoc($vq);
$upv=$vr['views']+1;
$vq1=mysql_query("update videos set `views`='$upv' where video_id=$vid");
$youtubeid = getYouTubeIdFromURL($vr[video_url]);
$youtubeurl = $vr[video_url];
$vtitle=substr($vr[video_title],0,20);
$vtitle=str_replace(" ","-",$vtitle);
function getYouTubeIdFromURL($url){ $url_string = parse_url($url, PHP_URL_QUERY); parse_str($url_string, $args); return isset($args['v']) ? $args['v'] : false;}
?>
<!DOCTYPE html>
<html><head>
<title><?php echo $vr[video_title].' - '.$r['title']; ?></title>
<?php echo $r['meta']; ?>
<meta name="description" content="<?php echo $vr[video_desc]; ?>" />
<meta name="keywords" content="<?php echo $r['keywords']; ?>" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
<meta name="robots" content="index, follow" />
<meta property="og:type" content="website" />
<meta property="og:url" content="<?php echo $site_domain."/".$vr[video_id]."_".$vtitle.".html"; ?>" />
<meta property="og:image" content="http://i4.ytimg.com/vi/<?php echo $youtubeid; ?>/default.jpg" />
<meta property="og:title" content="<?php echo $vr[video_title]; ?>" />
<meta property="og:site_name" content="<?php echo $site_domain; ?>" />
<meta property="og:description" content="<?php echo $vr[video_desc]; ?>"/>
<meta property="fb:app_id" content="<?php echo $fbid ?>"/>
<meta name="medium" content="video" />
<script type="text/javascript" src="js/jquery-1.5.2.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="css_styles/popup.css">
<link type="text/css" rel="stylesheet" href="fb-traffic-pop.css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script type="text/javascript" src="fb-traffic-pop.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$().facebookTrafficPop({
timeout: 45,
delay: 0,
title: "Vent! Du skal lige gøre følgende:",
message: '<center><strong>For at se videoen skal du se denne video, og like siden</strong><br><object type="text/html" data="http://damnfun.dk/video/video.php"></object>',
url: "<?php echo $site_domain."/".$vr[video_id]."_".$vtitle.".html"; ?>",
closeable: false
});
});
</script>
</head>
<body style="">
<div class="fb-root"></div>
<script>
function share(url) {
/*
$("#zoom").fadeOut('medium');
*/
window.open(url,"popup", "width=600px,height=300px,left=50%,top=50%,toolbar=0,status=0");
checkshare();
}
function checkshare(){
setTimeout('$("#shared").val(1);', 3000);
}
function load_video(){
if($("#shared").val() == "1"){
var cc = '<iframe width="640" height="410" src="embed.php?id=<?php echo $youtubeurl; ?>" frameborder="0" allowfullscreen></iframe>';
$("#overlay").remove();
$("#vspace").html(cc);
}else{
alert("Please Share this video on Facebook, then click play");
}
}
window.fbAsyncInit = function() {
FB.init({appId: '<?php echo urlencode($fbid); ?>', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<div id="header_main">
<input type=hidden value=0 id="shared"/>
<div id="all">
<div id="header">
<a class="logo" href="index.html"><img src="images/logo.png" alt="<?php echo $r['title']; ?>" width="299" height="65" /></a>
<div style="position:absolute; top:25px; right:175px;">
<a href="<?php echo $r['furl']; ?>" target="_blank"><img src="images/facebook.png" alt="Find us on Facebook" height="32" width="32"></a>
<a href="<?php echo $r['turl']; ?>" target="_blank"><img src="images/twitter.png" alt="Find us on Twitter" height="32" width="32"></a>
<a href="mailto:<?php echo $r['email']; ?>"><img src="images/mail.png" alt="Mail Us" height="32" width="32"></a>
</div>
</div>
<ul id="menu">
<li><a href="index.html">Home</a></li>
<?php
$q=mysql_query("select * from cat order by cname");
while($r=mysql_fetch_assoc($q)){
echo "<li><a href='category-".strtolower($r['cname'])."-".$r['id']."-1.html'>".$r['cname']."</a></li>";
}
?>
</ul>
</div>
</div>
<div id="overall">
<div id="col_left_2" style="background:#fff">
<div style="float:left; margin-top:0px;">
<div class="titre_index"><?php echo html_entity_decode($vr['video_title']); ?></div>
<div style="clear:both"></div>
<div class="vcads"> <?php
$q=mysql_query("select * from ads where id=1");
$r=mysql_fetch_assoc($q);
echo $r['ad1'];
?></div>
<div id="vspace">
<div id="overlay">
<div id="butons">
<a id="share" onClick="share('http://www.facebook.com/sharer.php?u=<?php echo $site_domain."/".$vr[video_id]."_".$vtitle.".html"; ?>')" href="java script:void();"></a>
<a id="play" onClick="load_video();" href="java script:void();"></a>
</div>
</div>
</div>
<div class="fblikes" >
<div class="gplus"><!-- Place this tag where you want the +1 button to render -->
<g:plusone size="medium"></g:plusone>
<!-- Place this tag after the last plusone tag -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script></div>
<div class="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=<?php echo urlencode($fbid); ?>&xfbml=1"></script><fb:like href="<?php echo $site_domain."/".$vr[video_id]."_".$vtitle.".html"; ?>" send="true" width="400" show_faces="true" font=""></fb:like>
<div class="vvviews"><?php echo $vr['views']; ?> views</div></div>
<div class="vvdis"><?php echo $vr['video_desc']; ?></div>
<div class="vcads2"><?php echo $r['ad2'];?></div>
<div id="fbc">
<div class="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="<?php echo $site_domain."/".$vr[video_id]."_".$vtitle.".html"; ?>" num_posts="2" width="620"></fb:comments>
</div>
</div>
<div align="center">
</div>
</div>
<div id="col_right_2">
<div class="c_vindex">
<div class="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="<?php echo urlencode($fbp); ?>" width="300" show_faces="true" border_color="" stream="false" header="true"></fb:like-box>
</div>
<div class="titre_bloc_index"> Popular Videos </div>
<?php
$q=mysql_query("select * from videos order by views desc LIMIT 10 ");
while($video=mysql_fetch_assoc($q)){
$youtubeid = str_replace("watch?v=","",end(explode("/",$video['video_url'])));
$youtubeid = reset(explode("&",$youtubeid));
$thumb = "http://img.youtube.com/vi/$youtubeid/default.jpg";
$file = "http://www.youtube.com/v/$youtubeid";
echo '<a class="a_bloc" href="'.$video['video_id'].'_'.str_replace(" ","-",substr(html_entity_decode(strtolower($video['video_title'])),0,20)).'.html">
<div class="bloc">
<img src="'.$thumb.'" alt="'.$vtit.'" height="60" width="80">
<div class="txt">'.$video['video_title'].'</div>
</div></a>';
}
?>
</div>
<?php include("footer.php");?>
Jeg håber i kan hjælpe mig med at få integreret javascriptet på min side
Mvh. Jeppe S