Welcome Guest Search | Active Topics | Log In | Register

2 Pages <12
SOLUTION: Most users online 1 for GoDaddy Users Options · View
illuminatus
#16 Posted : Thursday, August 28, 2008 7:52:52 AM
Rank: Member


Joined: 8/28/2008
Posts: 20
Can anybody please post the original code before changing it?
or is there any place that we can find it?

thanks
illuminatus
#17 Posted : Friday, August 29, 2008 7:32:32 PM
Rank: Member


Joined: 8/28/2008
Posts: 20
This might help to restore your database:
Just go to this post:
http://forum.yetanotherf...from-Godaddy-users.aspx

and replace your the changed code. It just restores your previous database.
Try new, have fun!
Hawk
#18 Posted : Tuesday, September 16, 2008 11:28:59 PM
Rank: Member




Joined: 8/26/2008
Posts: 28
So does the first post work or not for Godaddy users? I am having this issue as well and do not want to lose everything. Thanks.
Hawk
#19 Posted : Tuesday, September 23, 2008 3:18:09 PM
Rank: Member




Joined: 8/26/2008
Posts: 28
Just to verify for other people, the first post does indeed work. I had a problem when I changed my password on the database to gain access to it (as I forgot it), the forum went down. If this happens, just update the yafnet.config file with the new password (or just look in the original one to see what the password is before you access the database). I changed out the code with the code from the first post. There was a "GO" at the end and I left that in (don't know if that makes a difference). I waited about a hour and the "Most users online" is now working. I also test registered a new user (because some people were having that problem) successfully. Thanks!!!
visoundguy
#20 Posted : Tuesday, November 25, 2008 9:11:49 PM

Rank: YAF Forumling


Joined: 10/30/2008
Posts: 8
Location: Wisconsin
I followed the directions, cut and pasted the code exactly as stated - and it took down my forum as well.

Can anyone help?
visoundguy
#21 Posted : Tuesday, November 25, 2008 9:29:02 PM

Rank: YAF Forumling


Joined: 10/30/2008
Posts: 8
Location: Wisconsin
OK - after restoring to an older database and losing lots of posts - I figured I'd put my "working" code here in case someone needs it! In the first line, put your database name where the ------------ are.



USE [--------------]
GO

/****** Object: Trigger [yaf_Active_insert] Script Date: 11/25/2008 18:52:53 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER TRIGGER yaf_Active_insert
ON dbo.yaf_Active
FOR INSERT
AS
BEGIN
DECLARE @BoardID INT,
@count INT,
@countStr NVARCHAR(255),
@dtStr NVARCHAR(255),
@max INT,
@maxStr NVARCHAR(255)
-- Assumes only one row was inserted - shouldn't be a problem?
SELECT @BoardID = BoardID
FROM inserted
SELECT @count = COUNT(DISTINCT IP)
FROM yaf_Active WITH (nolock)
WHERE BoardID = @BoardID
SELECT @maxStr = CAST(VALUE AS NVARCHAR)
FROM yaf_Registry
WHERE BoardID = @BoardID
AND Name = N'maxusers'
SELECT @max = CAST(@maxStr AS INT)
SELECT @countStr = CAST(@count AS NVARCHAR)
SELECT @dtStr = CONVERT(NVARCHAR,Getdate(),126)
IF @@ROWCOUNT = 0
BEGIN
INSERT INTO yaf_Registry
(BoardID,
Name,
VALUE)
VALUES (@BoardID,
N'maxusers',
CAST(@countStr AS NTEXT))
INSERT INTO yaf_Registry
(BoardID,
Name,
VALUE)
VALUES (@BoardID,
N'maxuserswhen',
CAST(@dtStr AS NTEXT))
END
ELSE
IF @count > @max
BEGIN
UPDATE yaf_Registry
SET VALUE = CAST(@countStr AS NTEXT)
WHERE BoardID = @BoardID
AND Name = N'maxusers'
UPDATE yaf_Registry
SET VALUE = CAST(@dtStr AS NTEXT)
WHERE BoardID = @BoardID
AND Name = N'maxuserswhen'
END
END
GO


visoundguy
#22 Posted : Tuesday, November 25, 2008 10:12:30 PM

Rank: YAF Forumling


Joined: 10/30/2008
Posts: 8
Location: Wisconsin
Can someone look at the code above? I've already tried pasting the code at the beginning of this string and it took down the forum!
visoundguy
#23 Posted : Wednesday, November 26, 2008 3:52:53 PM

Rank: YAF Forumling


Joined: 10/30/2008
Posts: 8
Location: Wisconsin
Anyone home?
visoundguy
#24 Posted : Wednesday, November 26, 2008 5:50:34 PM

Rank: YAF Forumling


Joined: 10/30/2008
Posts: 8
Location: Wisconsin
Update -

I now have the code in place, and the forum has not crashed this time. However, the user number remains at 1 for most users ever online!

For reference, I'm using 1.9.1.8

Here is my web config file: (note that the validation key was added to address the auto login problem)

Oh ya, my forum is at http://www.dommagazine.net/yetanotherforum


__________________________________

<?xml version="1.0"?>
<configuration>
<configSections>
<section name="yafnet" type="yaf.SectionHandler,yaf"/>
<section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>

<yafnet configSource="yafnet.config"/>
<rewriter configSource="urlrewriter.config"/>

<system.web>
<httpModules>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="UrlRewriter" />
</httpModules>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<compilation defaultLanguage="c#" debug="false"/>
<pages enableEventValidation="false" validateRequest="false" smartNavigation="false"/>
<authentication mode="Forms">
<forms loginUrl="~/login.aspx"
name=".YAFNET_Authentication"
protection="All"
timeout="43200"
cookieless="UseCookies"
path="/"
slidingExpiration="true"/>
</authentication>
<machineKey
validationKey="9881710368A4AAD80CF6C58C8DB88D7BE221106A999FFB3C64502769B2AEF16A7CDB68BBDDCE78B18EFD8E14448421E5F00E22E44CEC3F0E7F55C1DA5282BB4B"
decryptionKey="1F9F2E7E11E58259E1CC312AB1C05AE45F4032C9EA6B0B78"
validation="SHA1" decryption="AES"
/>

</system.web>
</configuration>
visoundguy
#25 Posted : Thursday, November 27, 2008 2:13:31 AM

Rank: YAF Forumling


Joined: 10/30/2008
Posts: 8
Location: Wisconsin
Funny - about 4 hours later - it started working!

THANKS SO MUCH for ALL of your help!Laughing

It's been fun talking to myself!!!!!
testero
#26 Posted : Tuesday, December 09, 2008 4:49:55 AM
Rank: Advanced Member


Joined: 12/6/2007
Posts: 43
Location: ksa
Thank you guys for good sharing.

Actually when i got started insert code into DB error message appeared and strange!!!


error message said that DB does not contain Active_insert trigger while i am using my own prefix for tables and staff.

Now guys how i would have a trigger name Active_insert while i am currently using 1.9.3 alpha.


Please guys need help asap.


Thank you
Users browsing this topic
Guest
2 Pages <12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 RC2 | YAF © 2003-2008, Yet Another Forum.NET
This page was generated in 0.138 seconds.

SourceForge.net Logo Powered by ASP.NET v2.0 411ASP.NET