Archive

Posts Tagged ‘cms’

typo3 – enable admin panel in preview mode for non-admin users / groups

June 18th, 2009

Typo3 offers a nice feature to edit content elements of a page directly in the preview mode – but this functionality is only available for admins per default. In my projects, it’s important for all users to have this feature. As so many tasks in typo3, it is not very obvious how to enable it – so here is a (very short) tutorial, how it works to add it for backend-groups.

First step – default template

In the default template (which is typically the site’s root), you have to enable the admin panel, which is done by the following command in the typoscript- setup:

config.admPanel = 1

Second step – enable and configure the panel for the usergroup

Switch to the user admin, select a user, who is a member of the group to which you want to add the feature, select the assigned group and press the “edit” symbol. The configuration dialogue for the user group pops up – now select the “options” tab and enter the following typoscript:

admPanel {
enable.all = 1
enable.edit = 1
module.edit.forceNoPopup = 0
module.edit.forceDisplayFieldIcons = 1
module.edit.displayIcons = 1
module.edit.forceDisplayIcons = 1
enable.cache = 1
enable.preview = 1
enable.publish = 1
enable.tsdebug = 1
enable.info = 1
hide = 0
}

This is just an example setting, please refer to the typoscript reference for a complete list of options. After saving, you can switch to an user who is a member of the group, select a page in preview mode – voila  – now you should see a panel where you can move, edit, hide and delete content elements.
If you do not use groups, you can simply set the above typoscript to a single user – but using groups always makes sense.

I hope this saves some time for someone who runs into a similar issue. Thankyou, Rüdiger!

admin Programming , ,

dotnetnuke custom module development

April 10th, 2009

Recently, i started working on a project using the ASP.NET based portal framework dotnetnuke. My part is mainly the development of custom modules. Although the framework’s architecture makes it easy to extend the functionality, the available documentation is far from being complete. Finding necessary hints and tipps in discussion boards and blogs, i’ll try to do my part offering useful tipps for developers.

Accessing current portal settings (C#)
if you plan to use elements of the current active skin of the portal in the views of your module, you need an instance of the current portal settings.

PortalSettings settings = (PortalSettings) HttpContext.Current.Items["PortalSettings"];

So if you want acces to your skin path, this is the way you go:

String path = settings.ActiveTab.SkinPath;

Accessing the portal’s active culture
You may need the current active culture (language settings) in your module. Dotnetnuke uses built-in .NET localization, but it’s not so obvious
how to get the current setting – you have to fetch it from the current thread:

CultureInfo culture = Thread.CurrentThread.CurrentUICulture;

e.g. the following will return “en-US” for standard english culture

Thread.CurrentThread.CurrentUICulture.Name

Using API for sending e-mails
DotNetNuke.Services.Mail.Mail.SendMail

A simple example using the default settings configured in the portal backend:
DotNetNuke.Services.Mail.Mail.SendMail(FromAddress, SendToAddress, "", "my subject", "this is the mailbody", "", "", "", "", "", "");

The official documentation for module development can be found here!

admin Programming , , ,