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 ...Magic Content / Images pathMagic Content / Images path
Previous
 
Next
New Post
1/21/2008 9:46 AM
 

Hi there

I'm using 04.07.00 and actual version of Magic Content from http://www.portalfabrik.net.
When inserting an image into Magic content, after saving the image path changes from /DotNetNuke/Portals/0/test/test.jpg to http://localhost/dotnetnuke/DotNetNuke/Portals/0/test/test.jpg, which is an invalid path and picture is not shown.

Does anyone has an idea where to config Magic Content to avoid this problem?


Best regards
jtil

 
New Post
1/21/2008 12:21 PM
 

This happens, if you use MagicContent in a subportal. It´s a "bug" thats can only be fixed in the source, which you can also get from Philipps Portal.

At the german DNN-Usergroups forum he postet that he would release a new version ported to .net 2.0.

Greetings from Germany

Stephan


Greetings from Germany,
Stephan Schneider

 
New Post
1/22/2008 3:26 AM
 

Hi Stephan

Thank you for reply. I've had no clue using a subportal. There is just one portal. Anyhow, I downloaded source and now, surly, next question: where to change what and how to build new modul????

greets from germany, too

 
New Post
1/23/2008 4:27 AM
 

Hi JTI,
like Stephan wrote, we had the problem with Subportals.
IMHO it's a problem with the replacement of the URLS in the img-tag.
The workflow seems to be the following:
1.) The module will receives the content from every editor. The amount of editors depends on the languages you use.
2.) The HTML will be parsed for IMG-tags
3.) The src-Property off all img tags will be replaced with the database id. You can find that ID in file Table.
4.) The parsed text will be saved
This works fine.
The error occurs if you want to display the text..
In that case the ID's have to be replaced with a working!!! URL.
In this URL cannot be the portal alias. It must be the path to the portal home directory.

Please open the file contentprocessor.vb.

replace the function "GetFilePath" with:

Private Function GetFilePath(ByVal FileID As Integer) As String

            Dim ImageFile As DotNetNuke.Services.FileSystem.FileInfo
            Dim FileController As New DotNetNuke.Services.FileSystem.FileController
            ImageFile = FileController.GetFileById(FileID, PortalId)
            If Not ImageFile Is Nothing Then
                'fix for sending out content in emails
                Dim strDomainName As String = GetPortalDomainName(objPortal.PortalAlias.HTTPAlias, Nothing, True).ToLower()
                Dim u As New Uri(strDomainName)
                If strDomainName.StartsWith("https:") Then
                    strDomainName = "https://" & u.Host & "/"
                Else
                    strDomainName = "http://" & u.Host & "/"
                End If

                'we now always use fully qualified urls, this for sending out emails
                Return strDomainName & objPortal.HomeDirectory & ImageFile.Folder & ImageFile.FileName
            Else
                Return GetPortalDomainName(objPortal.PortalAlias.HTTPAlias, Nothing, True) & "/images/" & "blank.gif"
            End If

        End Function

In our case it's working.


sovort-it

Dipl.Ing.(FH)
Jürgen Sommer
soVort-IT, Jürgen Sommer IT Consulting
Südstraße 15
61169 Friedberg
--------------------------------------------------
Telefon: +49 (0)6031 791 749
Telefax: +49 (0)6031 791 697
Email: juergen.sommer@sovort-it.com
Web: http://www.sovort-it.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Magic Content / Images pathMagic Content / Images path


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