Bloglines mod

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/58846?pagenum=1
05 November 2025, 10:54

Topic


MarcelG
Bloglines mod
12 July 2005, 04:51


I'm trying to design a mod that enables a 'bloglines' like facility for registered members. The idea that I'm having is this:
- Create a new table in the db, called FORUM_FEEDS, where the ID, URL and NAME of the RSS feeds are stored. For instance:
Code:
FEED_ID, FEED_URL, FEED_NAME
1 , http://forum.snitz.com/rssfeed.asp , Snitz Forums 2000
2 , http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss091.xml , BBC World News
Etc etc. Let's assume that this list is filled with 40+ feeds. Now, I want to enable each member to select a maximum of 10 feeds from that central list, in a page called 'my_feeds_edit.asp'. At first I thought I'd take the Avatar mod as the base for this mod, but I see that the Avatar mod stores the actual avatar_url in the members table, instead of the reference to the avatar_id. Using that route would mean that I'd have to add at least 10 columns to the members table, but that's not what I want to do. Instead, I want to add only 1 field, called MEMBERS.M_FEEDS, where I want to store the FEED_ID's, in this format :
Code:
1,4,5,8,21,34,28,12,14,17

Then, finally, I create a page called my_feeds.asp, where one sees the RSS Feeds displayed in the forum layout. I already have a piece of code to display the feeds.
I think I need to pull the feeds via this query ;
Code:
strSqL = "SELECT M_FEEDS " 
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "FEEDS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
Now I've got the 'array', let's call it myFeeds
The second query pulls the URL's from the FEEDS table.
Code:
strSql = "SELECT FEED_URL, FEED_NAME "
strSql = strSql & "FROM " & strTablePrefix & "FEEDS "
strSql = strSql & "WHERE " & strTablePrefix & "FEEDS.FEED_ID IN (" & myFeeds & ") "

Perhaps, these two queries above can be put together in one query.. question
After this, I can loop through the feeds, and display them one by one.
So, the general idea is there, but perhaps someone has some other ideas about this, or is willing to work together on this mod. cool<

 

Replies ...


Shaggy
12 July 2005, 05:06


I'd recommend creating a new table with two fields, one for MEMBER_ID and on for FEED_ID, á la the MODERATOR table and then use a join to select the FEED_IDs from the new table and the details from the FEEDS table.
<
MarcelG
12 July 2005, 05:30


mmm...sounds plausible. No interference with the memberstable, no upgrade of the pending members table. Gonna have a look at how the moderator-thingy works.<
Shaggy
12 July 2005, 05:36


Ay, all you'd need would be the MemberID variable.
I'd give you an example of an SQL query but, unfortunately, I don't get on to well with JOINs!
<
MarcelG
12 July 2005, 07:46


I just whirled up this ; (it's all on paper ; nothing live yet)
The DBS:
Code:
Members RSS Feeds Mod for 3.4
[CREATE] FEEDS
FEED_ID
FEED_URL#varchar (255)#NULL#
FEED_NAME#varchar (50)#NULL#
[END] [CREATE] M_FEEDS
MFEED_ID
MEMBER_ID
[END] [INSERT] CONFIG_NEW
(C_VARIABLE,C_VALUE)#('intEnableMFeeds','1')
[END]
The query for getting the FEED_ID's from the table.
Code:
'getting the feeds from the db
strSql = "SELECT FEED_URL, FEED_ID, MEMBER_ID, " & _
" FROM " & strTablePrefix & "MFEEDS" & _
" , " & strMemberTablePrefix & "FEEDS " & _
" WHERE FEED_ID = MFEED_ID AND " & _
" MEMBER_ID = " & getMemberID(strDBNTUserName) & "" & _
" ORDER BY MFEED_ID"
<
Shaggy
12 July 2005, 07:56


D'oh! Of course; no need for a JOIN, don't know what I was thinking when I sugessted that, but it made perfect sense at the time! tongue Looks good, man smile Only thing I'd suggest (and maybe I'm off here) is switching the prefixes, giving the MFEEDS table the MEMBERS_ prefix and the FEEDS table a prefix of FORUM_

