Skip to content

Commit

Permalink
Added token [ALBUMPHOTOURL] on ViewAlbum for relative path to the fir…
Browse files Browse the repository at this point in the history
…st photo album

Added Header and Footer Template for Individual Album Template
Added Header and Footer Template for Individual Photo Template
On Latest Module added option for view Private, Public or all albums
Added new stored procedures in DB with 02.05.00.SqlDataProvider and updated uninstall.SqlDataProvider
Updated Ventrian.SimpleGallery.SqlDataProvider.dll
  • Loading branch information
Scippy committed Mar 28, 2020
1 parent 062d18b commit 90b3660
Show file tree
Hide file tree
Showing 153 changed files with 97,558 additions and 468 deletions.
Binary file added .vs/Simple-Gallery/v16/.suo
Binary file not shown.
1,029 changes: 1,029 additions & 0 deletions .vs/Ventrian.SimpleGallery/config/applicationhost.config

Large diffs are not rendered by default.

Binary file added .vs/Ventrian.SimpleGallery/v16/.suo
Binary file not shown.
Binary file added .vs/slnx.sqlite
Binary file not shown.
7 changes: 5 additions & 2 deletions App_LocalResources/EditTemplate.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="EditTemplates.Text" xml:space="preserve">
<value>Edit Templates</value>
Expand Down Expand Up @@ -156,6 +156,9 @@
<data name="ALBUMLINK.Text" xml:space="preserve">
<value>The URL to view photos belongong to that album.</value>
</data>
<data name="ALBUMPHOTOURL.Text" xml:space="preserve">
<value>Relative link to photo album</value>
</data>
<data name="ALBUMWITHBORDER.Text" xml:space="preserve">
<value>A random image representing the album, this is *with* configurable borders.</value>
</data>
Expand Down
10 changes: 8 additions & 2 deletions App_LocalResources/RandomPhotoOptions.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Random.Text" xml:space="preserve">
<value>Random</value>
Expand Down Expand Up @@ -465,4 +465,10 @@
<data name="ISNOTINROLE_XXX.Text" xml:space="preserve">
<value>[ISNOTINROLE:XXX]Some Text[/ISNOTINROLE:XXX] where XXX is not in the role name.</value>
</data>
<data name="PublicMode.Help" xml:space="preserve">
<value>Select a mode, Public or Private to show also private albums</value>
</data>
<data name="PublicMode.Text" xml:space="preserve">
<value>Public Mode</value>
</data>
</root>
117 changes: 117 additions & 0 deletions Backup/01.00.00.SqlDataProvider
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
CREATE TABLE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Photo (
[PhotoID] [int] IDENTITY (1, 1) NOT NULL ,
[ModuleID] [int] NOT NULL ,
[Name] [nvarchar] (100) NOT NULL ,
[Description] [nvarchar] (255) NULL ,
[FileName] [nvarchar] (255) NOT NULL ,
[DateCreated] [datetime] NOT NULL ,
[Width] [int] NOT NULL ,
[Height] [int] NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Photo ADD
CONSTRAINT [PK_{objectQualifier}DnnForge_SimpleGallery_Photo] PRIMARY KEY CLUSTERED
(
[PhotoID]
) ON [PRIMARY]
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoGet
@PhotoID int
AS

SELECT
[PhotoID],
[ModuleID],
[Name],
[Description],
[FileName],
[DateCreated],
[Width],
[Height]
FROM {objectQualifier}DnnForge_SimpleGallery_Photo
WHERE
[PhotoID] = @PhotoID
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoList
@ModuleID int
AS

SELECT
[PhotoID],
[ModuleID],
[Name],
[Description],
[FileName],
[DateCreated],
[Width],
[Height]
FROM {objectQualifier}DnnForge_SimpleGallery_Photo
WHERE
[ModuleID] = @ModuleID
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoAdd
@ModuleID int,
@Name nvarchar(100),
@Description nvarchar(255),
@FileName nvarchar(255),
@DateCreated datetime,
@Width int,
@Height int
AS

INSERT INTO {objectQualifier}DnnForge_SimpleGallery_Photo (
[ModuleID],
[Name],
[Description],
[FileName],
[DateCreated],
[Width],
[Height]
) VALUES (
@ModuleID,
@Name,
@Description,
@FileName,
@DateCreated,
@Width,
@Height
)

select SCOPE_IDENTITY()
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoUpdate
@PhotoID int,
@ModuleID int,
@Name nvarchar(100),
@Description nvarchar(255),
@FileName nvarchar(255),
@DateCreated datetime,
@Width int,
@Height int
AS

UPDATE {objectQualifier}DnnForge_SimpleGallery_Photo SET
[ModuleID] = @ModuleID,
[Name] = @Name,
[Description] = @Description,
[FileName] = @FileName,
[DateCreated] = @DateCreated,
[Width] = @Width,
[Height] = @Height
WHERE
[PhotoID] = @PhotoID
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoDelete
@PhotoID int
AS

DELETE FROM {objectQualifier}DnnForge_SimpleGallery_Photo
WHERE
[PhotoID] = @PhotoID
GO
233 changes: 233 additions & 0 deletions Backup/01.02.00.SqlDataProvider
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
CREATE TABLE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Album (
[AlbumID] [int] IDENTITY (1, 1) NOT NULL ,
[ModuleID] [int] NOT NULL ,
[Caption] [nvarchar] (255) NOT NULL ,
[IsPublic] [bit] NOT NULL,
[HomeDirectory] [nvarchar] (255) NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Album ADD
CONSTRAINT [DF_{objectQualifier}DnnForge_SimpleGallery_Album_IsPublic] DEFAULT (0) FOR [IsPublic],
CONSTRAINT [PK_{objectQualifier}DnnForge_SimpleGallery_Album] PRIMARY KEY CLUSTERED
(
[AlbumID]
) ON [PRIMARY]
GO

INSERT INTO {databaseOwner}{objectQualifier}dnnforge_simplegallery_album(ModuleID, Caption, IsPublic, HomeDirectory)
SELECT DISTINCT ModuleID, 'Unsorted' as 'Caption', 1 as 'IsPublic', 'Gallery/' + convert(nvarchar(255), ModuleID) as 'HomeDirectory' FROM {databaseOwner}{objectQualifier}dnnforge_simplegallery_photo
GO

ALTER TABLE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Photo ADD
AlbumID int NULL
GO

UPDATE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Photo
SET AlbumID = (Select AlbumID from {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Album where {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Album.ModuleID = {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Photo.ModuleID)
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_AlbumGet
@AlbumID int
AS

SELECT
[AlbumID],
[ModuleID],
[Caption],
[IsPublic],
[HomeDirectory]
FROM {objectQualifier}DnnForge_SimpleGallery_Album
WHERE
[AlbumID] = @AlbumID
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_AlbumList
@ModuleID int,
@ShowPublicOnly bit
AS
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_AlbumAdd
@ModuleID int,
@Caption nvarchar(255),
@IsPublic bit,
@HomeDirectory nvarchar(255)
AS

INSERT INTO {objectQualifier}DnnForge_SimpleGallery_Album (
[ModuleID],
[Caption],
[IsPublic],
[HomeDirectory]
) VALUES (
@ModuleID,
@Caption,
@IsPublic,
@HomeDirectory
)

select SCOPE_IDENTITY()
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_AlbumUpdate
@AlbumID int,
@ModuleID int,
@Caption nvarchar(255),
@IsPublic bit,
@HomeDirectory nvarchar(255)
AS

UPDATE {objectQualifier}DnnForge_SimpleGallery_Album SET
[ModuleID] = @ModuleID,
[Caption] = @Caption,
[IsPublic] = @IsPublic,
[HomeDirectory] = @HomeDirectory
WHERE
[AlbumID] = @AlbumID
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_AlbumDelete
@AlbumID int
AS

DELETE FROM {objectQualifier}DnnForge_SimpleGallery_Album
WHERE
[AlbumID] = @AlbumID
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_GetFirstFromAlbum
@AlbumID int
AS

SELECT TOP 1
[PhotoID],
[AlbumID],
[ModuleID],
[Name],
[Description],
[FileName],
[DateCreated],
[Width],
[Height]
FROM {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_Photo
WHERE
[AlbumID] = @AlbumID
GO

DROP PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoGet
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoGet
@PhotoID int
AS

SELECT
Photo.[PhotoID],
Photo.[ModuleID],
Photo.[AlbumID],
Photo.[Name],
Photo.[Description],
Photo.[FileName],
Photo.[DateCreated],
Photo.[Width],
Photo.[Height],
Album.[HomeDirectory]
FROM {objectQualifier}DnnForge_SimpleGallery_Photo Photo, {objectQualifier}DnnForge_SimpleGallery_Album Album
WHERE
Photo.[AlbumID] = Album.[AlbumID]
AND
[PhotoID] = @PhotoID
GO

DROP PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoList
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoList
@AlbumID int
AS

SELECT
Photo.[PhotoID],
Photo.[ModuleID],
Photo.[AlbumID],
Photo.[Name],
Photo.[Description],
Photo.[FileName],
Photo.[DateCreated],
Photo.[Width],
Photo.[Height],
Album.[HomeDirectory]
FROM {objectQualifier}DnnForge_SimpleGallery_Photo Photo, {objectQualifier}DnnForge_SimpleGallery_Album Album
WHERE
Photo.[AlbumID] = Album.[AlbumID]
AND
Photo.[AlbumID] = @AlbumID
ORDER BY
Photo.[Name]
GO

DROP PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoAdd
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoAdd
@ModuleID int,
@AlbumID int,
@Name nvarchar(100),
@Description nvarchar(255),
@FileName nvarchar(255),
@DateCreated datetime,
@Width int,
@Height int
AS

INSERT INTO {objectQualifier}DnnForge_SimpleGallery_Photo (
[ModuleID],
[AlbumID],
[Name],
[Description],
[FileName],
[DateCreated],
[Width],
[Height]
) VALUES (
@ModuleID,
@AlbumID,
@Name,
@Description,
@FileName,
@DateCreated,
@Width,
@Height
)

select SCOPE_IDENTITY()
GO

DROP PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoUpdate
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}DnnForge_SimpleGallery_PhotoUpdate
@PhotoID int,
@ModuleID int,
@AlbumID int,
@Name nvarchar(100),
@Description nvarchar(255),
@FileName nvarchar(255),
@DateCreated datetime,
@Width int,
@Height int
AS

UPDATE {objectQualifier}DnnForge_SimpleGallery_Photo SET
[ModuleID] = @ModuleID,
[AlbumID] = @AlbumID,
[Name] = @Name,
[Description] = @Description,
[FileName] = @FileName,
[DateCreated] = @DateCreated,
[Width] = @Width,
[Height] = @Height
WHERE
[PhotoID] = @PhotoID
GO
Loading

0 comments on commit 90b3660

Please sign in to comment.