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

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 BUG+FIX (3.1sr4): Private member selection
 Forum Locked  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 16 January 2001 :  11:35:33  Show Profile  Visit Kat's Homepage
Hi.

Huw, I have implemented the files you gave me and I am having trickles of problems.

I am missing the graphics as per the Email I sent you.

I also seem to be missing some Javascript too. Each time I click on one of the new buttons on post.asp to Move members to the new list - I get a script error basically because I don't have the script.

I need script for:

MoveWholeList('Del')
MoveWholeList('Add')
InsertSelection('Del')
InsertSelection('Add')


This is a far as I have got. Any help would be appreciated.

KatsKorner

PS. I am also missing the SelectUsers() function invoked from an onClick...


Edited by - kat on 16 January 2001 11:45:33

Edited by - huwr on 16 January 2001 13:21:08

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 16 January 2001 :  11:50:33  Show Profile  Visit Kat's Homepage
Whoops.. Still need the graphics but found the script.. sorry!!

KatsKorner
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 16 January 2001 :  12:00:49  Show Profile  Visit HuwR's Homepage
Sent you the icons,

this is all the code

Wouldn't let me post it, too big ?

I will mail it you




'Resistance is futile'
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 16 January 2001 :  12:15:34  Show Profile  Visit Kat's Homepage
Thanks Huw..

I have another problem now. The buttons that transfer individual members. If you click the same one twice - it gives a script error. It doesn't happen fro the whole list transfers.

Try this:
Transfer all members from one list to the other with the InsertSelection('Add') and then immediately click the same button again. I get a script error with mine.

It reckons:
 Object doesn't support this method or property


The line it has a problem with is:

if (document.PostTopic.AuthUsersCombo.options[count].text == "") 
It is the same for InsertSelection('Del') too.

KatsKorner


Edited by - kat on 16 January 2001 12:15:58
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 16 January 2001 :  13:01:04  Show Profile  Visit HuwR's Homepage
The lists have a blank record at the end, which is why you can still select an item even if the list is empty.

The error is because you have tried to transfer the hidden marker, I will try to hide the error message.

'Resistance is futile'
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 16 January 2001 :  13:18:35  Show Profile  Visit HuwR's Homepage
Ok, here's the fix.

in the InsertSelect function do a search for

if (document.PostTopic.AuthUsersCombo.options[count].text == "")
{
.....
}

change both occurrences to look like this

try{
if (document.PostTopic.AuthUsersCombo.options[count].text == "")
{
finished = true;
continue;
}
}
catch(e)
{
finished = true;
return;
}


Next search for

if (document.PostTopic.AuthUsers.options[count].text == "")
{
.....
}


and change to

try{
if (document.PostTopic.AuthUsers.options[count].text == "")
{
finished = true;
continue;
}
}
catch(e)
{
finished = true;
return;
}


.... code may vary in the if block

'Resistance is futile'
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 17 January 2001 :  05:31:14  Show Profile  Visit Kat's Homepage
Huw,

