This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION [dbo].[udf_StripHTML] | |
(@HTMLText VARCHAR(MAX)) | |
RETURNS VARCHAR(MAX) | |
AS | |
BEGIN | |
DECLARE @Start INT | |
DECLARE @End INT | |
DECLARE @Length INT | |
SET @Start = CHARINDEX('<',@HTMLText) | |
SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.web> | |
<pages> | |
<controls> | |
<add tagPrefix="gp5" namespace="GuildPortal.Web.UI.Bootstrap" assembly="GuildPortal.Web.UI.Bootstrap" /> | |
</controls> | |
</pages> | |
</system.web> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE dbo.ErrorLog ALTER COLUMN [Message] NVARCHAR(MAX) | |
/* | |
In case of error like "The object 'DF_ErrorLog_Message is dependent on column 'Message'", a constraint is interfering, so delete the constraint: | |
*/ | |
ALTER TABLE dbo.ErrorLog DROP CONSTRAINT DF_ErrorLog_Message; | |
/* | |
Using this method will not lose any data in the converted column, but may chew up a ton of log space (and even cause the server to run out of log space) on huge tables -- even with autogrow enabled. If it's a huge table, consider using a temp table approach. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TRIGGER [dbo].[ErrorLog_Clean_Over_500] | |
ON [dbo].[ErrorLog] | |
AFTER INSERT | |
AS | |
BEGIN | |
SET NOCOUNT ON; | |
DECLARE @countInLog int | |
DECLARE @countOver500 int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE [ChildTableName] WITH NOCHECK ADD CONSTRAINT FK_[ChildTableName]_[ParentTableName] FOREIGN KEY ([ChildFieldName]) | |
REFERENCES [ParentTableName] ([ParentFieldName]) | |
/* e.g.: */ | |
ALTER TABLE ChildTableName WITH NOCHECK ADD CONSTRAINT FK_ChildToParent_ParentTableName FOREIGN KEY (ParentTablePKName) | |
REFERENCES ParentTableName (ParentTablePKName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To be used in a GuildPortal.com Free Form Text/HTML widget (in RAW mode), or | |
// a Site Mod. Will only return data that the currently logged in user can see, | |
// and in case of a user that is not logged in, will only return public data. | |
// Requires git://gist.github.com/2568546.git and git://gist.github.com/2568601.git, | |
// and that the querystring contains the ForumID=### parameter. | |
var forumId = getQs("ForumID"); | |
$.ajax({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To be used in a GuildPortal.com Free Form Text/HTML widget (in RAW mode), or | |
// a Site Mod. Will only return data that the currently logged in user can see, | |
// and in case of a user that is not logged in, will only return public data. | |
// NOTE: Requires git://gist.github.com/2568546.git and git://gist.github.com/2568601.git, | |
// and that the ForumID, TopicID, and GuildID be passed in via the querystring. | |
var guildId = getQs("GuildID"); | |
var forumId = getQs("ForumID"); | |
var topicId = getQs("TopicID"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To be used in a GuildPortal.com Free Form Text/HTML widget (in RAW mode), or | |
// a Site Mod. Will only return data that the currently logged in user can see, | |
// and in case of a user that is not logged in, will only return public data. | |
// NOTE: Requires git://gist.github.com/2568546.git and git://gist.github.com/2568601.git, | |
// and that the ForumID, PageNumber, TopicID, and GuildID be passed in via the querystring. | |
var forumId = getQs("ForumID"); | |
var pageNumber = getQs("PageNumber"); | |
var topicId = getQs("TopicID"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To be used in a GuildPortal.com Free Form Text/HTML widget (in RAW mode), or | |
// a Site Mod. Will only return data that the currently logged in user can see, | |
// and in case of a user that is not logged in, will only return public data. | |
// NOTE: Requires git://gist.github.com/2568546.git and git://gist.github.com/2568601.git, | |
// and that the ForumID, PageNumber, and GuildID be passed in via the querystring. | |
var forumId = getQs("ForumID"); | |
var pageNumber = getQs("PageNumber"); | |
var guildId = getQs("GuildID"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To be used in a GuildPortal.com Free Form Text/HTML widget (in RAW mode), or | |
// a Site Mod. Will only return data that the currently logged in user can see, | |
// and in case of a user that is not logged in, will only return public data. | |
// NOTE: Requires git://gist.github.com/2568546.git and git://gist.github.com/2568601.git | |
var inboxItemCount = 0; | |
var sentItemsCount = 0; | |
var serviceNewsCount = 0; |
NewerOlder