Updating DotNetNuke image library - dotnetnuke

Have written simple file picker control for my dotnetnuke site, because the one that ships with dnn doesn't really do what I need. The file picker uses System.IO for collecting directory information and uploading files to the portals root and subfolders. These images can then be inserted where ever I need them. The problem is images uploaded in this manner don't seem appear appear in the file manager or image manager used by the html/text module.
Is there anyway I can register these files with dnn when I upload them so they will also appear in the html/text image manager?
What would be even better is if there is a way to use the image manager that is built in the html module, outside the module although am not looking to buy a pre-made module.
Any thoughts?

You would want to use the DNN API for uploading files.
As for using the built in Image Manager that you find in the HTML module, that is part of the Telerik Rad Editor. You might be able to dig through the source for the Rad Editor Provider and figure out how to include just that portion into an outside module, though that might technically require a valid Telerik license to do.

Related

In a codenameone project - How can I get images programmatically from the project resources folder?

CodenameOne changed the project structure after the maven dependence manager passed to be used as the new standard for dependence management.
Now exists a new folder called resources at the same level as the java folder. (in project structure)
I put my images inside the /resources/images.
How can I get these images programmatically?
I tried some java common approaches without success.
Don't put the images in a folder under resources. Put them directly in common/src/main/resources then access them using /imagename.png as you always have.

Using custom icon assets with DesktopAppConverter UWP

I'm using DesktopAppConverter to convert my WPF application into a windows store compatible app. Right now I'm able to get the AppX built but the problem is to do with my application assets.
At the moment, DesktopAppConverter is taking my existing Icon (which looks great in WPF) and using it to somehow create all the different Assets at different resolutions for the UWP app. The icons it creates are coming out looking terrible, really blocky and clearly upscaled.
The way I'm looking at it is that there's 2 options.
1 - I specify a really large Icon file in my WPF app that might somehow end up being scaled better inside DesktopAppConverter. The problem here is that with a large resolution Ico file, I end up with a crazy large file (Ico's don't compress very well from what I understand).
2 - I specify a folder of correctly scaled assets (created using UWP Tile Generator) when building through DesktopAppConverter. This is what I'd like to do. I don't really want to be tweaking my Assets every time.
The 3rd choice is the one I'm heading towards, but don't really want to do. It involves building with AppX, then replacing the assets, then using MakeAppX, then re-signing with the SignTool. All of that seems really unnecessary, so I'm hoping someone from MSFT can let me know I'm missing something fundamental.
Thanks.
The easiest way to handle the visual assets for your app package is to use the package manifest editor in Visual Studio 2017.
To use it for your converted app, create an empty UWP project and add the output of the conversion (incl. your appx manifest) in this project. Now you can use the editor to manage the visual assets, build your packages for store submission and much more.
Here is a document that describes the process:
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net
Thanks,
Stefan Wick - Windows Developer Platform

How to set up DotNetNuke for development

