Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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...Skins, Themes, ...Skins, Themes, ...Dynamic Banner - PostbacksDynamic Banner - Postbacks
Previous
 
Next
New Post
9/23/2010 12:12 PM
 
Hello..
I've been tasked with converting an existing website (http://bainbridgetwp.com/) over to DNN.  We don't have access to the source PHP code.
But, what I'm having issues trying to figure out and get working, in the banner, underneath "Township", there are three small photos.  These photos change to different photos for every page refresh or when a new page is hit.
How can I implement this into a skin file so the image change as well?
I'm using an ascx file for the skin.  Thanks.. -Jeff
 
New Post
9/23/2010 12:16 PM
 
There are a number of ways you could do this. You could use the "banner" functionality in DNN, though that would probably be a bit overkill. You could do some custom javascript in the skin which loads the images, you could do it with inline VB.NET or C# code as well. If I get a chance later today I'll try to follow up with some example code.

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
10/6/2010 3:11 PM
 
If anyone is looking for something similar with their webpage, merge this into their skin file.

Code:

<script runat="server">
Private Sub Page_Load( ByVal sender As Object, ByVal e As EventArgs ) Handles Me.Load
        Page.ClientScript.RegisterClientScriptInclude(Me.GetType(), "Global", PortalSettings.ActiveTab.SkinPath & "js/fadeslideshow.js")
    End Sub
</script>


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">


/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
var galleries = [];
(function(){
var images = [
["<%=PortalSettings.ActiveTab.SkinPath%>/images/headerrandomimages/1.jpg"],
["<%=PortalSettings.ActiveTab.SkinPath%>/images/headerrandomimages/2.jpg"],
["<%=PortalSettings.ActiveTab.SkinPath%>/images/headerrandomimages/3.jpg"],
["<%=PortalSettings.ActiveTab.SkinPath%>/images/headerrandomimages/4.jpg"],
["<%=PortalSettings.ActiveTab.SkinPath%>/images/headerrandomimages/5.jpg"] //<--no trailing comma after very last image element!
], i = 1;
images.sort(function(){return 0.5 - Math.random();});

for(i; i < 4; ++i){
galleries.push(new fadeSlideShow({
wrapperid: "fadeshow" + i, //ID of blank DIV on page to house Slideshow
dimensions: [60, 27], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: images.splice(0, 3),
displaymode: {type:'auto', pause:30000, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 1, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
}));
}
})();</script>


<div id="fadeshow1" style="width: 60px; height: 27px" ></div>
<div id="fadeshow2" style="width: 60px; height: 27px" ></div>
<div id="fadeshow3" style="width: 60px; height: 27px" ></div>

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Dynamic Banner - PostbacksDynamic Banner - Postbacks


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