Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*----------------------------------------------------
Creates default 'My Pages' page texts.
- "My Account - Edit Bottom"
- "My Account - Edit Header"
- "My Comments - Empty"
- "My Comments - Header"
- "My Discussions - Empty"
- "My Discussions - Header"
- "My Home - Blogs Empty"
- "My Home - Discussions Empty"
- "My Home - Header"
- "My Home - Library Empty"
- "My Home - Library Stories Empty"
- "My Library - Blogs Empty"
- "My Library - Discussions Empty"
- "My Library - Header"
- "My Library - Stories Empty"
- "My Newsletters - Header"
- "My Posts - Empty"
- "My Posts - Header"
- "My Profile - Edit Header"
- "My Profile - Header"
----------------------------------------------------*/
-------------------------------------------------
-------------------------------------------------
DECLARE @pubcode varchar(20)
DECLARE @groupname varchar(20)
DECLARE @groupcode int
DECLARE @pagetextcode int
-------------------------------------------------
-------------------------------------------------
SET @pubcode = '1'
SET @groupname = 'My Pages'
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTGROUP]
WHERE [PAGETEXTGROUP] = @groupname
)
BEGIN
EXEC [WV_PageTextGroup_Action]
@mode = 'add',
@pageTextGroupCode = NULL,
@pageTextGroup = @groupname,
@pubList = @pubcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @groupcode = [PAGETEXTGROUPCODE]
FROM [PAGETEXTGROUP]
WHERE [PAGETEXTGROUP] = @groupname
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Account - Edit Bottom'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Account - Edit Bottom',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Account - Edit Bottom'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>Your details will be updated when you click Save Changes. If you don''t want to make any changes click Cancel.</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Account - Edit Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Account - Edit Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Account - Edit Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<h1>Edit my account details</h1>
<p>Use this page to update information you provided when you registered to this website. </p>
<p class="siteInformation">
<a href="#">Why register?</a> | <a href="#">Privacy concerns</a> | <a href="#">Cookies information</a> | <a href="#">Frequently asked questions</a></p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Comments - Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Comments - Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Comments - Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p class="strong">You have yet to comment on any articles.</p>
<p>This part of your page shows site pages that shows a list of the most recent comments made.</p>
<ul class="empty_home_list">
<li class="first last">Wherever you see the comment icon and link, you can add a comment.</li>
</ul>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Comments - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Comments - Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Comments - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>Your comments page displays any comments you have made on articles or blogs on this website. From here, you can link to the original stories or blogs and view any responses or further comments added by other users.</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Discussions - Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Discussions - Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Discussions - Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p class="strong">You haven''t started any discussions.</p>
<ul class="empty_home_list">
<li class="mydiscussions_forumpages first last">Go to the <a href="/forums">Forum pages</a> now, to view what is being discussed.</li>
</ul>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Discussions - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Discussions - Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Discussions - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>This page lists all the discussions you have started. It shows the latest post so you can stay up-to-date with the activity in your discussion.</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Blogs Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Home - Blogs Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Blogs Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>PT: Empty blog section</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Discussions Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Home - Discussions Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Discussions Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p class="strong">PT: Keep track of your forum discussions.</p>
<p>This part of your page will include links to any forum discussions started by you. </p>
<ul class="empty_home_list">
<li class="mydiscussions_forumpages first last">Go to the <a href="/forums">Forum pages</a> now, to view what is being discussed.</li>
</ul>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Home - Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>My home header - This page gives you easy access to site content you have added or saved to your library.</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Library Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Home - Library Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Library Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p class="strong">My home library empty - Save favourite site content to your library.</p>
<p>This part of your page can be used to access stories, blog posts or forum discussions that you have saved. Here you can build up a library of the content you refer to most frequently. </p>
<ul class="empty_home_list">
<li class="mylib_save first last">Wherever you see the save icon and link, you can use it to build up your library.</li>
</ul>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Library Stories Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Home - Library Stories Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Home - Library Stories Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>My home library stories empty - You haven''t saved any stories to your library.</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Library - Blogs Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Library - Blogs Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Library - Blogs Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>My library blogs empty - You haven''t saved any blog posts to your library.</p>
<ul class="empty_home_list">
<li class="mylib_save first last">Wherever you see the save icon and link, you can use it to build up your library.</li>
</ul>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Library - Discussions Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Library - Discussions Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Library - Discussions Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>My library discussions empty - You haven''t saved any discussions to your library.</p>
<ul class="empty_home_list">
<li class="mylib_save first last">Wherever you see the save icon and link, you can use it to build up your library.</li>
</ul>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Library - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Library - Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Library - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>My library header - Use your library pages to access and manage articles, blogs and discussions that you have saved. Use the tabs above to see different types of saved content.</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Library - Stories Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Library - Stories Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Library - Stories Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>My library stories empty - You haven''t got any saved articles.</p>
<ul class="empty_home_list">
<li class="mylib_save first last">Wherever you see the save icon and link, you can use it to build up your library.</li>
</ul>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Newsletters - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Newsletters - Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Newsletters - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>You can change your email preferences here. To unsubscribe to a newsletter, simply untick the check box and click submit.</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Posts - Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Posts - Empty',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Posts - Empty'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p class="strong">You haven''t added any forum posts.</p>
<ul class="empty_home_list">
<li class="mydiscussions_forumpages first last">Go to the <a href="/forums">Forum pages</a> now, to view what is being discussed.</li>
</ul>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Posts - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Posts - Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Posts - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>View recent forum posts added by you. Click the links to view the forum discussions you have participated in, and see the most recent posts added by other users.</p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Profile - Edit Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Profile - Edit Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Profile - Edit Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>Add or edit personal details about yourself and upload a picture. Your profile details will be seen by other site users when they view comments or forum posts added by you. You can return to this page to edit these details at any time. </p>'
END
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Profile - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
)
BEGIN
EXEC [WV_PageTextType_Action]
@mode = 'add',
@typecode = NULL,
@description = 'My Profile - Header',
@pagetextgroupcode = @groupcode
END
-------------------------------------------------
-------------------------------------------------
SELECT @pagetextcode = [TYPECODE]
FROM [PAGETEXTTYPE]
WHERE
[DESCRIPTION] = 'My Profile - Header'
AND [PAGETEXTGROUPCODE] = @groupcode
-------------------------------------------------
-------------------------------------------------
IF NOT EXISTS (
SELECT * FROM [PAGETEXT]
WHERE
[PAGETEXTCODE] = @pagetextcode
AND (
[PAGETEXT] != ''
AND [PAGETEXT] != NULL
)
)
BEGIN
EXEC [WV_PageText_Action]
@userCode = 1,
@mode = 'update',
@pubcode = @pubcode,
@typecode = @pagetextcode,
@pagetext = '<p>Your profile details will be seen by other site users when they view comments or forum posts added by you. Add some personal details about yourself and upload a picture. You can edit these details at any time. Go to <a href="/my-profile-edit#biography">edit my details</a>.</p>'
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.