.NET CMS
.NET CMS > .NET CMS online support forum > Forum of online support > Configuration

Database Support

RSS
Author
Date & Time
Message Operations
Chris Morgan
male
cmorgan@smarttrader.com.au
Chrismo20227

Does Gallery CMS include MySQL database support i.e. the gallery and structure and links to images kept in the database?
Andrea Bruno
male
customercare@officialguide.info
Webmaster

This application is databaseless.
Is very fast (no query required).
For the developers I included a module dedicated to manage the database. This module is under the app_code directory (datananager).
You can use this module and writing some line of code to import a set of pictures in this cms.
I you need technical information about the class Photoalbum and class Photo, please ask me.
Chris Morgan
male
cmorgan@smarttrader.com.au
Chrismo20227

Thanks very much for your prompt reply. If you could pass on technical information about the class Photoalbum and class Photo it would be much appreciated
Andrea Bruno
male
customercare@officialguide.info
Webmaster

To begin you must download the latest version of CMS from here: http://sourceforge.net/projects/cmsaspnet/files/la...
This sample code creates a child photo-album, into the main tree photo-album:

Dim Setting As SubSite = CurrentSetting
Dim RootPhotoAlbum As PhotoAlbum = PhotoManager.PhotoAlbum.Load.GetItem(NameRootPhotoAlbum)
If RootPhotoAlbum Is Nothing Then
RootPhotoAlbum = New PhotoAlbum
RootPhotoAlbum.AddPermitted = PhotoManager.Permission.Permitted
RootPhotoAlbum.Deletable = False
RootPhotoAlbum.Save()
End If
Dim PhotoAlbum As PhotoAlbum = RootPhotoAlbum.CreateSubFotoAlbum(CurrentUser(Session), Setting)
PhotoAlbum.IsRoot = True
PhotoAlbum.Editable = PhotoManager.EditablePermission.Author
PhotoAlbum.AddPermitted = PhotoManager.Permission.Author
PhotoAlbum.Deletable = PhotoManager.Permission.None
PhotoAlbum.SubPhotoAlbumsNotCreatable = True
PhotoAlbum.Title(Setting.Language) = "Title of photoalbum"
PhotoAlbum.Save()


This sample code adds a picture to the photo album:

Dim Photo As New PhotoManager.Photo
Photo.Album = PhotoAlbum
If Not String.IsNullOrEmpty(Photo.Album) Then
Photo.FromUrl(ImageUrl) 'In alternative you can load a photo from stream
'Photo.FromStream(Stream) 'You must first open the file and create a stream object
Photo.Title(Setting.Language) = Author
Photo.Description(Setting.Language) = Title
Photo.Save()
PhotoID = Photo.NameCode()
Photo.Dispose()
End If
Chris Morgan
male
cmorgan@smarttrader.com.au
Chrismo20227

Thanks very much for your information