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
 Syndication mod - variation
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 18 July 2009 :  06:33:44  Show Profile
I have the Syndication MOD add-on which allows you to distribute forum topics to other website pages by allowing them to embed a javascript file inline with their HTML. I have been looking at the output and notice that the events calendar post do not show. Is there a way to show the list of 'upcoming events' separately, that is shown in the Events Calendar Mod. Has anyone achieved this variation.

AnonJr
Moderator

United States
5768 Posts

Posted - 18 July 2009 :  11:48:38  Show Profile  Visit AnonJr's Homepage
Its been a while since I last looked at that MOD, but if memory serves, you could create a feed from a specific forum. I've not used the Events Calendar MOD, so I don't know, but if all the events are in a single forum you should be able to create a feed from that forum.
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 18 July 2009 :  17:26:29  Show Profile
AnonJr, I am baffled by the science and wouldn't know where to start creating a feed. What I can see, well I think it is, is a routine that appears in the Events calendar Mod in cal_functions.asp which possible extracts the data:

'*****************************************************************
 Sub WriteUpcomingEvents
'*****************************************************************

strSql = "SELECT "
If strDBtype = "access" or strDBtype = "sqlserver" then strSql = strSql & "TOP " & intCalEventstoDisplay & " "
strSql = strSql &   "T.TOPIC_ID, " & _
                    "T.T_SUBJECT, " & _
                    "T.FORUM_ID, " & _
                    "T.T_STATUS, " & _
                    "E.EVENT_DATE, " & _
                    "C.CAT_MODERATION, " & _
                    "F.F_MODERATION " & _
    "FROM ((" & _ 
        strTablePrefix & "TOPICS AS T " & _
    "INNER JOIN " & _
        strTablePrefix & "CAL_EVENTS AS E ON E.TOPIC_ID = T.TOPIC_ID) " & _
    "INNER JOIN " & _
        strTablePrefix & "CATEGORY AS C ON C.CAT_ID = T.CAT_ID) " & _
    "INNER JOIN " & _
            strTablePrefix & "FORUM AS F ON F.FORUM_ID = T.FORUM_ID " & _
    "WHERE E.EVENT_DATE > '" & DateToStr(DateValue(strForumTimeAdjust)) & "' "
If intRqCalForumID <> 0 then strSQL = strSQL & _ 
            "AND T.FORUM_ID = " & intRqCalForumID & " "
strSQL = strSQL & _ 
    "ORDER BY E.EVENT_DATE Asc"


set rs = Server.CreateObject("ADODB.Recordset")
rs.MaxRecords = intCalEventstoDisplay
rs.open StrSql, My_conn


If rs.EOF then
    Response.Write "<DIV class=""cal_listitem"">" & strCalNoUpcoming & "</DIV>" & vbnewline

Else Do Until rs.EOF
    Topic_ID = rs("TOPIC_ID")
    Topic_Subject = rs("T_SUBJECT")
    Forum_ID = rs("FORUM_ID")
    Topic_Status = rs("T_STATUS")
    Event_Date = StrToDate(rs("EVENT_DATE"))
    Cat_Moderation = rs("CAT_MODERATION")
    Forum_Moderation = rs("F_MODERATION")


    '*****************************************************************

But what I am failing to see how we can generate a variation of the syndicate form in the mod, to generate the 'feed' code.
Thank you so far..
andy

Edited by - Andy Humm on 18 July 2009 17:27:40
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 18 July 2009 :  18:00:36  Show Profile  Visit Etymon's Homepage
I can fiddle with it later tonight when I get a chance. It looks like in setuplinks.asp a new "method" has to be created for "last_events" just like there is a "method" for "last_posts". Then you can have the script create the provision for it. In syndicate.asp, the CAL_EVENTS table needs to be joined on its TOPIC_ID with the TOPICS table's TOPIC_ID so the connection can be made between the TOPICS table and the CAL_EVENTS table. I'll see what I come up with later unless someone beats me to it. My later tonight is like 2-3AM.

Edited by - Etymon on 18 July 2009 18:02:57
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 18 July 2009 :  18:22:21  Show Profile
I appreciate the help and look forward to see the result. The method is where I get stuck with inner outer unions join etc...
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 18 July 2009 :  22:15:32  Show Profile  Visit Etymon's Homepage
I altered the two files (setupLinks.asp and syndicate.asp). They are in the two posts below. This is set up so that only events show, and it does not matter from what forum unless you specify in setupLinks.asp what you want. Well, just like it is for the most popular, etc.
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 18 July 2009 :  22:16:34  Show Profile  Visit Etymon's Homepage
setupLinks.asp

Deleted posted code due to an interpretation error. Two different versions posted in the replies below. #1 is in red. #2 is in blue.

Edited by - Etymon on 19 July 2009 09:36:44
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 18 July 2009 :  22:17:47  Show Profile  Visit Etymon's Homepage
syndicate.asp