<
MarcelG
12 July 2005, 08:06


Okay! Switching prefixes! Man, this will be my first mod that will be done totally in theory before using the T&E method wink<
Shaggy
12 July 2005, 08:15


You might want to check the documentation for dbs files as well, if you want a new table to take the MEMBERS_ prefix, it needs to, I think, contain the word MEMBERS in its name. Can't remember exactly what the criteria is, though.
<
MarcelG
12 July 2005, 08:19


Well, I've just checked my DB, and I see that all tables have FORUM_ as prefix...also the MEMBERS table...(FORUM_MEMBERS) ... question<
Shaggy
12 July 2005, 08:27


Sorry for the confusion, meant for you to switch so MFEEDS uses strMemberTablePrefix and FEEDS uses strTablePrefix which are configurable in config.asp. I always forget that little point, whenever I do use prefixes I always use MEMBERS_ for member tables, you're obviously using FORUM_ for both. Still, if you're releasing this as a mod, no harm in making the change.
<edit> Actually, thinking through the logic a bit more, perhaps they should both use strMemberTablePrefix that way, those who do run multiple forums using the same members tables can also share the feeds across forums. </edit>

<
MarcelG
12 July 2005, 08:33


Ah, now I see. Changing it. So, the DBS would be something like this:
Code:
Members RSS Feeds Mod for 3.4
[CREATE] MEMBERS_FEEDS
MEMBERS_FEEDS.FEED_ID
MEMBERS_FEEDS.FEED_URL#varchar(255)#NULL#
MEMBERS_FEEDS.FEED_NAME#varchar(50)#NULL#
[END] [CREATE] MEMBERS_MFEEDS
MEMBERS_MFEEDS.MFEED_ID#int#NULL#0
MEMBERS_MFEEDS.MEMBER_ID##NULL#0
[END]
No need for an ID field in the MFEEDS table.
I've also created a Feed Admin page, based on the Smile Manager Plus Admin page (yep...still a Copy/Paste programmer wink)
So, we've got the DBS file, we've got the query to get the smilies from the table, we've got the admin page for managing the feeds. What else do we need... Let me think.
  • The page where the user selects the feeds
  • The page that renders the selected feeds for that user
  • That's about it ... I guess....<
    Shaggy
    12 July 2005, 09:09


    Just checked the DBS documentation and there's no mention of how to give a table the strMemberTablePrefix prefix. Double checked admin_mod_dbsetup.asp and a table name needs to have MEMBER in it to take that prefix.
    <
    MarcelG
    12 July 2005, 09:28


    Thanks. So, the above mentioned DBS is correct ? Or should I leave out the tablename in the field name ?
    BTW ; things are progressing quickly at this side ; I've already created the complete displaypage, plus the function to display the feed. I'm working on the my_feeds_config.asp file now, and I've decided to go for an 'unlimited feeds per member' method, based on the method used for specifying the Allowed Members list in post.asp. (So, two columns, the first with the available feeds, and the second with the selected feeds, with an ADD/REMOVE button in the middle).<
    Shaggy
    12 July 2005, 09:34


    Yeah, the dbs will work as you have it. Although, I've never seen a DBS with the table names in the field names. Not sure whether it would work or not so probabl best to leave them out to be safe.
    <
    MarcelG
    12 July 2005, 10:09


    Okay...I'm a bit lost now. I'm working on the page where the user selects the feeds to display, but I'm a bit stuck there. I think I've got the page which enables the member to select the feeds, but I cannot figure out how post_info.asp actually updates the db. So, for reference:
    my_feeds_config.asp = the equivalent of post.asp
    my_feeds_update.asp = the equivalent of post_info.asp

    Here's the total progress up until now;
    http://www.oxle.nl/uploaded/18/Member_feeds.zip

    Feel free to have a look at the code, and feel even more free to help bigsmile Oh, the code is somewhat non-standard, as it uses some oxle-css code. The final mod will be base-compatible, so no worries there.<
    Shaggy
    12 July 2005, 10:21


    As you submit the form (i.e., using the onclick event of your submit button), you will need to select all the options in the select combo with the members selected feeds in. As you already have selectbox.js in your page you can do this using the selectAllOptions() function, passing the name of the select combo through the arguments. See line 1311 of a clean post.asp for a demo.
    Then have a look at the newForumMembers, updateForumMembers, newForumModerators and updateForumModerators subs at the end of post_info.asp to see how Snitz updates the ALLOWED_MEMBERS and MODERATORS tables.
    <
    MarcelG
    12 July 2005, 10:27


    Thanks for the tip ; will do so.<
    Shaggy
    12 July 2005, 10:31


    You're welcome, shout back if you need more details than that.
    <
    MarcelG
    12 July 2005, 11:05


    I will certainly do so! smile
    Anyway, thanks for all the help so far ; I'll be heading home now ; plenty of time tonight to fiddle around bigsmile With a bit of luck - and a lot of trial&error - I hope to have this up and running by tomorrow.<
    Shaggy
    12 July 2005, 11:18


    Looking forward to it, man smile
    <
    MarcelG
    12 July 2005, 14:06


    lol....while driving home, sr_erick took the mod and seems to have nearly finished it (
    screenshot)
    Now I just have to get my hands on sr_ericks edits to see what I shóuld have done ... wink<
    MarcelG
    12 July 2005, 15:35


    Well...the DBS file is giving me a headache.
    I started with the DBS mentioned above, but with the MEMBERS_FEEDS. and MEMBERS_MFEEDS. removed from the fieldnames. The first table (FORUM_FEEDS) got added..but the second one failed, cause it existed already. Strange. So, I checked the db using tableeditor ; no mfeeds table. So, I decided to retry, with different tablenames. I just ran this dbs file:
    Code:
    Members RSS Feeds Mod for 3.4
    [CREATE] DAHSJK MFEED_ID#int#NULL#0
    MEMBER_ID##NULL#0
    [END]
    So, there's NO way that a table called FORUM_DAHSJK was already in there. However, this is the result:
    Members RSS Feeds Mod for 3.4

    Creating table(s)... CREATE TABLE FORUM_DAHSJK( MFEED_ID#INT#NULL#0 int IDENTITY (1, 1) PRIMARY KEY NOT NULL , MEMBER_ID NULL DEFAULT 0)
    Table already exists
    Database setup finished
    ?? What's happening ?<
    -gary
    13 July 2005, 15:30


    I use an excellent little RSS feeder that is class driven and has the ability to cache results you might want to take a look at. Works great. I've been using it for all my XML processing with a little modification.
    http://www.tele-pro.co.uk/scripts/rss/rss_content_feed_class.htm<
    MarcelG
    14 July 2005, 03:39


    Thanks -gary!<
    MarcelG
    14 July 2005, 04:47


    Mmm...Gary, perhaps you know what's causing this:
    I'm retrieving the rss feed from my own site (which is valid RSS 2.0), but the RSSReader demo gives this error:
    RSSContentFeed error '800403e9'

    GetRSS: XML error: End tag 'item' does not match the start tag 'title'.

    /scripts/rss/RSS_Content_Feed_class.1.asp, line 626
    question <
    Shaggy
    14 July 2005, 04:50


    Did you get the DBS problem sorted, Marcel?
    <
    MarcelG
    14 July 2005, 05:21


    Originally posted by Shaggy
    Did you get the DBS problem sorted, Marcel?
    Nope, still not solved. I haven't done much since last tuesday though...(had our 4th wedding anniversary yesterday). Will look into it today and tomorrow once again.<
    -gary
    14 July 2005, 12:09


    RSSContentFeed error '800403e9'

    GetRSS: XML error: End tag 'item' does not match the start tag 'title'.

    /scripts/rss/RSS_Content_Feed_class.1.asp, line 626
    question

    It's choking on an umlaut mark in one of your titles. Don't know why yet.<
    -gary
    14 July 2005, 14:37


    The XmlHttp function needs to use Msxml2.ServerXMLHTTP.4.0 instead of Msxml2.ServerXMLHTTP, otherwise all non-ascii charaters and the next are converted to question marks.
    Your <title>Compleet nederlands gezin verongelukt in Italië</title> line was being converted to <title>Compleet nederlands gezin verongelukt in Itali?/title> causing the parser to not find the closing title tag.
    Download here if you're able to install. If not, your host should upgrade.<
    MarcelG
    14 July 2005, 17:45


    Ah, ok! Thanks for clearing that up! bigsmile I think I would have searched for that for years before I would find that!<
    MarcelG
    15 July 2005, 12:40


    Boohoo ... I've been trying to get the configuration page to work for over 6 hours now ... and it simply won't work.... I'm going completely mad. Is there someone who wants to help me with this ? Please please pretty please ? These are the files:
    conf.asp - based on post.asp, using the moderator setting. conf_info.asp - based on post_info.asp
    The list of available feeds seems to be filled, but the list of selected feeds simply won't work ... and submitting won't work either (it just removes all selected feeds...)<
    MarcelG
    19 July 2005, 10:46


    Update ; I've ditched the method for selecting the feeds, and used a more simple method instead. This is working now. Next to that I enabled 'default' feeds for guests accessing the my_feeds.asp page.
    You can demo all you want here:
    http://www.oxle.com/my_feeds.asp ; if you log in as demo/demo you can also see how the update works.
    Final thing to fix : enable caching of retrieved feeds for at least 15 minutes. I've been fiddling around with that, but I just bumped into a wall everytime I tried to cache a feed containing 'strange' charachters such as é or ä .....
    Code:
    msxml3.dll error '80004005' 

    Unable to save character to 'ISO-8859-1' encoding.

    /inc_my_feeds.asp, line 39
    (login demo/demo for the source)
    So, all help is very much appreciated. After that part I will also create a 'mobile' version, stripped, and without a login, where one could access his/her favourite set of feeds via a link like http://oxle.com/mobfeeds.asp?memberid (so, one would just supply his or her memberid in the url.'

    Finally, when all is done, I'll completely convert it to default Snitz, so that it can be reused as a mod on a plain Snitz. <
    Shaggy
    20 July 2005, 04:37


    Try switching to UTF encoding and see if that helps although I've never come across any problems using those 2 chracters you mentioned in ISO-8859-1.
    <
    MarcelG
    20 July 2005, 07:28


    Shaggy, perhaps this is too much too ask of you, but could you shed some light on the following:

    I've incorporated some form of caching now, but it's rather buggy. It now caches the input XML file now to a file, however, in some instances (for example the DPReview RSS feed, it gives this error:
    Code:
    msxml3.dll error '80004005' 

    Unable to save character to 'ISO-8859-1' encoding.

    /inc_my_feeds.asp, line 39
    This error does NOT seem to be caused by the existence of characters such as é etc, as you can see in the actual feed that gives the error when saving to cache : http://www.dpreview.com/news/dpr.rdf .. nothing strange in that feed as far as I can see. It's not the 'usual' RSS feed, so perhaps tháts the problem.
    However, I was thinking of the following ; instead of caching the input, the output should be cached.
    The current process is this ;
    This process has two flaws:
    1. The save-action fails on several feeds (as described above).
    2. Processing of the XML file is done on every reload of the page, even when the cache is used. This only caches the XML file, saving a HTTPRequest, but not saving the looping through the arrays.
    Therefore I'd like to apply this process instead:
    Now, the output is cached, and only in case the output is outdated, the whole cycle starts of again, including the HTTPRequest ánd the looping through the arrays.
    So, in theory I know what to do. But....I cannot seem to get all the outputdata into one variable...it seems that the data collected within the FOR ... NEXT loops isn't added to the variable. This function is within this file : inc_my_feed.asp (login demo/demo)<
    MarcelG
    21 July 2005, 10:25


    [:-/] No more bumping necessary!!!! With this step by step caching manual, I enabled 15-minute output caching just as decribed! So, the XML feeds are only collected once every 15 minutes (at max), and processed also only once every 15 minutes.
    So, the My Feeds feature is LIVE!!!! (and ready to testdrive by all of you guys! wink)
    Sponsoring members can select up to 20 feeds at this moment, non-sponsoring members can select up to 15 feeds.
    Go ahead, and fiddle around!
    Oh, you can find the direct link here, and when registered at the "my oxle" submenu on the site! [good]<
    NiteOwl
    03 August 2005, 04:07


    looking pretty good so far from what I can tell by testing!!! Have you got somecode to share? :)<
    MarcelG
    03 August 2005, 05:11


    The current code is not ready to be used on default Snitz forums. I will however focus on releasing this entire system as a mod for Snitz, but, not until after my holiday. So, after August 23rd I'll get busy with it ; I guess I need about 2 days to finish it then, excluding these features:
    • Member defined sorting of selected feeds
    • 'personal' feeds (e.g. only available to that member, and not to the entire memberlist)
    Feel free to have a look at the current code, but be aware that it needs some tweaking to get it to work on default Snitz. (source accessible to registered members of oxle, use demo/demo if you don't want to register)Here's the DBS file:
    Code:
    Members RSS Feeds Mod for 3.4
    [CREATE] FEEDS
    FEED_ID
    FEED_URL#varchar(255)#NULL#
    FEED_NAME#varchar(50)#NULL#
    FEED_REFRESH#varchar(20)#NULL#
    [END] [CREATE] MFEEDS
    MFEED_ID#int#NULL#0
    MEMBER_ID##NULL#0
    MFEED_ORDER##NULL#0
    [END]
    This already provides the db field for the custom ordering. Just save it as dbs_feeds.asp in your forum folder, and go to the Mod Setup. Be sure to backup your DB!!!<
    jeffery
    03 August 2005, 15:11


    Hi marcelgoertz. I'm testing this using MSSQL. Fist thing is I'm not seeing the javascript:limitOptions code in conf.asp. I'm wondering if this is why it is not keeping the chosen feeds. If I manually put entries in the database field MFEED they are deleted when I submit conf.asp, I am assuming because of the sub updateForumModerators(). But the sub newForumModerators() is not entering any new data. Otherwise the code seems to be working. I am able to use admin_feeds.asp to submit new available feeds. I guess it's maxselect.js that I need.<
    jeffery
    03 August 2005, 16:12


    Scratch that, it was not inserting from the sub newForumModerators() because MFEED_ORDER is set to not allow NULLS but I didn't know it wasn't because of the 'on error resume next' in the function.<
    Zeus
    07 April 2006, 15:38


    Did this mod ever get posted anywhere. The above links get you most of it, but you cant access the admin_feeds.asp (even when logged into oxle)

    Thanks in advance!
    Zeus<
    MarcelG
    08 April 2006, 08:16


    Nope, I never came to posting this mod as a base-install-compatible mod. However, triggered by you, I decided to take all the files and put them in one zip file. You can find that one here. Be aware ; this is not a complete mod. It has no readme, it has no documentation and it has not been tested outside oxle. Feel free to use it as you please! For support, just post your questions at oxle, or here.
    Originally posted by Zeus
    Did this mod ever get posted anywhere. The above links get you most of it, but you cant access the admin_feeds.asp (even when logged into oxle)

    Thanks in advance!
    Zeus
    <
    Etymon
    23 April 2006, 12:28


    Marcel meant to post a link to his own board ...
    Subject: Member Feeds
    Download URL: http://oxle.nl/topic.asp?tid=3751<
    MarcelG
    24 April 2006, 08:13


    Etymon, have you tried to isntall it yet ? Just curious.<
    Bassman
    24 April 2006, 09:45


    Treid to on my test forum, I keep getting _MFEEDS errors and a lots of JET's<
    MarcelG
    24 April 2006, 09:57


    Mmm...bummer. Have you ran the dbs ?<
    Bassman
    24 April 2006, 10:44


    Yep i did, also there are a couple of includes in there we do not have like _spacer and _sidebar.<
    blackinwhite
    29 October 2006, 07:46


    it works great in terms of functionality. But whole code must be taken care of in terms of tidiness.

    thanks man for the initiative.<
    © 2000-2021 Snitz™ Communications