Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to insert Page Header Tags after jquery scriptHow to insert Page Header Tags after jquery script
Previous
 
Next
New Post
11/15/2009 6:17 AM
 

Hi,

I have a colorbox/lightbox script that I would like to reference in the head section. Now when I go to the advanced settings of the page and insert my script in the Page Header Tags section, the script seems to insert it just before the jquery script and hence the colorbox/lightbox doesn't work. Is there a way to put my scripts just after the jquery script within the head section?

Thanks
Wasim

 
New Post
11/24/2009 7:37 PM
 

I'm also having a similar problem using the colorbox library.

I have DNN5 setup to include the jQuery reference in the header as a reference to the Google URL.  I then include the colorbox script in a text/html module.

I can see that the script is running with no errors as when I change the function name it reports it cannot find it, but I get no lightbox.  I'm new to jQuery and have read some references to using jQuery.noConflict() and also wrapping $ references in a function() wrapper, both of which I have tried with no succes.

<script type="text/javascript" src="/js/colorbox/jquery.colorbox.js"></script>
<script type="text/javascript">
  (function ($) {
   $(document).ready(function(){
    $(".inline").colorbox({width:"50%", inline:true, open:true, height:500, scrolling:false, href:"#inline_example1"});
   });
  }(jQuery));
</script>

Is there anybody out there doing something similar that works?

Many thanks,

Steve

 
New Post
11/25/2009 5:58 AM
 

Currently I don't think it's possible to put the script in the head section as I haven't had any positive response yet. So what I have done is to put the colorbox script within the body. To do that, all I did is put the script in the Text/HTML module's header tag in advanced settings and that works fine for me.

 
New Post
11/30/2009 6:53 PM
 

I still can't work this out.  I have the CSS in the page header and I can see that's being picked up OK.  I don't inlcude the jQuery reference as the portal already has this defined at the portal level and I can see the file being included.  I then put the colorbox specific <script> in the header of the text module but still no good.

Could you perhaps post the example of your code (are you modifying the $ ref for example, or using noConflict?).

Thanks,

Steve

 
New Post
12/10/2009 7:57 AM
 

Hop this helps:

Page Settings - put in header tags section

<link type="text/css" media="screen" rel="stylesheet" href="/Resources/Shared/colorbox/colorbox.css" />
<!--[if IE 6]>
<link type="text/css" media="screen" rel="stylesheet" href="/Resources/Shared/colorbox/colorbox-ie6.css"/>
<![endif]-->

I just put ie6 as a seperate css file you can remove that statement if you want.


Module Settings - put in header

For Single Photo

<script type="text/javascript" src="/Resources/Shared/colorbox/jquery.colorbox-min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$(".photo").colorbox({overlayClose:false, photo:true});  
});
</script>

For Grouped Photos

<script type="text/javascript" src="/Resources/Shared/colorbox/jquery.colorbox-min.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
$("a[rel='photos']").colorbox({current:'Photo {current} of {total}', overlayClose:false, slideshow:true,

slideshowSpeed:4000, slideshowAuto:false, photo:true});  
});
</script>

I think the key here is photo:true and ofcourse in the html editor you will need to put the specific class or rel attribute.

Best regards,
Wasim

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to insert Page Header Tags after jquery scriptHow to insert Page Header Tags after jquery script


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out