Welcome Guest, Not a member yet? Register   Sign In
getting full news to show in lightbox type window
#1

[eluser]DynamiteN[/eluser]
Hello everyone, and hurraay for my first post Smile

i've been fiddeling around to figure out how to get my news item to show
in a lightbox type window, a modal window or whatever the name is Smile

here how it is i do have the part where i get the news items adn such and i have then looped it to show as links and when i click the link it opens a new window (anchor_popup)
and i can read everything just fine but i dotn what it to open a new window
but rather sort of fade out and display a kind of lightbox window instead,

this is the code to display the titles of the news and make them links

Code:
<?php if(isset($news)) : foreach($news as $row) : ?>
        
    <?php
        $attr = array(
            'width'        =>    '800',
            'height'    =>    '600',
            'screenx'    =>  '450',
            'screeny'    =>  '100',
            'scrollbars'=>    'no',
            'status'     => 'no',
            'resizable'  => 'no',
        );
    ?>
        
        &lt;?php echo anchor_popup("/home/show/$row->id", $row->title, $attr); ?&gt; <br/>

        
        &lt;?php endforeach; ?&gt;
        &lt;?php else : ?&gt;
            
             no news atm
        
        &lt;?php endif; ?&gt;
and from that show method it open a view named (news_popup)
this is the code in that view
Code:
<h1>&lt;?php echo $news->title; ?&gt; </h1>
<p>&lt;?php echo $news->content; ?&gt;</p>
<h2>&lt;?php echo $news->author; ?&gt;</h2>

this works just fine but i dont know how to get it in a fancy window Smile
if anyone knows this please tell me...


//DynamiteN
P.S Yaay end of my first post here Smile
#2

[eluser]DynamiteN[/eluser]
please anyone, would like some help with this as i aint any good at all with javascript or whatever the language for this type of thing is
#3

[eluser]danmontgomery[/eluser]
http://colorpowered.com/colorbox/

Colorbox is a simple jquery lightbox plugin, there's even an example doing exactly what you want so you can just copy and paste.
#4

[eluser]DynamiteN[/eluser]
[quote author="noctrum" date="1264640568"]http://colorpowered.com/colorbox/

Colorbox is a simple jquery lightbox plugin, there's even an example doing exactly what you want so you can just copy and paste.[/quote]


thanks alot, i thought i had searched alreade everywhere on the internet :O,
will check it out ty...




Theme © iAndrew 2016 - Forum software by © MyBB