Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Other
Author Message
z-grimv
New Member
New Member



Joined: Feb 04, 2008
Posts: 14

PostPosted: Fri Apr 23, 2010 11:46 am Reply with quote

Ello,

I was wondering if anyone would be kind enough to explain to me how to include shadowbox so that I can use the shadowbox anywhere in the site.

I read that it has to be in the header.php but I can't see to make it work.

The shadow box site states that the below code has to be put in the <head> of the document..
Code:
<link rel="stylesheet" type="text/css" href="shadowbox.css">

<script type="text/javascript" src="shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init();
</script>

but no matter what I do I can't get it to work. I can get it work by including this in a custom block created via the admin panel but I don't want to always put the above in everytime I want to use the shadow box feature on an image.

Any help would be highly appreciated.

Regards
Z-GrimV
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Fri Apr 23, 2010 12:01 pm Reply with quote

RavenNuke already has a colorbox included with it. To use the colorbox, you simply need to add
Code:
 class="colorbox" 
to the link you want to be in a colorbox.

and example would be like so.
Code:
 <a href="mysite.com/image" class="colorbox"><img src="myimage" /></a>

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
z-grimv







PostPosted: Fri Apr 23, 2010 6:33 pm Reply with quote

ah, that's how to use colorbox Smile Big thanks for the info

Now I have a second issue where colorbox (lightbox or shadowbox) will not run when I am using jquery for an accordion style menu....what's up with that? I am reading about the change $ to J$ and nonconflict stuff but that seems to be beyond my abilities to resolve.
 
nuken







PostPosted: Fri Apr 23, 2010 6:49 pm Reply with quote

IMO your best bet would be to create a head-menu.php file in your includes/addons directory and add you js inside there like so.

Code:


<?php
addJSToHead('includes/jquery/jquery.js', 'file');
addJSToHead('includes/jquery/jquery.colorbox-min.js', 'file');
addJSToHead('your accordion js file location', 'file');

?>


That way your javascript files will be added in the proper order to the array.
You can also call css files the same way.

Code:
addCSSToHead('your css file location', 'file');
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Other

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©