G-NEWS 3.0 SUPPORT PAGE

INSTALLING G-NEWS 3.0;
Unzip gnews3.zip file, and upload to your webserver. Move news.mdb file to your database directory. This database directory must have read/write permission. For database security server must not allow files to be browsed. This is a security rule but some webhosting companies have this security hole. 

{   This is just a personel note to you. Ask your webhosting company or test it. Try to browse this directory.   }

news.mdb is an Microsoft Access 2000 file. You may use an MS-SQL or mySQL server instead of it. 

In news.mdb file there are some example news inside. These news are fot testing G-NEWS 3 after you install. 

Default Directory;
This version has two config.asp file. Because most of users can not understand about SSI (Server Side Includes). To connect database these configuration files are playing a major role.  Rest of these program is so easy if you can edit these file crrectly. Config.asp file n default directory has some variables. But first of all let me talk about this file :

<%
Dim strCon
Dim objRec
Dim objCon
' Connecting Database
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("databases/news.mdb")
DefaultPage = 5
SearchSize = 10
Default_1 = 5
ListAll = 30
Sub PageDisplay()
If ipage > 1 Then
%>
<p align="center"><font class=r5>
<%
showpages = "Page:&nbsp;"
For z = 1 to ipage
If z = page then
showpages = showpages & page & " "
Else 
showpages = showpages & "<a class=6 href='" & "search.asp" & "?page=" & z & "&keyword=" & server.URLencode(ikey) ">" & z & "</a>" & "&nbsp;"
End If 
Next 
Response.Write showpages & "&nbsp;&nbsp;</font></p>"
End If
End Sub
%>

5th Line points (underline) database. I have used MS Access 2000 database using a virtual path. So it is easy. You may use those alternatives for Access 2000, MS-SQL and mySQL: 

MS-ACCESS 2000
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\script\g-news\databases\news.mdb;" 
MS-SQL 
strCon = "driver={SQL Server};server=ASP;uid=kemal;pwd=mypassword;database=gnewssql" 
mySQL
strCon = "driver=MySQL;server=PHPSQL;uid=kemal;pwd=yenilmez;database=mytest"

For MS-SQL and mySQL server i have copies and pasted my own cnfigurations. I am using SQL 7.0 and my SQL server name is ASP and mySQL server name is PHPSQL. You must know your servers names. You can get help from your webhosting company.

Other variables are for limit numbers that each page will show. You may change these values but i think these limits will be enough.

PageDisplay subroutine is paging news to files. This subroutine is for search page. Only this page has complex code.  I have moved this subroutine to config.asp file.

If you have edit strCon variable, i think you can test it online. When you browse to default.asp file you will find 7 pages. At the right top of the page, click News Index link. I have put some alternative pages. You will see first news "Asking for Help..." These are example news. Remove them later.  Only next five news's first 150 characters of news body. If a visitor wants to read more, he/she should visit read.asp file.  At the right side of the page there are other headlines. If a visitor wants to read all headlines,there is a link at the bottom of that table. Listall.asp page shows us all headlines of news.

Manager Directory;
In these directory edit only config.asp file. Username is admin and password is gnews. To change username and password opne login.asp file and change them. I did not store these in database.

You may edit styles from style.css file.

You may get support writing to support@aspreferences.com or forum .  

 

COPYRIGHT 2001 KEMAL YENILMEZ