Author |
Topic |
burthold
Junior Member
USA
426 Posts |
Posted - 13 July 2002 : 20:02:29
|
Mod Name: Front page news Mod Version: v.01 Tested on: 3.3.05 only should work with any 3.3.x forums though Databases: Only tested on MySQL v3.23.40NT Creator Name: Wesley Brown Creator Email: Burthold@yahoo.com Download at: www.wesworld.net/mods/newsmod.zip View at: www.wesworld.net/texastgc/default.asp
I wrote this to just display simple news on the front page.
Run the DBS or execute this query against your forums database. You may need to change the table name to reflect your table name struct you should leave the news part of the table alone. This does not effect any other table in your database.
create table forum_news (n_text varchar(250), n_date datetime, member_id int)
Just copy these files into your forums directory insert into default.asp around line 43 <!--#INCLUDE FILE="inc_news_body.asp" --> after <!--#INCLUDE FILE="inc_top.asp" -->
Insert this into admin_home.asp <LI><a href="admin_newspost.asp">Add News</a></LI> around line 70 where you will find this: <LI><a href="admin_config_badwords.asp">Bad Word Feature Configuration</a></LI>
Also, in this archive is a copy of HuwR's (Huw Reddick) admin_mod_dbsetup.asp YOU DO NOT NEED TO COPY THIS FILE IF YOU DON'T WANT TO!!!!! YOU DO NOT NEED TO COPY THIS FILE IF YOU DON'T WANT TO!!!!! Very minor change for MySQL support Check around line number 228 strSql = "CREATE TABLE " & TablePrefix & strTableName & "( " Added a space at &" ( " to make it comliant with MySQL CREATE TABLE spec
I am providing this mod without any real support. I wrote it quick and dirty to give me quick news on the front page.
Wesley Brown
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
|
burthold
Junior Member
USA
426 Posts |
Posted - 13 July 2002 : 21:34:22
|
I'll check into it I only run mysql but I did make a provision for MS-SQL I assumed that it would work with access if it works with MS-SQL.
Wes
|
|
|
burthold
Junior Member
USA
426 Posts |
Posted - 13 July 2002 : 21:50:44
|
Can you tell me what it did or didn't do? Any errors?
|
|
|
burthold
Junior Member
USA
426 Posts |
Posted - 13 July 2002 : 22:06:48
|
My bad I forgot to include the two functions needed. New files will be going up in about 30min
Wes
|
|
|
burthold
Junior Member
USA
426 Posts |
Posted - 13 July 2002 : 22:15:12
|
Mod Name: Front page news Mod Version: v.01 Tested on: 3.3.05 only should work with any 3.3.x forums though Databases: Only tested on MySQL v3.23.40NT Creator Name: Wesley Brown Creator Email: Burthold@yahoo.com Download at: www.wesworld.net/mods/newsmod.zip View at: www.wesworld.net/texastgc/default.asp
I wrote this to just display simple news on the front page.
Run the DBS or execute this query against your forums database you may need to change the table name to reflect your table name struct you should leave the news part of the table alone
create table forum_news (n_text varchar(250), n_date datetime, member_id int)
Just copy these files into your forums directory insert into default.asp around line 43 <!--#INCLUDE FILE="inc_news_body.asp" --> after <!--#INCLUDE FILE="inc_top.asp" -->
Insert this into admin_home.asp <LI><a href="admin_newspost.asp">Add News</a></LI> around line 70 where you will find this: <LI><a href="admin_config_badwords.asp">Bad Word Feature Configuration</a></LI>
Insert CODE TO PASTE into inc_functions.asp at around line 2093 between End Function and before this sub call Sub WriteFooter() %> <!--#INCLUDE FILE="inc_footer.asp"--> <% end sub %>
CODE TO PASTE:
'news poster Function WriteNews(fVariable) WriteNews = "added" dim ndate ndate = year(now())&"-"&month(now())&"-"&day(now())&" "&hour(now())&":"&minute(now())&":"&second(now()) my_conn.execute ( "INSERT INTO " & strTablePrefix & "news (n_text,n_date,member_id) VALUES ('" & fVariable & "','"&ndate&"',1)")
End function 'end news poster
function SQLparse(s) '********************************************* '* This just does a charater replacement on my '* insert and update sections '* so I don't blow up the database. '* Wes Brown '********************************************* dim tmp tmp = s tmp = replace(tmp, "’", "'") tmp = replace(tmp, "`", "'") tmp = replace(tmp, "'", "''")
SQLparse = tmp 'SQLparse end end function
Also, in this archive is a copy of HuwR's (Huw Reddick) admin_mod_dbsetup.asp YOU DO NOT NEED TO COPY THIS FILE IF YOU DON'T WANT TO!!!!! YOU DO NOT NEED TO COPY THIS FILE IF YOU DON'T WANT TO!!!!! Very minor change for MySQL support Check around line number 228 strSql = "CREATE TABLE " & TablePrefix & strTableName & "( " Added a space at &" ( " to make it comliant with MySQL CREATE TABLE spec
I am providing this mod without any real support. I wrote it quick and dirty to give me quick news on the front page.
All this is in the Readme.txt
Wesley Brown
|
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
|
burthold
Junior Member
USA
426 Posts |
Posted - 14 July 2002 : 00:18:49
|
Just cut and paste the code I put up into your inc_functions.asp or download the updated zip file and cut and past it out of there :)
Wes
|
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 15 July 2002 : 22:28:47
|
Am looking forward to trying this out! Thanks, burthold!
Cheers,
Etymon
|
|
|
burthold
Junior Member
USA
426 Posts |
Posted - 18 July 2002 : 14:31:18
|
Your welcome. If you have any questions just drop me a line.
Wes
|
|
|
aviv
Junior Member
474 Posts |
|
burthold
Junior Member
USA
426 Posts |
Posted - 18 July 2002 : 18:33:03
|
I haven't built a news deleter it only shows the top 4 current news post. I am working on an admin deleter now.
|
|
|
burthold
Junior Member
USA
426 Posts |
|
aviv
Junior Member
474 Posts |
Posted - 19 July 2002 : 02:29:10
|
i downloaded the new admin_newspost.asp but it seems to be the same.
ThanX Aviv Hebrew Snitz support center |
|
|
burthold
Junior Member
USA
426 Posts |
Posted - 19 July 2002 : 09:08:33
|
I re uploaded it. all should be the same except the admin_newspost.asp. I looked at the zip pack and the file is there for sure now.
Wes
|
|
|
aviv
Junior Member
474 Posts |
Posted - 20 July 2002 : 14:12:27
|
It's working now but the problem is that when you write a long message it's twisting the forum.because it's only on one line.
ThanX Aviv Hebrew Snitz support center |
|
|
Topic |
|