I am part of a team of .NET developers and we're trying to use the DNN platform as a way to have a website template so that we will not have to spend weeks or months building core functionality, such as authentication, permissions, navigation, etc. However, I'm very confused as to how the platform works as well as how it's installed. I'v spent many hours researching online at http://www.dnnsoftware.com/ as well as other sites, which only added to my confusion. Here are some specific questions which are still unanswered:
Do we install the source code or not? http://www.dnnsoftware.com/wiki/how-to-install-the-source-package-of-dotnetnuke says that it's not recommended to install source code. On the other hand, http://www.dnnsoftware.com/wiki/packages says that we should use the source code if we are developers (which we are).
If we don't use source code, how do we write code which will be used to add functionality, style, or business logic to our site? Where exactly do we put this code?
I keep on seeing the term "module" being thrown around. What in the world is a module?? Is it a separate .csproj file? Is it a .cs file saved as part of the website? If so, how would we incorporate it without the source code?
Like any other application, we need to be able to maintain full control of builds and deployments. With this, we can see history of what we did, roll back changes if necessary, etc. Currently, for our other projects, we build with TeamCity and deploy with OctopusDeploy. Where does that fit into working with DNN without source? I also know that DNN is set up as a web site project not a web application project (see here http://www.dnnsoftware.com/forums/threadid/338902/scope/posts/threadpage/1) and web site projects is a technology not really being maintained by the newer versions of Visual Studio, and may be harder to deploy as well. Assuming I DON'T want to convert (http://blogs.msdn.com/b/webdev/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx), how would I build/deploy the web site project?
http://blogs.msdn.com/b/webdev/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx seems to state that it's not recommended to remove dependencies from DNN and replace them with other ones. If that's really true, it makes the whole platform seem very fragile and makes me wonder if I'm using the wrong tool altogether. Was DNN really meant for developers or not? (And if not, what was then intended use?)
Start here->
http://www.christoc.com/Tutorials/All-Tutorials/aid/1
1) Don't touch the DNN source, trust me, it isn't worth the headache
2) You add functionality, override style, etc, through the use of Extension (modules and skins)
3) A separate CSProj (check out my templates http://www.christoc.com/Tutorials/All-Tutorials/aid/2
4) You will deploy by taking the ZIP file from each extension and either uploading through the host/extension page, or taking the ZIp file and putting it into /install/module/ in the root of your deployment target, then have a process call /install/install.aspx?mode=installresources
5) DNN is for sure meant for developers, but it is a framework, build on the framework, don't go in and start jacking the framework itself.
I would start by getting a DNN site running on your local. This is fairly straight forward for any .NET developer.
A module is an extension for the DNN framework that you can essentially (once correctly installed) drop on a DNN page (referred to as tab). All your business logic will go in your own modules and the code for these modules will be the only things that you will have to source control. Do not make core changes to DNN as they will be blown away if you ever upgrade.
You do not need to use Christoc's module template if your module will only need to be deployed once. I find that it brings in a lot of unnecessary components and references that you probably will not need. Create your module's using webUserControls that inherit from DotNetNuke.Entities.Modules.PortalModuleBase. Drop the .ascx file in its own folder under DNN's DesktopModules folder and all required .dll's in DNN's bin folder. In DNN, go to Host>Extensions and create a new extention. To the extension add a module control and add your ascx files as controls (leave your default view's key blank). Other views should have unique keys and you can navigate to them in DNN using EditUrl("KeyName").
Drop your module on a DNN page and go from there.
This is of course an over simplification but it should get you going. There are many tutorials online that I advise you watch to learn the basics like Globals.NavigateUrl() to navigate between tabs and how DNN is put together. This forum topic might assist you http://www.dnnsoftware.com/answers/dnn-7-module-development-step-by-step-tutorial

Silverlight object not showing - xap downloading but not launching

After downloading the xap file the Silverlight object remains empty or does not showing.
I tried refreshing the deployed site binaries and the xap but unsuccessfully.
Does anybody has some idea what is happening.
BTW. I have another SL site in the same domain and in the same application pool that starts without problem.
Is your startup object set correctly in project properties? This sort of situation happens if you e.g. move your App class to a different namespace but forget to update the startup object field in settings.
As they are on the same domain, change the site page that is working to point at the faulty XAP. Then you will know if it is a bug in the hosting page or the XAP file.
Also try Silverlight Spy (has free trial period) to see if the Silverlight XAP is valid.
Xaps are just Zip files if you rename them, so you can do some very basic checks manually.
Silverlight applications are client side, so application pool of server has no whatsoever relationship to it.
If you get a blank page (you don't even see the loader of Silverlight or you see it and it hangs) this means your Silverlight application has crashed.
Try to debug and find out what is going on. You probably have some reference issues or XAML errors.
See if all the references are copied into the XAP, (rename .xaml file to .zip and open it).
Look at the 'Output' window in Visual Studio during start of the application.
And last but not least, check your html code of your .HTML file, check the name of the XAP file
Check if your server serves .xap files if not you have to add it to the mime types list
Firstly thanks to everyone for the advices. Problem is solved. Unfortunately, I still does not know the exact reason for the error. The problem was caused Plesk control panel of my hosting company that has changed some settings in web.config files when I asked then to switch a web service under a separate application pool. When we restore a backup copy of web.config silverlight page showed again. I'm not sure which is the exact cause of the problem, but this experience could be of help to all who find themselves in a similar situation.
Normally this happens to me, when I have different event triggers with the same name;
I need to change the name I give to the triggers.

Can i add a .xap file into another project

Basically i want to utilize the Silverlight Video player on Codeplex in another Silverlight application. Is this possible. Can anyone point me in the right direction on how to achieve this?
Thanks
J
If you just have a few assemblies of interest, such as those video player .dll files, then you could of course:
Rename the .xap to .zip
Extract the contents
Copy the .dll assemblies into your project
Reference the .dll's
Unfortunately, I'm guessing that you might be wanting to take advantage of the actual video player application - which includes custom handling for init parameters of the control, and just include that .Xap file into your solution. I don't know of an easy way to do that.
adding another xap file to your project, yes. you'll need to manually load the assemblies inside the xap package to utilize it.
Check the downloadable project solution here: http://www.wintellect.com/CS/blogs/jprosise/archive/2010/06/21/dynamic-localization-in-silverlight.aspx
the solution basically has two silverlight projects, the ExternalResources project's generated xap gets created and it's assemblies are manually loaded when needed.

Resources