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

HomeHomeOur CommunityOur CommunityCommunity Membe...Community Membe...New module: easily add your own code with phdcc.CodeModuleNew module: easily add your own code with phdcc.CodeModule
Previous
 
Next
New Post
1/16/2008 3:50 PM
 

The new phdcc.CodeModule module provides a simple way to add your own program code (and custom HTML) to a DNN site without having to write a full module or resort to using an IFRAME.
        http://www.phdcc.com/phdcc.CodeModule/

For example, save the following code as "view1.ascx" and upload it to the "DesktopModules\phdcc.CodeModule" directory using FTP or [Admin][File Manager].

<%@ Control Language="VB" ClassName="view1" %>
<%
        If Not Page.IsPostBack Then
                lblSetInCode.Text = "I was set in code"
        End If
%>
<asp:Label ID="lblSetInCode" runat="server" /><br />
<% Literal1.Text = "I was set in <code>view1.ascx</code>" %>
<asp:Literal ID="Literal1" runat="server" />

Next, add a phdcc.CodeModule module to a DNN page and then, using the Settings page, specify your file as: "view1.ascx".

Your code will produce the following output:
I was set in code
I was set in view1.ascx

Your code can be written in VB or C# and do anything that ASP.NET code can do, including accessing Session variables. Because it runs in DNN, you can use DNN methods such as UserController.GetUser() and can access the DNN database.  Warning : if you install this module, be careful who you allow to access these powerful facilities.

phdcc.CodeModule v01.00.02 is available to use for free from PHD Computer Consultants Ltd, England UK.  Download here:
        http://dnn.phdcc.com/Downloads/tabid/54/Default.aspx

A future version will allow you to edit your code online, rather than having to upload it.

Chris Cant
phdcc: e-media tools and e-publishing services
PHD Computer Consultants Ltd, http://www.phdcc.com/

 
New Post
1/18/2008 8:40 AM
 

Chris, kudos on this release.  One of the most common questions I see in the forums is asking for something like this (at least it was common for me when I began using DNN).  Looking forward to the future version!


Chad Voller -- MCP, DNN Aficionado
Leapwise Media
View my View Chad Voller's profile on LinkedIn
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityCommunity Membe...Community Membe...New module: easily add your own code with phdcc.CodeModuleNew module: easily add your own code with phdcc.CodeModule


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