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 MOD-Group
 MOD Add-On Forum (W/O Code)
 Help defining an array
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

StephenD
Senior Member

Australia
1044 Posts

Posted - 08 February 2004 :  10:21:55  Show Profile  Send StephenD a Yahoo! Message
I'v been playing around with the Message Icons Mod and have a few issues with it at the moment. The one that is bugging me is I can't seem to specify which forums I want to be able to show these icons in.

What I've done is make a copy of icon_blank.gif and renamed it as icon_mi_1.gif which is the default message icon. I've then omitted icon 1 from the code in inc_messsageicons.asp which all works OK.

What I'm trying to do now is hide the icons available in post.asp for selected forums by using:
if intAllowedCategoryMsg then
%>
<!--#INCLUDE FILE="inc_messageicons.asp" -->
<%
end if 


I've tried to put an array of 'allowed forums' in inc_header.asp but can't get it to work. Why won't this work?
intAllowedCategoryMsg = Array("50","51","52","53","54","55","56","57","58")

Edited by - ruirib on 08 February 2004 10:33:53

laser
Advanced Member

Australia
3859 Posts

Posted - 08 February 2004 :  14:30:15  Show Profile
That should work, the only problem I can see is that you are quoting the numbers, making them text not integers. More help here maybe : http://www.devguru.com/Technologies/vbscript/quickref/array.html
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 09 February 2004 :  02:05:35  Show Profile  Send StephenD a Yahoo! Message
You mean I should remove the double "" around each Forum ID no.?

Also should I use:
if Forum_ID = intAllowedCategoryMsg
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 09 February 2004 :  02:51:39  Show Profile
quote:
You mean I should remove the double "" around each Forum ID no.?
Yes
quote:
Also should I use:
if Forum_ID = intAllowedCategoryMsg

Not that I'm aware of, I'd do something like :

For x = 0 to UBound(intAllowedCategoryMsg)
    If Forum_ID = intAllowedCategoryMsg(x) Then
        blnForumCheck = Yes
        x = UBound(intAllowedCategoryMsg)
    End If
Next

If blnForumCheck Then ...

If the boolean doesn't work, just use an integer.
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 09 February 2004 :  03:33:48  Show Profile  Send StephenD a Yahoo! Message
Thanks Laser, I'll give it a try tonight.
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 09 February 2004 :  17:45:44  Show Profile  Send StephenD a Yahoo! Message
Laser, it doesn't show in post.asp in any forum. I used:
inc_header.asp
intAllowedCategoryArray = Array(50,51,52,53,54,55,56,57,58)

post.asp
For x = 0 to UBound(intAllowedCategoryArray)
    If Forum_ID = intAllowedCategoryArray(x) Then
        blnForumCheck = Yes
        x = UBound(intAllowedCategoryArray)
    End If
Next

If blnForumCheck Then 
%>
<!--#INCLUDE FILE="inc_messageicons.asp" -->
<%
end if


What do you mean by use an integer instead?
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 10 February 2004 :  00:51:18  Show Profile
Use as integer :


For x = 0 to UBound(intAllowedCategoryArray)
    If Forum_ID = intAllowedCategoryArray(x) Then
        blnForumCheck = 1
        x = UBound(intAllowedCategoryArray)
    End If
Next

If blnForumCheck = 1 Then 
%>
<!--#INCLUDE FILE="inc_messageicons.asp" -->
<%
end if


Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 10 February 2004 :  04:25:51  Show Profile  Send StephenD a Yahoo! Message
Still doesn't show for all forums. Any ideas?
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 10 February 2004 :  04:35:44  Show Profile
Does it show it Forum 50 ?
Have you got the code in the proper spot ?
Example URL and username ?
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 10 February 2004 :  05:03:50  Show Profile  Send StephenD a Yahoo! Message
No, doesn't show in forum 5O or 51 etc

www.stephendoyle.net/post.txt text version of post.asp - look for line 950
www.stephendoyle.net
U:snitz
P:snitz
If you use post2.asp in your url it will show how the icons appear.


Edited by - StephenD on 10 February 2004 05:05:33
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 10 February 2004 :  15:23:50  Show Profile
snitz user doesn't have access to forum 50+

You just want this MOD available in some forums, correct ?
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 10 February 2004 :  17:29:38  Show Profile  Send StephenD a Yahoo! Message
Sorry about that. I thought I changed it but checking it now it seems I've got some 3.4.04 upgrade problems with post.asp and post_info.asp that I missed, namely edit forums doesn't work and post_info page gets stuck after hitting submit. I'll have to get back to you on this when I fix it up.

But yes, I only want the msg icons available for the forum no.s in that array.
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 11 February 2004 :  17:08:01  Show Profile  Send StephenD a Yahoo! Message
OK, I've fixed up post_info.asp and post.asp to work properly. Laser, if you are around, can you retry that array please.
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 12 February 2004 :  03:23:53  Show Profile
Your code is fine, but you need to change Forum_ID to strRqForumID
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 12 February 2004 :  05:24:48  Show Profile  Send StephenD a Yahoo! Message
Excellent Laser, works perfect. I can think of lots of other applications for this code now too.

Cheers Mate!
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 12 February 2004 :  05:28:57  Show Profile
no prob, you threw me with the Forum_ID variable at first, but not your fault - I should have checked the code further
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07