Author |
Topic |
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 July 2009 : 06:33:44
|
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
|
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. |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 July 2009 : 17:26:29
|
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:
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 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 18 July 2009 : 18:00:36
|
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 |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 July 2009 : 18:22:21
|
I appreciate the help and look forward to see the result. The method is where I get stuck with inner outer unions join etc... |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 18 July 2009 : 22:15:32
|
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. |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 18 July 2009 : 22:16:34
|
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 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 18 July 2009 : 22:17:47
|
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 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 18 July 2009 : 22:20:06
|
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. |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 18 July 2009 : 22:26:07
|
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 |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 19 July 2009 : 05:51:38
|
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 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 19 July 2009 : 06:50:39
|
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 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 19 July 2009 : 07:29:24
|
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 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 19 July 2009 : 07:37:23
|
Also, if you are using Access, what I did doesn't want to work on that db. I tested it on MS SQL 2005. |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 19 July 2009 : 09:02:01
|
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 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 19 July 2009 : 09:25:15
|
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 |
|
|
Topic |
|