Created By
DMG Development
As Seen On

Main Page  |  Forums  |  Register  |  Active Topics  |  Members  |  Search

 
Username:
Password:
DMG Forums >> DMG Forums Discussion >> Tutorials & HOWTO Articles >> Installing & Using DMG Forums Inside Another .NET Application Page of 3
Installing & Using DMG Forums Inside Another .NET Application
Author Topic
grimmeissen


Administrator


Join Date: 8/30/2005
Posts: 656
Location: Cincinnati, Ohio

Posted: 11/8/2007 2:31:45 PM

There have been some developers who have added better text editors to the DMG Forums application for their specific sites. As of now we have decided to keep the simple textbox and allow developers to add on as they wish.
Jin


Newbie

Join Date: 11/8/2007
Posts: 4

Posted: 11/9/2007 6:13:49 AM

Hi

DMG Forums are so cool. I love it.

One of the key features is "Multiple instances of DMG" Forums can be installed to a single database" Does it mean I can install more than one DMG to the same web application? Could you please be more specific about how to do it? I need to install different forums for different group of my members.

Or should I use administration tool to edit forum and choose the security as "Allowed Members List"? It seems I have to choose the member one by one. I got thousands of members from different university at the moment. It is not practical for me to add them to the list one by one. Is there any other way to do it?

Thanks very much.


Jin


Newbie

Join Date: 11/8/2007
Posts: 4

Posted: 11/9/2007 10:26:18 AM

Hi

I have found the answer to my previuos question. I can either change the code of "EditForum" function or insert records to table "dmg_priviliged" directly. It is all sorted out. :)

I got another question about the theme. Is it possible to use different "Web Page Design" for different forum?

Thanks.

grimmeissen


Administrator


Join Date: 8/30/2005
Posts: 656
Location: Cincinnati, Ohio

Posted: 11/15/2007 1:09:10 PM

I am glad you found the answer to your question and discovered the uses of the DMG_PRIVILEGED table.

As for having different designs for different sub-forums or categories, this can be accomplished with some simple modifications to the source code on your site.

The HTML Design template is specified on line 289 in Global.vb under the Settings class. This line of code sets a value for the variable "DefaultTemplate" which corresponds to the ID field in the DMG_SETTINGS table. When you create new layout templates, you can check this DMG_SETTINGS table to see what their ID value is.

Using this value, you could come up with some custom code to use different values for DefaultTemplate than the default template that is specified in the database. I have done it on a few custom sites before using different methods. How you choose to do it will depend on the way you have organized your site.
Kaan


Newbie


Join Date: 11/17/2007
Posts: 7
Location: Türkiye

Posted: 11/17/2007 7:04:59 AM

First of all thanks for the great job! a LEAN forum is what I need and at last found.

I was able to setup it standalone but when I tried to integrate it with my current application I couldn't

No errors nothing but a blank setup.aspx page which I think means that the connection is not set up correctly.

Here is my tag for DMG:
<appSettings>
<add key="DatabaseString" value="Driver={SQL Server};Server=VPS05-101\SQLEXPRESS;Database=EMForum;" />
<add key="DatabasePrefix" value="DMG" />
<add key="LongDateFormat" value="MMMM d, yyyy" />
<add key="ShortDateFormat" value="M/d/yyyy" />
<add key="DateTimeFormat" value="M/d/yyyy h:mm:ss tt" />
</appSettings>

And here is my original connection string:
<add name="aspnetdbConnectionString" connectionString="Data Source=VPS05-101\SQLEXPRESS;Initial Catalog=EM;Persist Security Info=True;Trusted_Connection=Yes" providerName="System.Data.SqlClient"/>

Thank you in advance,
Keep up the great job.

Kaan

grimmeissen


Administrator


Join Date: 8/30/2005
Posts: 656
Location: Cincinnati, Ohio

Posted: 11/17/2007 9:05:34 PM

Looks like you left out the "Trusted_Connection=yes;" in your ODBC connection string for DMG.
Kaan


Newbie


Join Date: 11/17/2007
Posts: 7
Location: Türkiye

Posted: 11/18/2007 2:41:03 AM

<appSettings>
<add key="DatabaseString" value="Driver={SQL Server};Server=VPS05-101\SQLEXPRESS;Database=EMForum;Persist Security Info=True;Trusted_Connection=Yes;" />
<add key="DatabasePrefix" value="DMG" />
<add key="LongDateFormat" value="MMMM d, yyyy" />
<add key="ShortDateFormat" value="M/d/yyyy" />
<add key="DateTimeFormat" value="M/d/yyyy h:mm:ss tt" />
</appSettings>

Doesn't work neither.

I was going to change the connectionstring programmatically so first wanted to see what it's value and put a msgbox() on pageload event but even that doesn't work. Only a blank page.



Kaan


Newbie


Join Date: 11/17/2007
Posts: 7
Location: Türkiye

Posted: 11/18/2007 2:48:51 AM

Also this script on setup.aspx page doesn't work:

<script id="kk" language="vbscript" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
MsgBox(DMGForums.Global.Database.ConnString.ToString)
End Sub
</script>
<HTML>
<HEAD>
........

Kaan


Newbie


Join Date: 11/17/2007
Posts: 7
Location: Türkiye

Posted: 11/18/2007 2:51:07 AM

And this is the sourcecode of the blank page:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>
<HEAD>
<title>DMG Forums Installer</title>
</HEAD>
<BODY>
<form name="ctl00" method="post" action="setup.aspx" id="ctl00" enctype="multipart/form-data">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTI3NzQ2NTc1NGRkg66HVDVeIURSf0g7vrTS8/rI51g=" />
</div>
</form>
</BODY>
</HTML>

Kaan


Newbie


Join Date: 11/17/2007
Posts: 7
Location: Türkiye

Posted: 11/18/2007 5:52:25 AM

Ok I've produced the connection string:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
MsgBox(DMGForums.Global.Database.ConnString.ToString)
End Sub

"Handles Me.Load" part was missing.

And the result is:
Driver={SQL Server};Server=VPS05-101\SQLEXPRESS;Database=EMForum;Persist Security Info=True;Trusted_Connection=Yes;

So the configuration in web.config seems to be ok, but still only the blank page.

Any comments?

Kaan


Newbie


Join Date: 11/17/2007
Posts: 7
Location: Türkiye

Posted: 11/18/2007 6:01:46 AM

Ok I've just changed the panel's visible attribute to true and installed the DB but why it didn't show up? May that be a problem in the future?

<asp:Panel id="SetupForm" visible="false" runat="server">

grimmeissen


Administrator


Join Date: 8/30/2005
Posts: 656
Location: Cincinnati, Ohio

Posted: 11/19/2007 8:22:24 PM

Without your specific server and setup in front of me, it's not possible for me to re-create the issues you have seen. Honestly you are the first person to have this kind of problems, so it seems like maybe a special case. I will examine this part of the code to check for places that might cause problems in normal setups. I think I will set up a trusted connection database in my development environment to see if I can re-create any issues. I'm glad you got it working anyway.

On a side note, I'm going to go ahead and lock this thread. The purpose of the original tutorial has kind of gotten cluttered with some replies. Any future questions in regards to installing DMG within another ASP.NET application can be addressed in the general discussion forum.

Thanks for all the input everyone.
« First    « Previous Page of 3   


  Copyright DMG Development DMG Forums 3.2