Sorry I can't seem to get the code in the right place.. .. can you give me an idiots guide?
This is the code before the changes...
 function InsertSelection(strAction)
{
var pos,user,mText;
var count,finished;

if (strAction == "Add")
{
pos = document.PostTopic.AuthUsers.length;
finished = false;
count = 0;
do //Add to destination
{
if (document.PostTopic.AuthUsersCombo.options[count].text == "")
{
finished = true;
continue;
}
if (document.PostTopic.AuthUsersCombo.options[count].selected)
{
document.PostTopic.AuthUsers.length +=1;
document.PostTopic.AuthUsers.options[pos].value = document.PostTopic.AuthUsers.options[pos-1].value;
document.PostTopic.AuthUsers.options[pos].text = document.PostTopic.AuthUsers.options[pos-1].text;
document.PostTopic.AuthUsers.options[pos-1].value = document.PostTopic.AuthUsersCombo.options[count].value;
document.PostTopic.AuthUsers.options[pos-1].text = document.PostTopic.AuthUsersCombo.options[count].text;
document.PostTopic.AuthUsers.options[pos-1].selected = true;
}
pos = document.PostTopic.AuthUsers.length;
count += 1;
}while (!finished); //finished adding
finished = false;
count = document.PostTopic.AuthUsersCombo.length - 1;
do //remove from source
{
if (document.PostTopic.AuthUsersCombo.options[count].text == "")
{
--count;
continue;
}
if (document.PostTopic.AuthUsersCombo.options[count].selected )
{
for ( z = count ; z < document.PostTopic.AuthUsersCombo.length-1;z++)
{
document.PostTopic.AuthUsersCombo.options[z].value = document.PostTopic.AuthUsersCombo.options[z+1].value;
document.PostTopic.AuthUsersCombo.options[z].text = document.PostTopic.AuthUsersCombo.options[z+1].text;
}
document.PostTopic.AuthUsersCombo.length -= 1;
}
--count;
if (count < 0)
finished = true;
}while(!finished) //finished removing
}

if (strAction == "Del")
{
pos = document.PostTopic.AuthUsersCombo.length;
finished = false;
count = 0;
do //Add to destination
{
if (document.PostTopic.AuthUsers.options[count].text == "")
{
finished = true;
continue;
}
if (document.PostTopic.AuthUsers.options[count].selected)
{
document.PostTopic.AuthUsersCombo.length +=1;
document.PostTopic.AuthUsersCombo.options[pos].value = document.PostTopic.AuthUsersCombo.options[pos-1].value;
document.PostTopic.AuthUsersCombo.options[pos].text = document.PostTopic.AuthUsersCombo.options[pos-1].text;
document.PostTopic.AuthUsersCombo.options[pos-1].value = document.PostTopic.AuthUsers.options[count].value;
document.PostTopic.AuthUsersCombo.options[pos-1].text = document.PostTopic.AuthUsers.options[count].text;
document.PostTopic.AuthUsersCombo.options[pos-1].selected = true;
}
count += 1;
pos = document.PostTopic.AuthUsersCombo.length;
}while (!finished); //finished adding
finished = false;
count = document.PostTopic.AuthUsers.length - 1;
do //remove from source
{
if (document.PostTopic.AuthUsers.options[count].text == "")
{
--count;
continue;
}
if (document.PostTopic.AuthUsers.options[count].selected )
{
for ( z = count ; z < document.PostTopic.AuthUsers.length-1;z++)
{
document.PostTopic.AuthUsers.options[z].value = document.PostTopic.AuthUsers.options[z+1].value;
document.PostTopic.AuthUsers.options[z].text = document.PostTopic.AuthUsers.options[z+1].text;
}
document.PostTopic.AuthUsers.length -= 1;
}
--count;
if (count < 0)
finished = true;
}while(!finished) //finished removing
}
}




KatsKorner


Edited by - kat on 17 January 2001 05:32:18
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 17 January 2001 :  06:40:33  Show Profile  Visit Kat's Homepage
I have tried a few things now and I still can't get the desired results... What am I doing wrong?

KatsKorner
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 17 January 2001 :  06:45:26  Show Profile  Visit HuwR's Homepage
give me 10 mins, just got to pop out, then I'll answer.

'Resistance is futile'
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 17 January 2001 :  06:48:12  Show Profile  Visit Kat's Homepage
Ok brilliant. I didn't think you were around today!

KatsKorner
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 17 January 2001 :  06:51:47  Show Profile  Visit HuwR's Homepage
I've only jus got up, was working till 7:30am

'Resistance is futile'
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 17 January 2001 :  06:53:06  Show Profile  Visit Kat's Homepage
ouch... ok - brekky, coffee then Snitz...

KatsKorner
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 17 January 2001 :  08:18:28  Show Profile  Visit HuwR's Homepage
Ok, had coffee, more coffee, now more workee


