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/Code)
 MOD: mark "important" topics (beta)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

eauxvives
Junior Member

Bhutan
145 Posts

Posted - 28 February 2006 :  12:06:43  Show Profile  Reply with Quote
this is a followup on the discussion here:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=61093
as suggested by tribaliztic, I am making the code available to everyone.

The purpose of this small MOD is to allow moderators and admins to "mark" certain topics which then can be retrieved using a SQL query and for example be displayed on the site's home page (or forum) as 'webmaster's picks'.

IMPORTANT, PLEASE NOTE:
1. this is my first MOD (after having used Snitz for 7 years, I'm proud!)
2. I am very far from being an ASP/Snitz expert.
3. I have initially made the modifications on already heavily modded pages, so I hope I have not made mistakes in finding the changes and locating the proper places where to apply the changes on 'clean' pages.
4. English is not my native language

So, consider this as beta!
I am waiting for the specialist's advice and suggestions on this, so please do not add this to your forum unless you're really sure what you're doing
So, here it is:
http://www.eauxvives.org/forum/mark_topic_help.htm

<

Edited by - eauxvives on 28 February 2006 12:09:38

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 28 February 2006 :  13:35:22  Show Profile  Visit Jezmeister's Homepage  Reply with Quote
I havent tested it but a few things that might make it easier for people:
Create a zip file containing the image files, readme and a dbs file...
eg:

dbs_ImportantTopics.asp
Code for file:
DBS File For Important Topics Mod
[ALTER]
TOPICS
ADD#T_FLAG#int#NULL#
[END]


Also you might want to note that it's not MySql friendly asis, I'll have a go at installing it later - looks good!<

Edited by - Jezmeister on 28 February 2006 13:36:19
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 28 February 2006 :  13:45:19  Show Profile  Visit modifichicci's Homepage  Reply with Quote
Don't forget to update A_TOPICS and admin_forums also, to let archive functions working...<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 01 March 2006 :  05:25:30  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
quote:
Originally posted by Jezmeister


Also you might want to note that it's not MySql friendly asis, I'll have a go at installing it later - looks good!



AAAAAHH!!!
Not MySQL-friendly? =)
What would cause problems? Can anyone do the required changes to make it work with MySQL?
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

eauxvives
Junior Member

Bhutan
145 Posts

Posted - 01 March 2006 :  05:49:41  Show Profile  Reply with Quote
quote:
Originally posted by modifichicci

Don't forget to update A_TOPICS and admin_forums also, to let archive functions working...


don't know if anyone would want to 'mark' topic that are archived ? (i.e. 'old' )<
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 01 March 2006 :  09:12:34  Show Profile  Visit modifichicci's Homepage  Reply with Quote
Not to archive that topic, but all topic will have a new field that must be also in A_ table.. or the routine of archiviation could fail.<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 01 March 2006 :  14:17:37  Show Profile  Visit Jezmeister's Homepage  Reply with Quote
quote:
Originally posted by tribaliztic

quote:
Originally posted by Jezmeister


Also you might want to note that it's not MySql friendly asis, I'll have a go at installing it later - looks good!



AAAAAHH!!!
Not MySQL-friendly? =)
What would cause problems? Can anyone do the required changes to make it work with MySQL?




well the specific thing I noticed was that you used "TOP" in your query - MySql doesn't support that... eg if you added this into inc_header.asp instead you could call the code from any part of the site:
if strDBType = "mysql" then
strITop2 = "select * from " & strTablePrefix & "topics where t_flag >0 order by t_flag desc"
strITop2 = strITop2 & " LIMIT 10 "
else
strITop2 = "select top 10 * from " & strTablePrefix & "topics where t_flag >0 order by t_flag desc"
end if
Set strITop = my_Conn.Execute(strITop2)
<

Edited by - Jezmeister on 01 March 2006 14:18:34
Go to Top of Page

eauxvives
Junior Member

Bhutan
145 Posts

Posted - 02 March 2006 :  00:33:28  Show Profile  Reply with Quote
OK, i'll fix this
another suggestion I got is to add the icons also in active.asp, not only forum.asp
any other suggestions ?<
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 March 2006 :  05:15:29  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Ah, the old TOP =) I thought it was more to it than that =)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 02 March 2006 :  05:31:53  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message  Reply with Quote
quote:
Originally posted by Jezmeister

AAAAAHH!!!
Not MySQL-friendly? =)
What would cause problems? Can anyone do the required changes to make it work with MySQL?

well the specific thing I noticed was that you used "TOP" in your query - MySql doesn't support that... eg if you added this into inc_header.asp instead you could call the code from any part of the site:
if strDBType = "mysql" then
strITop2 = "select * from " & strTablePrefix & "topics where t_flag >0 order by t_flag desc"
strITop2 = strITop2 & " LIMIT 10 "
else
strITop2 = "select top 10 * from " & strTablePrefix & "topics where t_flag >0 order by t_flag desc"
end if
Set strITop = my_Conn.Execute(strITop2)



That's what the TopSQL funcion from inc_func_common.asp is for...

So instead of
if strDBType = "mysql" then
strITop2 = "select * from " & strTablePrefix & "topics where t_flag >0 order by t_flag desc"
strITop2 = strITop2 & " LIMIT 10 "
else
strITop2 = "select top 10 * from " & strTablePrefix & "topics where t_flag >0 order by t_flag desc"
end if
Set strITop = my_Conn.Execute(strITop2)

you can use
strITop2 = "SELECT FROM " & strTablePrefix & "TOPIC WHERE T_FLAG > 0 ORDER BY T_FLAG DESC"
strITop2 = TopSQL(strITop,10)
Set strITop = my_Conn.Execute(strITop2)
<

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 March 2006 :  05:42:08  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Nice, there are some good stuff in the inc_func-files.. =)
btw, is there a list of all functions and how they could be used?
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 02 March 2006 :  05:50:26  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message  Reply with Quote
Such a list is being worked on.<

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 March 2006 :  05:57:16  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Great!!
I've discovered some of the functions while working on mods and they are a BIG help once you understand what they're doing =)

Offtopic: I've posted a couple of questions at your site OWM =)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 02 March 2006 :  07:39:53  Show Profile  Visit Jezmeister's Homepage  Reply with Quote
quote:
Originally posted by OneWayMule


That's what the TopSQL funcion from inc_func_common.asp is for...[/code]



I have to say I've never noticed that before... guess it's worth remembering ty.<
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 02 March 2006 :  13:29:51  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message  Reply with Quote
No prob! <

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

eauxvives
Junior Member

Bhutan
145 Posts

Posted - 02 March 2006 :  15:41:09  Show Profile  Reply with Quote
I'm impressed to see how smart are the snitz team guys :-)))<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07