Click here to Skip to main content
15,893,814 members
Articles / Web Development / HTML

Gallery Server Pro - An ASP.NET Gallery for Sharing Photos, Video, Audio and Other Media

Rate me:
Please Sign up or sign in to vote.
4.86/5 (131 votes)
18 Oct 2013GPL331 min read 828.5K   539  
Gallery Server Pro is a complete, stable ASP.NET gallery for sharing photos, video, audio and other media. This article presents the overall architecture and major features.
namespace GalleryServerPro.Web
{
	/// <summary>
	/// Contains constant values used within Gallery Server Pro.
	/// </summary>
	public static class Constants
	{
		public const string APP_NAME = "Gallery Server Pro";
		public const string SAMPLE_IMAGE_FILENAME = "RogerMartin&Family.jpeg"; // The name of an embedded resource in the gs\images\ directory
		public const string ENCRYPTION_KEY = "mNU-h7:5f_)3=c%@^}#U9Tn*"; // The default encryption key as stored in a new installation. It is updated
																																			// to a new value the first time the application is run.

		// Name of SQL Server connection string in web.config. Note that if you change this,
		// also change it in the Installer_Finished_WebCfg_Need_Updating_Dtl resource setting.
		public const string SQL_SERVER_CN_STRING_NAME = "SqlServerDbConnection";
		public const string SQLITE_CN_STRING_NAME = "SQLiteDbConnection";

		// Note this field is also defined in GalleryServerPro.Business.DataConstants. We also define it here because DotNetNuke has a 50-char
		// limit but we don't want to change the value going to the stored procs, so we "override" it here.
		public const int RoleNameLength = 50;

		public const string DNN_GSP_ROLE_GROUP_NAME = "Gallery Server Pro";
	}

	#region Public Enums

	/// <summary>
	/// Specifies a distinct web page within Gallery Server Pro.
	/// </summary>
	public enum PageId
	{
		admin_albums = 1,
		admin_backuprestore,
		admin_errorlog,
		admin_sitesettings,
		admin_galleries,
		admin_gallerysettings,
		admin_gallerycontrolsettings,
		admin_images,
		admin_manageroles,
		admin_manageusers,
		admin_mediaobjects,
		admin_metadata,
		admin_mediaobjecttypes,
		admin_usersettings,
		admin_videoaudioother,
		/// <summary>
		/// Represents an album view
		/// </summary>
		album,
		albumtreeview,
		changepassword,
		createaccount,
		error_cannotwritetodirectory,
		error_generic,
		//error_unauthorized, // Removed from use 2009.01.22 (feature # 128)
		install,
		login,
		/// <summary>
		/// Represents the media object view
		/// </summary>
		mediaobject,
		myaccount,
		recoverpassword,
		task_addobjects,
		task_assignthumbnail,
		task_createalbum,
		task_deletealbum,
		task_deletehires,
		task_deleteobjects,
		task_downloadobjects,
		task_editcaptions,
		task_rearrange,
		task_rotateimage,
		task_rotateimages,
		task_synchronize,
		task_transferobject,
		search,
		upgrade
	}

	/// <summary>
	/// Specifies a particular message that is to be displayed to the user. The text of the message is extracted from the resource file.
	/// </summary>
	public enum Message
	{
		None = 0,
		ThumbnailSuccessfullyAssigned = 1,
		CannotAssignThumbnailNoObjectsExistInAlbum = 2,
		CannotEditCaptionsNoEditableObjectsExistInAlbum = 3,
		CannotRearrangeNoObjectsExistInAlbum = 4,
		CannotRotateNoRotateableObjectsExistInAlbum = 5,
		CannotMoveNoObjectsExistInAlbum = 6,
		CannotCopyNoObjectsExistInAlbum = 7,
		CannotDeleteHiResImagesNoObjectsExistInAlbum = 8,
		CannotDeleteObjectsNoObjectsExistInAlbum = 9,
		//OneOrMoreCaptionsExceededMaxLength = 10,
		CaptionExceededMaxLength = 11,
		MediaObjectDoesNotExist = 12,
		AlbumDoesNotExist = 13,
		//NoScriptDefaultText = 14,
		//SynchronizationSuccessful = 15,
		//SynchronizationFailure = 16,
		ObjectsSuccessfullyDeleted = 17,
		HiResImagesSuccessfullyDeleted = 18,
		UserNameOrPasswordIncorrect = 19,
		AlbumNameExceededMaxLength = 20,
		//AlbumSummaryExceededMaxLength = 21,
		//AlbumNameAndSummaryExceededMaxLength = 22,
		AlbumNotAuthorizedForUser = 23,
		NoAuthorizedAlbumForUser = 24,
		CannotOverlayWatermarkOnImage = 25,
		CannotRotateObjectNotRotatable = 26,
		ObjectsSuccessfullyMoved = 27,
		ObjectsSuccessfullyCopied = 28,
		ObjectsSuccessfullyRearranged = 29,
		ObjectsSuccessfullyRotated = 30,
		ObjectsSkippedDuringUpload = 31,
		CannotRotateInvalidImage = 32,
		CannotEditGalleryIsReadOnly = 33,
		CannotDownloadObjectsNoObjectsExistInAlbum = 34,
		GallerySuccessfullyChanged = 35,
		SettingsSuccessfullyChanged = 36
	}

	/// <summary>
	/// Specifies the style of message to be displayed to the user.
	/// </summary>
	public enum MessageStyle
	{
		None,
		Information,
		Warning,
		Error
	}

	#endregion
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior) Tech Info Systems
United States United States
I have nearly 20 years of industry experience in software development, architecture, and Microsoft Office products. My company Tech Info Systems provides custom software development services for corporations, governments, and other organizations. Tech Info Systems is a registered member of the Microsoft Partner Program and I am a Microsoft Certified Professional Developer (MCPD).

I am the creator and lead developer of Gallery Server Pro, a free, open source ASP.NET gallery for sharing photos, video, audio, documents, and other files over the web. It has been developed over several years and has involved thousands of hours. The end result is a robust, configurable, and professional grade gallery that can be integrated into your web site, whether you are a large corporation, small business, professional photographer, or a local church.

Comments and Discussions