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...Administration ...Administration ...Banner problemsBanner problems
Previous
 
Next
New Post
10/23/2006 11:55 AM
 

I am sure I can't be the only person having these issues

I am re working a site from ASP -

The current banners are basically badges but occationally they may have a text header and some may have a post script sales slogan some have both

most are the same size but ome are half height

 

I have managed to get the appearance correct by pasting the current asp generated code into the text/script section and marking them as script type banners unfortunately the click count doesnt work when they are implemented this way!!!

So I tried using the text type which sort of worked but had the odd problem of needing a title entry ( not always suitable from the current ads as this is often more of a sales text than a title

I have looked at the idea of coding my own type that matched the current spec I am trying to reproduce but at this stage I don't really want to look at re writing any of the core code ( though it does look like it should only be the vendor/banner module affected but this does seem a bit extreme)

Is there anyone with any straight forward solutions on offer - I'd rather not have to buy any add on's just for this.

 

 


Dave DNN 4.3.5 IIS - 6 ?? SQL Server 2005
 
New Post
10/25/2006 2:36 AM
 

Well as one way of trying to find more out a bit more about these banners I tried to re code my own banner type

This has essentially taken the form of adding a new banner type

 

My spec is to use the image url for the picture

The text area can contain pre amble text an marker for where the image is displayed and post image text

e.g

Head or title text[IMAGE]footer

would show the head text on a line above the image then the image then the footer text below - the image is the only clickable link the text is 'dead'

I have covered that if the image tag is missing then it is assumed that all the text is footer text

-Code Changes as follows

http://localhost/DotNetNuke/App_GlobalResources/GlobalResources.resx
Add
Name                            Value
BannerType.Untamed.String CustomBanner

http://localhost/DotNetNuke/admin/Vendors/Banners.ascx.vb
Public Function DisplayType
Add to case statement
       Case Services.Vendors.BannerType.CustomBanner : _DisplayType = Services.Localization.Localization.GetString("BannerType.CustomBanner.String", Services.Localization.Localization.GlobalResourceFile)

 

..\Library\Components\Vendors\BannerTypeInfo.vb

 Public Enum BannerType As Integer
 
Add        CustomBanner = 8
   


..\Library\Components\Vendors\BannerTypeController.vb

  Public Function GetBannerTypes() As ArrayList

   Dim arrBannerTypes As New ArrayList

Add
            arrBannerTypes.Add(New BannerTypeInfo(BannerType.CustomBanner, Services.Localization.Localization.GetString("BannerType.CustomBanner.String", Services.Localization.Localization.GlobalResourceFile)))

  


..\Library\Components\Vendors\BannerController.vb

Add

Case BannerType.CustomBanner

                    Dim WrkString As String = Description
                    Dim StrPos As Integer


                    StrPos = Instr(1, WrkString, "[IMAGE]")
                    If (StrPos > 1) Then
                        If Trim(Left(WrkString, StrPos)) <> "" Then
                            strBanner += "<span class=""BannerText"">" & Left(WrkString, StrPos - 1) & "</span><br>"
                            WrkString = Mid(Description, StrPos + 7)
                        End If
                    End If
                    If ImageFile.IndexOf("://") = -1 And ImageFile.StartsWith("/") = False Then
                        If ImageFile.ToLower.IndexOf(".swf") = -1 Then
                            strBanner += "<a href=""" & strURL & """ target=""" & strWindow & """>"
                            Select Case BannerSource
                                Case "L"       ' local
                                    strBanner += FormatImage(HomeDirectory & ImageFile, Width, Height, BannerName, Description)
                                Case "G"       ' global
                                    strBanner += FormatImage(Common.Globals.HostPath & ImageFile, Width, Height, BannerName, Description)
                            End Select
                            strBanner += "</a><br>"
                        Else ' flash
                            Select Case BannerSource
                                Case "L"       ' local
                                    strBanner += FormatFlash(HomeDirectory & ImageFile, Width, Height)
                                Case "G"       ' global
                                    strBanner += FormatFlash(Common.Globals.HostPath & ImageFile, Width, Height)
                            End Select
                        End If
                    Else
                        If ImageFile.ToLower.IndexOf(".swf") = -1 Then
                            strBanner += "<a href=""" & strURL & """ target=""" & strWindow & """>"
                            strBanner += FormatImage(ImageFile, Width, Height, BannerName, Description)
                            strBanner += "</a><br>"
                        Else ' flash
                            strBanner += FormatFlash(ImageFile, Width, Height)
                        End If
                    End If
                    If (StrPos > 0) Then
                        strBanner += "<span class=""BannerText"">" & Mid(Description, StrPos + 7) & "</span><br>"
                    Else
                        If Trim(WrkString) <> "" Then
                            strBanner += "<span class=""BannerText"">" & Description & "</span><br>"

                        End If
                    End If

----------

All seems well apart from the same problem I have been having before

The redline when left as shown above allows the counter to be updated for click throughs but unfortunately displays the home page of the local site rather than the url defined

When I change this line to  

strBanner += "<a href=""" & URL & """ target=""" & strWindow & """>"

I then get the correct Url opened in a new window but unfortunately the count is no longer incremented????

Has anyone any Ideas where I am going wrong with this??

  

 


Dave DNN 4.3.5 IIS - 6 ?? SQL Server 2005
 
New Post
10/27/2006 6:27 AM
 

Well it seems the code above with the strUrl actually works I was just having problems with thecachung and stopping /starting DNN to test it

Now I am haveing version problems with other already compiled dll's but otherwise it works a treat


Dave DNN 4.3.5 IIS - 6 ?? SQL Server 2005
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Banner problemsBanner problems


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