Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Photo Mod v182 - auto authorize all users
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

withanhdammit
Junior Member

USA
236 Posts

Posted - 11 March 2005 :  12:14:33  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
I'd like to automatically authorize all users when they join my forum to have a Photo Album "account" so they can immediately start posting photos.

Any ideas?

Thanks!

h

Roger Fredriksson
Average Member

Sweden
556 Posts

Posted - 11 March 2005 :  12:49:36  Show Profile  Visit Roger Fredriksson's Homepage
What do you mean by "automatically", are you using another login then the one given by Snitz. In that case you could use universal login mod. I am going to do it that way and you could download my attemt so far from www.avgifter.com/pm/universal.zip

rf/www.avgifter.com
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 11 March 2005 :  14:18:02  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
If a user wants to be able to upload photos, the admin has to give them rights to do this. I want these rights to be automatically assigned when someone joins my forum, so the admin doesn't have to do it.

h
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 March 2005 :  07:06:28  Show Profile
Which photo album mod are you using? Can you post a link to it and a *.txt copy of your register.asp file?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 16 March 2005 :  22:46:35  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
Hi Shaggy,

Sorry for the late reply, I must have missed your reply somewhere.

It's Wesley Brown's Photo album v 1.82 and register.asp is up at http://thepoopsheet.dnjhome.com/register.txt

Thanks!
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 March 2005 :  05:56:42  Show Profile
Don't see anything in there that would handle this feature. Can you post a link to the mod in question; can't seem to find it.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 18 March 2005 :  07:48:47  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=45

h
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 March 2005 :  08:59:29  Show Profile
My post Paddy's day eyes are a bit tired; I can't for the life of me see whereabouts in the database that setting is stored for each member. Did you have to make any changes to the db when applying it?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 18 March 2005 :  09:01:00  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
Nope, no db changes at all...

h

I reject your reality and substitute my own.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 March 2005 :  09:09:50  Show Profile
Very strange, 'cause I see references to all sorts of non-Snitz tables in the mod files, such as ALBUM, ALBUM_CONFIG, ALBUM_USERS, etc. You definitely didn't set these up? All I can tink is that the members who are allowed to upload images are held in ALBUM_USERS but, without knowing the structure of that table, I caouldn't tell you how to go about making the necessary changes.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 18 March 2005 :  09:19:02  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
Yeah, I see those fields in the db also, but there's no .dbs file with the mod, so I'm not entirely sure. I've installed so many mods on this forum, that I can't really remember exactly how I set it up. In any case, I'll email you a link to download an access .mdb copy of my forum db (I use Sql2k).

h

I reject your reality and substitute my own.
Go to Top of Page

rodham
New Member

65 Posts

Posted - 19 March 2005 :  18:10:03  Show Profile  Visit rodham's Homepage
If you are using MSSQL, you could setup the following trigger on the FORUM_MEMBERS table so that it creates the needed records whenever a new record is inserted. Works for me!

CREATE TRIGGER [ADD_ALBUM_USER] ON [FORUM_MEMBERS]
FOR INSERT
AS
INSERT INTO FORUM_ALBUM_USERS
SELECT MEMBER_ID, M_NAME
FROM inserted
WHERE MEMBER_ID = inserted.MEMBER_ID

INSERT INTO FORUM_ALBUM_CAT
SELECT "Main Album" AS Photo_Cat_Name, inserted.MEMBER_ID as Member_id
FROM inserted
Where MEMBER_ID = inserted.MEMBER_ID
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 19 March 2005 :  18:18:26  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
I am using MSSQL...where would I set the trigger on the table?

Thanks!

h

I reject your reality and substitute my own.
Go to Top of Page

rodham
New Member

65 Posts

Posted - 19 March 2005 :  21:05:06  Show Profile  Visit rodham's Homepage
The simplest way is thru the SQL Enterprise Manager, drill down to the tables for your forum, locate FORUM_MEMBERS and right click on it, choose "all task" and then "manage triggers".

In the Name dropdown make sure that <new> is selected. Replace the text:
CREATE TRIGGER [TRIGGER NAME] ON [FORUM_MEMBERS]
FOR INSERT, UPDATE, DELETE
AS

with:
CREATE TRIGGER [ADD_ALBUM_USER] ON [FORUM_MEMBERS]
FOR INSERT
AS
INSERT INTO FORUM_ALBUM_USERS
SELECT MEMBER_ID, M_NAME
FROM inserted
WHERE MEMBER_ID = inserted.MEMBER_ID

INSERT INTO FORUM_ALBUM_CAT
SELECT "Main Album" AS Photo_Cat_Name, inserted.MEMBER_ID as Member_id
FROM inserted
Where MEMBER_ID = inserted.MEMBER_ID

Check the syntax, then choose "Ok" and then close.

Create a new member and the two ALBUM tables will also have the required records.

Good luck.
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 19 March 2005 :  23:02:18  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
I got an error with your code, so I looked at what I was replacing, and I had to change it to:
CREATE TRIGGER [ADD_ALBUM_USER] ON [dbName].[FORUM_MEMBERS] 
FOR INSERT
AS
INSERT INTO FORUM_ALBUM_USERS
SELECT MEMBER_ID, M_NAME
FROM inserted
WHERE MEMBER_ID = inserted.MEMBER_ID

INSERT INTO FORUM_ALBUM_CAT
SELECT "Main Album" AS Photo_Cat_Name, inserted.MEMBER_ID as Member_id
FROM inserted
Where MEMBER_ID = inserted.MEMBER_ID

With that change, it created the permissions/table entries properly, but it did not create the folders. Any ideas on how to do that?

h

I reject your reality and substitute my own.
Go to Top of Page

rodham
New Member

65 Posts

Posted - 20 March 2005 :  07:25:44  Show Profile  Visit rodham's Homepage
Yes you are correct in your changes... it depends on the version of SQL.

In the file ToFileSystem.asp around line 293
CHANGE:

strPath = Server.MapPath(bdir) & "\" & strUserName& "\" &strFileName

TO:

strPath = Server.MapPath(bdir) & "\" & strUserName& "\"

AND ADD BELOW IT:


' This user is valid and may be uploading their first file
' Check for folder and create if needed
If Not objFSO.FolderExists(strPath) Then
	objFSO.CreateFolder(strPath)
	objFSO.CreateFolder(strPath & "tn\")
end if
strPath = strPath & strFileName


Edited by - rodham on 20 March 2005 07:35:11
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07