Deleted posted code due to an interpretation error. Two different versions posted in the replies below. #1 is in red. #2 is in blue.

Edited by - Etymon on 19 July 2009 09:37:08
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 18 July 2009 :  22:20:06  Show Profile  Visit Etymon's Homepage
On the joins, it was a RIGHT JOIN to select only the events from the primary table CAL_EVENTS. In other words, the statement tells it to select only the topic ids from the CAL_EVENTS table that are also in the TOPICS table.
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 18 July 2009 :  22:26:07  Show Profile  Visit Etymon's Homepage
Also, this does not leave out events when you choose the other options like "by Last Post (Recent Posts)", "by Topic Replies (Most Popular)", "by Topic Date (New Topics)". If you want that, I'll have to add another selection area below the area where I put that. Which I can see where this could snowball into including polls and what not though I know there is already a poll display.

The older events calendar has a field like the poll mod has. It was called T_ISEVENT which was just a one or a zero. It would be nice if the current event calendar mod had that for times like what you needed here. It would be like if rs("T_ISEVENT") = "1" then, but, alas, it is not.

Let me know if it's not what you needed.

Etymon

Edited by - Etymon on 18 July 2009 23:39:07
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 19 July 2009 :  05:51:38  Show Profile
Stirling stuff Etymon, Thank you for your assistance so far..
Tried the new code and received a couple of small errors:
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/forum/setupLinks.asp, line 60
" show topics/posts within <input type=""text"" name=""age"" value=""30"" size=""2""> days.<br /> <small>(available on "Most Popular" and "New Topics" mode only)</small>" & vbNewLine

I have amended that line to alter the " marks to & quot ; (spaces put in code so quot shows here)

" show topics/posts within <input type=""text"" name=""age"" value=""30"" size=""2""> days.<br /> <small>(available on & quot ;Most Popular& quot ; and & quot ;New Topics& quot ; mode only)</small>" & vbNewLine & _


/forum/setupLinks.asp, line 238 (The < > tags need to be as in red below;)
"<li>just insert above HTML code to your web page. (usually in a & lt ;td& gt ;....& lt ;/td& gt ;)</li>" & vbNewLine & _

Also
/forum/setupLinks.asp, line 240

"<li><font color=""red"">IMPORTANT: if where you insert is ASP code, REMEMBER change ALL <b>"</b> to <b>"</b><b>"</b>.</font></li>" & vbNewLine & _

Changed the " marks to & quot ;

"<li><font color=""red"">IMPORTANT: if where you insert is ASP code, REMEMBER change ALL <b>& quot ;</b> to <b>& quot ;</b><b>& quot ;</b>.</font></li>" & vbNewLine & _


The Syndicate Link Builder table now displays and ticking 'by Event Date' and then press submit, a code is generated but the Preview output table does not show a listing of events. To add to the diagnosis, if I cut and paste the generated code onto another webpage the output is not shown..

All the other radio buttons generate a preview output. Thinking it might be the code whereever it is to extract events
Thank you so far.
Andy
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 19 July 2009 :  06:50:39  Show Profile  Visit Etymon's Homepage
Hmm, I think that is something with the way Snitz here interpretted what I posted, because it worked before. I went on to something else with it, I'll post it on my site as a text file next time with a link to it from here.

Edited by - Etymon on 19 July 2009 07:02:57
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 19 July 2009 :  07:29:24  Show Profile  Visit Etymon's Homepage
OK, I made two MODs for you. The one below (in red) is what you asked for. The second one a few replies down (in blue) is more advanced. It allows for Topics Only, Events Only, Polls Only, and Everything. If you don't mind, please test both versions.

Right click and "Save As" ...


Version #1

setupLinks.txt

syndicate.txt


It should look like this:


Edited by - Etymon on 19 July 2009 09:30:21
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 19 July 2009 :  07:37:23  Show Profile  Visit Etymon's Homepage
Also, if you are using Access, what I did doesn't want to work on that db. I tested it on MS SQL 2005.
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 19 July 2009 :  09:02:01  Show Profile  Visit Etymon's Homepage
Hey, Andy, on line 21 of syndicate.asp there is an error in the download from SnitzBitz.

intAge = cInt(Request.QueryString("ag"))

is missing an e

It should be this:

intAge = cInt(Request.QueryString("age"))

You'll need to fix that in my .txt link above until I can get around to fixing it. - Fixed

Edited by - Etymon on 19 July 2009 09:40:32
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 19 July 2009 :  09:25:15  Show Profile  Visit Etymon's Homepage
This is the second version (in blue) I mentioned above.

Right click and "Save As" ...


Version #2

setupLinks.txt

syndicate.txt


It should look like this:


Edited by - Etymon on 19 July 2009 09:28:17
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07