function InsertSelection(strAction)
{
var pos,user,mText;
var count,finished;

if (strAction == "Add")
{
pos = document.PostTopic.AuthUsers.length;
finished = false;
count = 0;
do //Add to destination
{
try{
if (document.PostTopic.AuthUsersCombo.options[count].text == "")
{
finished = true;
continue;
}
}
catch(e)
{
finished = true;
return;
}

if (document.PostTopic.AuthUsersCombo.options[count].selected)
{
document.PostTopic.AuthUsers.length +=1;
document.PostTopic.AuthUsers.options[pos].value = document.PostTopic.AuthUsers.options[pos-1].value;
document.PostTopic.AuthUsers.options[pos].text = document.PostTopic.AuthUsers.options[pos-1].text;
document.PostTopic.AuthUsers.options[pos-1].value = document.PostTopic.AuthUsersCombo.options[count].value;
document.PostTopic.AuthUsers.options[pos-1].text = document.PostTopic.AuthUsersCombo.options[count].text;
document.PostTopic.AuthUsers.options[pos-1].selected = true;
}
pos = document.PostTopic.AuthUsers.length;
count += 1;
}while (!finished); //finished adding
finished = false;
count = document.PostTopic.AuthUsersCombo.length - 1;
do //remove from source
{
try {
if (document.PostTopic.AuthUsersCombo.options[count].text == "")
{
--count;
continue;
}
}
catch(e)
{
return;
}

if (document.PostTopic.AuthUsersCombo.options[count].selected )
{
for ( z = count ; z < document.PostTopic.AuthUsersCombo.length-1;z++)
{
document.PostTopic.AuthUsersCombo.options[z].value = document.PostTopic.AuthUsersCombo.options[z+1].value;
document.PostTopic.AuthUsersCombo.options[z].text = document.PostTopic.AuthUsersCombo.options[z+1].text;
}
document.PostTopic.AuthUsersCombo.length -= 1;
}
--count;
if (count < 0)
finished = true;
}while(!finished) //finished removing
}

if (strAction == "Del")
{
pos = document.PostTopic.AuthUsersCombo.length;
finished = false;
count = 0;
do //Add to destination
{
try{
if (document.PostTopic.AuthUsers.options[count].text == "")
{
finished = true;
continue;
}
}
catch(e)
{
finished = true;
return;
}

if (document.PostTopic.AuthUsers.options[count].selected)
{
document.PostTopic.AuthUsersCombo.length +=1;
document.PostTopic.AuthUsersCombo.options[pos].value = document.PostTopic.AuthUsersCombo.options[pos-1].value;
document.PostTopic.AuthUsersCombo.options[pos].text = document.PostTopic.AuthUsersCombo.options[pos-1].text;
document.PostTopic.AuthUsersCombo.options[pos-1].value = document.PostTopic.AuthUsers.options[count].value;
document.PostTopic.AuthUsersCombo.options[pos-1].text = document.PostTopic.AuthUsers.options[count].text;
document.PostTopic.AuthUsersCombo.options[pos-1].selected = true;
}
count += 1;
pos = document.PostTopic.AuthUsersCombo.length;
}while (!finished); //finished adding
finished = false;
count = document.PostTopic.AuthUsers.length - 1;
do //remove from source
{
try{
if (document.PostTopic.AuthUsers.options[count].text == "")
{
--count;
continue;
}
}
catch(e)
{
return;
}

if (document.PostTopic.AuthUsers.options[count].selected )
{
for ( z = count ; z < document.PostTopic.AuthUsers.length-1;z++)
{
document.PostTopic.AuthUsers.options[z].value = document.PostTopic.AuthUsers.options[z+1].value;
document.PostTopic.AuthUsers.options[z].text = document.PostTopic.AuthUsers.options[z+1].text;
}
document.PostTopic.AuthUsers.length -= 1;
}
--count;
if (count < 0)
finished = true;
}while(!finished) //finished removing
}
}


changes marked in red.

'Resistance is futile'
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 17 January 2001 :  08:28:11  Show Profile  Visit Kat's Homepage
Thanks!

It is ok now. I still have to implement the rest of the F_USERLIST changes.

KatsKorner
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 18 January 2001 :  09:47:04  Show Profile  Visit Kat's Homepage
Huw,

I am having a bit of a problem with the F_USERLIST Changes.

I can't see anywhere in the code where it actually inserts a records or updates a record in FORUM_ALLOWED_MEMBERS.

I used the allowed members list to set up two users for a forum but those users can't gain access - there is no record on the new table.

Please tell me where to look. Thanks.

KatsKorner
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 18 January 2001 :  11:27:21  Show Profile  Visit Kat's Homepage
I think it has been missed out.... ... fixy fixy...

KatsKorner
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07