Andre Decio
 Nuke Active Member Posts:32

 |
11/24/2011 1:51 PM |
|
Hi, I'm new to DNN (6 Community edition), and have been developing a site and learning as I go. The tutorials are great, thanks to your very clear presentations. I have more unanswered questions the more I get into DNN, so you'll forgive me if some of these are 'dumb'. At the moment I need to know how I can integrate my own written VB.net code with a DNN site. The method I'm used to is of course through the .aspx files with 'code behind'. Does DNN allow me to basically write any VB.net code as I would for an .aspx page? For example, I need to be able to click on a Gallery image, and have that take me to another page that then displays that image in a panel on the page. Normally, I'd do that via a querystring, or session table (or even SQL table) variable, and pick it up in the receiving .aspx page, and display the correct image. There's lots of other functionality on the page so it's not just displaying a photo. Another key area is AJAX functionality. Full postbacks should be avoided at all costs (according to my customers anyway), if not necessary. How easy is it to implement AJAX functionality to a DNN site so that I can make better products for my customers? Cheers for your support. |
|
|
|
|
Joseph Craig DNN MVP Posts:11667

 |
11/24/2011 2:21 PM |
|
If you want to do "raw" ASP.NET coding, you can certainly do that. You can build a skin that has absolutely nothing on it except a single content pan, and you can drop your module on the page. Within the module you can pretty do almost anything that your want or need to do. However, you'd be giving up a lot by not taking advantage of all of the facilities provided by the DotNetNuke framework. It's fairly typical to pass information between pages with querystring variables, so that's certainly in the list of things you can do. You can take advantage of AJAX. Both jQuery and jQueryUI are built into the latest versions of DotNetNuke. In fact, the latest (6.x) versions have been engineered to minimize postbacks. So, you could take a look at see how that is done in the framework. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Andre Decio
 Nuke Active Member Posts:32

 |
12/06/2011 12:24 AM |
|
Oh boy I'm in need of understanding this so I can move forward. I understand about doing things exclusively via modules, but I can't get the functionality I need so I'm racking my brains how to get round this and quickly as my customer's face is getting redder and redder. EG. Gallery module: I need to be able to click on a thumbnail, and that redirect to another page which shows a whole load of other stuff, but in one panel displays the selected photo. How can I 'insert' some vb.net (or Javascript?) code to enable that, still using the Gallery module? And on the receiving end, put in the code to get that selected image from the appropriate gallery and display it? I suppose the key missing understanding is how to put vb.net code into a DNN generated page, that can respond to the ASP.net event sequence eg. PageLoad, PreRender etc. Help! |
|
|
|
|
Joseph Craig DNN MVP Posts:11667

 |
12/06/2011 7:13 AM |
|
First, realize that DotNetNuke is "just" an ASP.NET web application. So, anything that you need to do can be done. Don't think of writing code in VB or c# as contrary to what happens in DotNetNuke. One of the really nice things about DotNetNuke is that the source code is available and also the source code for all of the included DotNetNuke modules. If you know what you are doing, you really can dig in and customize things when needed. Now, customizing the DotNetNuke framework is a really bad idea because that will make it difficult to upgrade. But, creating a custom version of a module is a "best practice." Simply grab a copy of a module and work on it. I usually recommend renaming the module and also the namespaces so that you don't conflict with DotNetNuke internals. We do have on tutorial on customizing a module: "How to improve a DotNetNuke module (The Blog module)". For module programming, the current series here, the book by Mitchel Sellers and the video tutorial series from Chris Hammond and available at DotNetNuke.com are great resources. The other approach to modifying a module is through the use of javascript and jQuery. If you are using DotNetNuke 6.x, jQuery and jQuiryUI are part of the package, but you can use them with earlier versions. One approach to the application that you mention would be to use jQuery to add onclick behavior to a thumbnail image that is displayed by the Gallery module. Then, you could grab the link to the image and send it to the next page in a querystring variable. Modules on that new page (you didn't say which module) could read it and do their processing. Do you have a site that is accessible with the Gallery module on it? It is always easier to point to a live example when discussing these things. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Andre Decio
 Nuke Active Member Posts:32

 |
12/06/2011 9:01 AM |
|
OK, cheers Joe. I'll watch those recommended vids and have a go at customising a module as per your recommendation. Many thanks for your advice. PS. may I send you my website via private email? I have a strict NDA with the customer. |
|
|
|
|
Andre Decio
 Nuke Active Member Posts:32

 |
12/13/2011 2:08 AM |
|
Got a new question about security: Is there a way to separate permission to change module settings, from permission to change module content? I want an admin type id that can only change content on the site. That's pretty usual I guess? I'm using Community edition DNN6. Cheers |
|
|
|
|
Joseph Craig DNN MVP Posts:11667

 |
12/13/2011 6:35 AM |
|
Out of the box, no. You might be a candidate for the Advanced Permissions Provider developed by Oliver Hine ( http://dnnpermissions.codeplex.com). This enables more granular control of permissions for pages, modules and the file manager. Be aware that Oliver describes that is "beta" software, so I would recommend that you test it in an environment separate from a live site before putting it into production. That said, I do think that it works just fine, but be careful! |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|