Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums How To litebox & n13news
Agm
Posted on 26 May 2010, 17:39:18

Access: Member
Total Posts: 2
Joined: 2010-04-26

I want to display posted images via litebox .
How to drop this javascript into n13news?

#2338
Hackerzlab
Posted on 07 Jun 2010, 07:07:14

Access: Member
Total Posts: 31
Joined: 2009-09-25

i'm not one of those who would help people but today is a different day... Chris has made the script "powered by" optional in the latest version. haven't tested the script though.

you must learn html/css ;) but anyways here's a quick tutorial to get it working:

Put this code in between <head> </head> section of your .php page:
Code:
<script type="text/javascript" src="css/jquery-1.2.6.pack.js"></script>
<script>

$(document).ready(function() {

//select all the a tag with name equal to modal
$('a[name=modal]').click(function(e) {
//Cancel the link behavior
e.preventDefault();

//Get the A tag
var id = $(this).attr('href');

//Get the screen height and width
var maskHeight = $(document).height();
var maskWidth = $(window).width();

//Set heigth and width to mask to fill up the whole screen
$('#mask').css({'width':maskWidth,'height':maskHeight});

//transition effect
$('#mask').fadeIn(1000);
$('#mask').fadeTo("slow",0.8);

//Get the window height and width
var winH = $(window).height();
var winW = $(window).width();

//Set the popup window to center
$(id).css('top', winH/2-$(id).height()/2);
$(id).css('left', winW/2-$(id).width()/2);

//transition effect
$(id).fadeIn(2000);

});

//if close button is clicked
$('.window .close').click(function (e) {
//Cancel the link behavior
e.preventDefault();

$('#mask').hide();
$('.window').hide();
});

//if mask is clicked
$('#mask').click(function () {
$(this).hide();
$('.window').hide();
});

});

</script>
<style>
#mask {
position:absolute;
left:0;
top:0;
z-index:9000;
background-color:#000;
display:none;
}

#boxes .window {
position:fixed;
left:0;
top:0;
width:440px;
height:200px;
display:none;
z-index:9999;
padding:20px;

}
#boxes #dialog3 {
width:375px;
height:203px;
padding:10px;
background-color:#ffffff;
}
</style>

and then put this code in the <body> section of your page:

Code:
<a href="#dialog3" name="modal">Read News</a>
<div id="boxes">
<div id="dialog3" class="window">
<p align="right"><a href="#"class="close"/>Close it</a></p><br />
<?php
include 'news/index.php';
?>
</div>
<div id="mask"></div>
</div>


its done. download the jquery without fail. i can't upload the jquery! there's no upload button :(

okay here's the link to download jquery:
http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js
dont forget to thank me and Chris. All the respect for him
#2397
Network-13.com © 2013