Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Snitz-Syndication - changing font styles
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

AryaputrA
Starting Member

Malaysia
23 Posts

Posted - 31 March 2002 :  12:29:17  Show Profile  Visit AryaputrA's Homepage
I got the Snitz-Syndication working now, but how to make the links appear in specified fonts and color, since it will display the links to the forum topic, i would to use the hover css from my css file. I chose to display using Javascript. Now where do i add in this line :
<Font Face="verdana" size="2" class="nav"> the linked text </font>

The source for the syndicate.asp
------------------------------------------------
<%
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strPath = Request.serverVariables("PATH_INFO")
strPath = replace(strPath,"syndicate.asp","link.asp")
strDomain = "http://" & Request.serverVariables("SERVER_NAME")
strMethod = Request.queryString("method")
intResults = Int(Request.queryString("results"))
if intResults < 1 or intResults = "" then
intResults = 1
end if
if strMethod = "" then
strMethod = "last_post"
end if

select case strMethod
case "last_post"
strSql = "SELECT TOP " & intResults & " T_AUTHOR,T_LAST_POST,T_LAST_POSTER,T_DATE,T_SUBJECT,TOPIC_ID," & strTablePrefix & "TOPICS.FORUM_ID," & strTablePrefix & "TOPICS.CAT_ID,T_REPLIES from " & strTablePrefix & "TOPICS," & strTablePrefix & "FORUM where " & strTablePrefix & "TOPICS.FORUM_ID=" & strTablePrefix & "FORUM.FORUM_ID "
if request.queryString("p")<>"y" then
strSql = strSql & "and " & strTablePrefix & "FORUM.F_PRIVATEFORUMS=0 "
end if
strSql = strSql & "order by " & strTablePrefix & "TOPICS.T_LAST_POST DESC"
case "most_popular"
intAge = Int(Request.queryString("age"))
if intAge < 1 or intAge = "" then
intAge = 1
end if
intAge = 0 - intAge
lastDate = DateToStr(DateAdd("d",intAge,Now()))
strSql = "SELECT TOP " & intResults &_
" T_AUTHOR,T_LAST_POST,T_LAST_POSTER,T_DATE,T_SUBJECT,TOPIC_ID," &_
strTablePrefix & "TOPICS.FORUM_ID," & strTablePrefix &_
"TOPICS.CAT_ID,T_REPLIES from " & strTablePrefix & "TOPICS," &_
strTablePrefix & "FORUM and where " & strTablePrefix & "TOPICS.FORUM_ID=" &_
strTablePrefix & "FORUM.FORUM_ID "
if request.queryString("p")<>"y" then
strSql = strSql & "and " & strTablePrefix & "FORUM.F_PRIVATEFORUMS=0 "
end if
strSql = strSql & "and T_LAST_POST > '" & lastDate & "' order by T_REPLIES DESC"
end select
set objRs = my_Conn.execute(strSql)
select case Request.QueryString("xml")
case "xml"
xml = ""
xml = "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?><links>"
do until objRs.eof
intID=objRs("TOPIC_ID")
strSubject=objRs("T_SUBJECT")
xml = xml & "<item>"
xml = xml & "<title>" & strSubject & "</title>"
xml = xml & "<link>" & strDomain & strPath & "?TOPIC_ID=" & intID & "</link>"
xml = xml & "<responses>" & objRs("T_REPLIES") & "</responses>"
xml = xml & "</item>"
objRs.movenext
loop
xml = xml & "</links>"
response.clear
response.expires = 0
response.contentType = "text/xml"
response.write xml
case "rdf"
xml = ""
xml = "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?><rdf:RDF xmlns:rdf=""http://www.w3.org/1999/02/22-rdf-syntax-ns#"" xmlns=""http://my.netscape.com/rdf/simple/0.9/"">"
do until objRs.eof
intID=objRs("TOPIC_ID")
strSubject=objRs("T_SUBJECT")
xml = xml & "<item>"
xml = xml & "<title>" & strSubject & "</title>"
xml = xml & "<link>" & strDomain & strPath & "?TOPIC_ID=" & intID & "</link>"
xml = xml & "<responses>" & objRs("T_REPLIES") & "</responses>"
xml = xml & "</item>"
objRs.movenext
loop
xml = xml & "</rdf:RDF>"
response.clear
response.expires = 0
response.contentType = "text/xml"
response.write xml
case "sql"
response.clear
response.contentType = "text/html"
response.write strSql
case else
strJs = ""
if request.queryString("bullets") = "y" then
strPreLink = "<li>"
strPostLink = "</li>"
else
strPreLink = ""
strPostLink = "<br />"
end if
if request.queryString("responses") = "y" then
bResponses = true
else
bResponses = false
end if
do until objRs.eof
intID=objRs("TOPIC_ID")
strSubject=objRs("T_SUBJECT")
intPage = 1
if request.queryString("lp")="y" then
intPage = objRs("T_REPLIES") \ strPageSize + 1
end if
strJs = strJs & strPreLink & "<a href=""" & strDomain & strPath & "?TOPIC_ID=" & intID & "&p=" & intPage & """ >" & strSubject & "</a>"
if bResponses = true then
strJs = strJs & " (" & objRs("T_REPLIES") & ")"
end if
strJs = strJs & strPostLink
objRs.movenext
loop
strJs = replace(strJs,"""","\""")
strJs = replace(strJs,vbCrLf,"\n")
response.clear
response.expires = 0
response.ContentType = "text/javascript"
response.write "document.writeln(""" & strJs & """);"
'response.write strJs
end select
set objRs = nothing
set my_Conn = nothing
%>


--------------------------------------------------

Any help would be much appreciated, Thank You


Moved from Help/Current Version

Edited by - Nathan on 31 March 2002 13:43:35

AryaputrA
Starting Member

Malaysia
23 Posts

Posted - 31 March 2002 :  23:21:39  Show Profile  Visit AryaputrA's Homepage
Sorry guys for posting it in a diff topic, thanks Nathan

Go to Top of Page

AryaputrA
Starting Member

Malaysia
23 Posts

Posted - 01 April 2002 :  01:29:08  Show Profile  Visit AryaputrA's Homepage
OK, guys i got it working, i just added the class"nav" to the line, earlier it was target=_blank, since i don't want it to open in another page, i changed it to class nav thing there

strJs = strJs & strPreLink & "<a href=""" & strDomain & strPath & "?TOPIC_ID=" & intID & "&p=" & intPage & """ class=""nav"" >" & strSubject & "</a>"

Thank you anyway, SNITZ RULEZZ !!!!

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.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07