Author |
Topic |
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 14 June 2001 : 13:45:41
|
Is there a way to make it so the Slash Mod will only show the posts made by certain users? Rather than have everyone's topics come up, i'd like to have it where either Moderators, Admins or a predefined set of users have their topics come up.
Just curious if this is possible. I've toiled with the concept for awhile, I just am too inept to actually make it happen.
Any help is totally appreciated.
-Dobbs |
|
animedj
Junior Member
USA
190 Posts |
Posted - 14 June 2001 : 14:33:17
|
Actually, yeah. If you are using slash mod 2.00 look for a variable in slash.asp called strCustomSQL and set it up like the following line: ( for slash mod ver 3.00 you ust need to add the whole line before calling slash() )
Example to show posts only made by moderators and admins
strCustomSQL = " and FORUM_MEMBERS.M_LEVEL > 1 "
And that should do the trick.
--- Johann Reyes http://animedj.com |
|
|
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 14 June 2001 : 19:35:36
|
That rocks. Now, and I know this may be stretching it, but would it be possible to set it up to where it posted topics by certain users?
For example: If I want to give front page posting rights to say, myself and a couple other people that will be contributing, can this be done or is it only possible to do it by group?
This is almost the perfect solution for a "newspro" type of setup. Good work, dude.
|
|
|
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 14 June 2001 : 21:06:11
|
I tell ya, I am having one heck of a time to get Slash 2.10 working.
Here's my directory structure:
root: -all forum files | --MODS: | ---modcmd and slash files
My big problem is when I go into mod commander to setup, I either get a 404 or after taking out the 2 includes on the top get: "Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified "
No mater how I align config.asp in the include, either with FILE or virtual, I get a 404 when trying to access the slash_admin.asp or slash_patch.asp
Any ideas?
-Dobbs
Edited by - Bob Dobbs on 14 June 2001 21:16:25 |
|
|
animedj
Junior Member
USA
190 Posts |
Posted - 14 June 2001 : 21:21:24
|
Yeah Bob, that can be done, but it wuold be a little tricky, as all depends how many people are going to be.. if is just two, you can do the following:
strSQL = " and FORUM_MEMBERS.MEMBER_ID = 1 and FORUM_MEMBERS.MEMBER_ID = 2 "
But if is a large group, it would be a kinda long sql string, so I would resort to maybe to other ways to do it, as the forum doesn't accept groups of people. I might create in MEMBERS table a field called GROUP and for example assign all the members that you want their posting to appear something like for REPORTER, or even more easier, if you are using database authentication, and not NT authentication, then you can use the field called M_USERNAME .. and the sql would be something like this:
strSQL = " and FORUM_MEMBERS.M_USERNAME = 'REPORTERS' "
And about your includes, post here the path ( /forums/mods ) to your mods directory and how you are doing your inserts of the inc_functions.asp and config.asp files.
--- Johann Reyes http://animedj.com |
|
|
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 14 June 2001 : 21:49:04
|
Excellent. I will try those and let you know how it worked out.
New things to report:
I got the slash_patch.asp to work. I was using the MS2000 Virtual Path in my config and When I changed it to the other option, to use the actual path, I was able to get slash_patch.asp to work fine. But...
When I fire up slash_admin.asp it takes a LONG time to load. When it does load I see the box with the options, then underneath it says:
"Active Server Pages error 'ASP 0113'
Script timed out
/mods/slash_admin.asp
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools."
Now i'm fairly certain this isn't normal behavior. I adjusted the settings and after awhile the same thing came up, with that same error, except it told me it had updated the settings. Ok, fine. Aside from the fact that it took so long, it appeared to work.
So now I want to include slash.asp in my front page. I use this as the include: <!-- #include virtual="/mods/slash.asp" --> . Now I do that because my root directory is actually the main forum directory. I am not using /forum. So, in theory, I am doing that correctly and the slash items should show. But I get this:
" Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/mods/slash.asp, line 24"
Line 24 is this: my_Conn.Open
Now I am already calling config.asp and inc_functions.asp because this IS my forum. In essence, I am trying to call slash.asp within the forum. I am using a modified default.asp to call some other snitz items and have changed the forum default from default.asp to forum_default.asp . This works fine on it's own merit, but I cannot get this version of slash to work. I had slash 1.0 working fine, but need the functionality as described above.
Sorry to pester you about this. I think it's really close to working.
Thanks again. -Dobbs
|
|
|
animedj
Junior Member
USA
190 Posts |
Posted - 14 June 2001 : 22:10:38
|
eah.. but slash_admin.asp is not part of the forum.. check that the files at the top of slash_admin are like this :
<!--#include file="../inc_functions.asp" --> <!--#include file="../config.asp" -->
--- Johann Reyes http://animedj.com |
|
|
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 14 June 2001 : 22:19:42
|
quote:
eah.. but slash_admin.asp is not part of the forum.. check that the files at the top of slash_admin are like this :
<!--#include file="../inc_functions.asp" --> <!--#include file="../config.asp" -->
I think you meant slash.asp instead of slash_admin.asp
I added those files to the top of slash.asp and get this:
"Microsoft VBScript compilation error '800a0411'
Name redefined
K:\WWW\NEWESTKTC\KTC5\MODS\../config.asp, line 43
dim strDBType, strConnString, strTablePrefix, strMemberTablePrefix '## Do Not Edit ----^"
So I am guessing it is already using the previous call of the config.asp include that I used earlier on the page.
Any thoughts? Also, any ideas why it takes slash_admin.asp so long to load and return that error message?
I appreciate it. Thanks again. -Dobbs |
|
|
animedj
Junior Member
USA
190 Posts |
Posted - 14 June 2001 : 22:25:21
|
yeah.. slash.asp shouldn't include the config and inc_function.. the page where is include it should, but not slash.asp. I would check the database for duplicate values. FORUMS_MODS.
--- Johann Reyes http://animedj.com |
|
|
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 14 June 2001 : 22:31:36
|
Heh. I found some duplicates in the FORUM_MODS table and deleted them. Not sure how those got there, but they're now gone. But I still get this error when I try to insert slash.asp (and yeah, the config.asp and inc_functions.asp have already been included in the page to call other functions like the login and Private messages and users online):
"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/mods/slash.asp, line 24"
Line 24 of slash.asp reads as: my_Conn.Open
It looks like it can't find config.asp for some reason.
I believe this to be the last hurdle to get over to get this thing working like a champ.
Thanks. -Dobbs
|
|
|
animedj
Junior Member
USA
190 Posts |
Posted - 14 June 2001 : 22:46:29
|
ok.. now that I think well.. I believe I kind of know what's the problem.. if the slash is being included in a default.asp.. then check that when you called the slash() function it isn't after a :
my_conn.close or set my_conn = nothing
That would be my best guess.. that the slash function is being called after the ADO connection has been destroyed.
--- Johann Reyes http://animedj.com |
|
|
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 14 June 2001 : 23:04:54
|
I hate to say it, but I am having no luck. Here's what I tried, just to be sure:
I added the includes to the top of slash.asp and went to http://192.168.0.2:8080/mods/slash.asp and STILL and getting this:
"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/mods/slash.asp, line 27 "
So that would be independent of anything possibly detroying the connection. The paths in the includes are correct as I have tried both the FILE and VIRTUAL paths to no avail.
Is there ANY way to incorporate the functionality of the strCustomSQL = " and FORUM_MEMBERS.M_LEVEL > 1 " into Slash 1.0? I ask because that version seems to work fine for me and we could put all this behind us .
I'm pretty much making a non-traditional-setup version of the forum, so I have been doing a lot of trial and error so far, but this problem eludes me.
However, I am sure this mod works perfectly in other setups and i am sure it's as awesome as I would like it to be .
Heh. Talk soon. Thanks again. -Dobbs
|
|
|
animedj
Junior Member
USA
190 Posts |
Posted - 14 June 2001 : 23:55:44
|
I dunno.. if you like i can take a look to your default.asp if you send it to me at webmaster@animedj.com .. Also you might want to try slash mod ver 3.0, it's pretty simple and can even work without a database connection.
--- Johann Reyes http://animedj.com |
|
|
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 15 June 2001 : 00:01:13
|
I rely pretty heavily on includes, so default.asp would be of no help without the chain of files being called from it.
I'll check ot 3.0 again. I tried it earlier and had no luck, but i'm up for trying anything at this point.
I will keep you updated. Thanks for all the help. Close...
-Dobbs
|
|
|
Bob Dobbs
Starting Member
USA
29 Posts |
Posted - 15 June 2001 : 01:58:33
|
Alright. I have v.3 ready to roll except the slash_admin.asp page comes up as blank. I've tried everything in my bag of tricks to get it to show but it's just blank.
Any idea why this is happening?
-Dobbs
|
|
|
animedj
Junior Member
USA
190 Posts |
Posted - 15 June 2001 : 02:15:22
|
You need to login first as an admin, you can not go on directly to the slash_admin.asp
--- Johann Reyes http://animedj.com |
|
|
Topic |
|