Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 05-26-2008, 02:18 AM lightbox with php
ihsaan's Avatar
Extreme Talker

Posts: 155
Name: Ihsaan
Location: Botswana
Trades: 0
why doesnt my lightbox work? here is the code:

i have placed this in my HEAD tags

<link rel="stylesheet" href="components/com_foo/foo.css" type="text/css" media="screen" />

Code:
<script type="text/javascript" src="components/com_foo/js/prototype.js"></script>
<script type="text/javascript" src="components/com_foo/js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="components/com_foo/js/lightbox.js"></script>
and this is the code snippet that doesnt work

Code:
        $linkTarget = $mosConfig_live_site."/index.php?option=com_foo&page=show_ads&catid=$catid&adid=$row->id&Itemid=$Itemid";

        if($row->image_count > 0)
        {
            $rq = "SELECT thumb FROM #__foo_imagelist WHERE user_id = '$row->id' ORDER BY id "
            ."LIMIT 1";
            $database->setQuery($rq);
            $image_name = $database->loadResult();
            $image_link = $mosConfig_absolute_path."/components/com_foo/images/tmb/".$image_name;
            if(file_exists($image_link))
            
                        {
                $image_set = "<a href='components/com_foo/1.jpg' rel='lightbox'><img src='".$mosConfig_live_site."/components/com_foo/images/tmb/".$image_name."' align='center' border='5'></a>";
            }
            
            else
            {
                $image_set = "<a href=".$linkTarget." rel='lightbox'><img src='".$mosConfig_live_site."/components/com_foo/images/system/nopic.gif' align='center' border='0'></a>";            
            }
        }
__________________

Please login or register to view this content. Registration is FREE
ihsaan is offline
Reply With Quote
View Public Profile Visit ihsaan's homepage!
 
 
Register now for full access!
Old 05-26-2008, 04:28 AM Re: lightbox with php
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
Lightbox being javascript is client side.

Need to see the source generated to be sure whats going on.
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 05-26-2008, 05:09 AM Re: lightbox with php
ihsaan's Avatar
Extreme Talker

Posts: 155
Name: Ihsaan
Location: Botswana
Trades: 0
i have attached the output files.

btw cool fly avatar. thawt twas a fly on my screen
Attached Files
File Type: zip index.php.zip (13.2 KB, 2 views)
__________________

Please login or register to view this content. Registration is FREE
ihsaan is offline
Reply With Quote
View Public Profile Visit ihsaan's homepage!
 
Old 05-26-2008, 12:51 PM Re: lightbox with php
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
Well having looked at the generated source in the zip file, I dont see the required files.

You need the three javascript files you mention above and lightbox.css file. In your source code there are links to 3 html files ???

<script type="text/javascript" src="index.php_files/prototype.htm"></script>
<script type="text/javascript" src="index.php_files/scriptaculous.htm"></script>
<script type="text/javascript" src="index.php_files/lightbox_002.htm"></script>

You need those js files and the css file.

Last edited by maxxximus; 05-26-2008 at 12:53 PM..
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 05-27-2008, 12:29 AM Re: lightbox with php
ihsaan's Avatar
Extreme Talker

Posts: 155
Name: Ihsaan
Location: Botswana
Trades: 0
i havent included them in the zip but they are there and havent been modified.
__________________

Please login or register to view this content. Registration is FREE
ihsaan is offline
Reply With Quote
View Public Profile Visit ihsaan's homepage!
 
Old 05-27-2008, 02:54 AM Re: lightbox with php
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
Should have made that clearer.

You have no links to the required files within your head element.

You need all these within your head tags.
HTML Code:
<link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lightbox.js"></script>

Last edited by maxxximus; 05-27-2008 at 02:55 AM..
maxxximus is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to lightbox with php
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19658 seconds with 13 queries