[Snippet] RSS FEED
#16
Posted 24 February 2008 - 09:25 PM
#17
Posted 26 February 2008 - 11:54 PM
I've set up this snippet and it works great, but I have some questions:
1) Is there a right way of disabling the etoNotice? I'm not finding this switch in the index file... Also wouldn't it be nice not to have to do this? I'd like to keep the notice but not have it show up in the feed...
2) how can I call this snippet dynamically (if possible) so that a feed of the page it's clicked on is available? Let me elaborate: I'm on the news page, I click the RSS link, and I get a feed of the news page. I'm on the home page, I click the RSS link, and I get a feed of the home page.
Also, can I use a parent of '0' to get a feed of the whole website?
thanks
#18
Posted 27 February 2008 - 04:59 AM
Quote
No you can't set 0 to do the whole site. You can, however use phpMyAdmin to add 'rss' to every page in the keyword table, this will add every page in the site.
Eto notice needs to be manually removed by deleting it from the bottom of the snippet. I thought that seeing I was asking everyone to remove the notice from thier site for the feed to validate, that they should have it somewhere and made it tricky for people to remove it to compensate.
I'll get back to you about possibilities for adding a dynamic rss feed link to embed in a template.
[edit] the etoNotice=false; switch is almost at the bottom of the index.php file, if it still exists, you will get an error with the feed. If you have already removed it as mentioned above and you are seeing it in the feed, you will have to remove it from the snippet code.[/edit]
Edited by Cris D., 27 February 2008 - 07:38 AM.
#19
Posted 27 February 2008 - 08:14 AM
- remove all checks for input types and just use a $_POST['rssId'];
- configure the new snippet to return the results of the posting page only,
- code the data so only the posting page data is shown($data=$etomite->getDocumentContent($_POST['rssId'])

- create a new document for just the RSSThisPage snippet
- create a form that posts the $etomite->documentIdentifier id to the snippet to place in the site template,
- test to see how the 2 rss snippets will interact if in the same site
- document setting up procedures for the RSSThisPage snippet
- Post to etomite library.
Any takers? Otherwise as much as I love supporting my snippets, it won't be until nearing the end of this year...
#20
Posted 28 February 2008 - 11:41 AM
#22
Posted 28 February 2008 - 02:39 PM
#23
Posted 04 December 2008 - 12:46 AM
i am using etomite for a little while now, and wanted to make an rss feed available, however i have some problems getting it right.
The feed i have is almost correct ( http://www.pernette.nl/rssFeed )
But somehow in the source just after the <channel> tag there is a <p> tag inserted.
And this <p> tag makes the complete RSS feed unvalid.
Does anyone have an idea where this <p> tag might be coming from? a have been looking a little at the snippet and the template, but it doesn't look like there is anything wrong.
MoRRiS
#24
Posted 04 December 2008 - 01:04 AM
The rssFeed page itself which has as only content [!rssFeed2.0!] or should i say 'should have' was wrong.
Because i do all my edits with the rich text editor, the text editor inserted a <p>.. </p> in the page.
If i tried to switch to htmlsource, then delete the <p> and click update it looked like it removed the <p> tags, but whenever i then hit the 'save' button it inserted the <p> tags again.
the solution was to switch in the etomite settings the editor to simple html editing, fix or create this page, and save it.
afterwards you can switch back to rich text editor again.
keep up the good work with this nice RSS feed sippet!!
MoRRiS
Edited by MoRRiS, 04 December 2008 - 10:25 AM.
#25
Posted 04 December 2008 - 06:58 AM
#26
Posted 11 December 2008 - 10:50 PM
I am having problems again running the rss snippet, and i think i pinned it down to the following query that made:
$sql = "SELECT * FROM $tbl1 WHERE keyword='RSS' OR keyword='rss' UNION SELECT * FROM $tbl2 WHERE keyword_id > 0";
the results are always to much pages even if there is no page that has the 'rss' keywoard.
If i run this query on my database, this is the result
mysql> select * from etomite_site_keywords where keyword='RSS' or keyword='rss' UNION select * from etomite_keyword_xref where keyword_id > 0;
+-----+---------+
| id | keyword |
+-----+---------+
| 8 | rss |
| 66 | 49 |
| 66 | 47 |
| 65 | 53 |
| 160 | 3 |
| 160 | 12 |
| 161 | 50 |
| 169 | 52 |
| 169 | 51 |
| 162 | 9 |
| 168 | 9 |
| 108 | 8 |
| 51 | 3 |
| 52 | 2 |
| 55 | 5 |
| 58 | 4 |
| 60 | 6 |
| 61 | 7 |
+-----+---------+
18 rows in set (0.00 sec)
And i think the only result should be that page_id 108 has keyword '8' (keywoard 8 being 'rss')
Can anyone help me with this, what is going wrong in my setup?
MoRRiS
#27
Posted 12 December 2008 - 09:14 AM
#28
Posted 12 December 2008 - 11:40 AM
Its too long ago for me to remember the details, or which versions of MySQL I was using at the time, but you may have to break down the query into several simpler queries returning partial results.
#29
Posted 12 December 2008 - 01:51 PM
#30
Posted 13 December 2008 - 11:56 AM
Ralph, on Dec 12 2008, 02:51 PM, said:
Hi, with some help of a friend, i think i created a query that does work now, if i am sure it works i will upload it later. (should i upload the complete snippet's code, or just the changes i made?)
The mysql version i use is 5.032 (debian installation)
MoRRiS.
#31
Posted 13 December 2008 - 02:27 PM
MoRRiS, on Dec 13 2008, 06:56 AM, said:
The mysql version i use is 5.032 (debian installation)
MoRRiS.
Great... If the code works and all you've changed is the query itself, posting the new query code should suffice... Either way is fine, however - especially if you'd like credit for the potential improvement...
#32
Posted 13 December 2008 - 02:29 PM
Ralph, on Dec 13 2008, 03:27 PM, said:
Only changing the query wasn't enough. since the script started with the UNION parameter further on in the script the wrong column names where used. the best way would be to clean up the complete snippet, but right now we just swapped the colomn names wich is a little dirty
#33
Posted 13 December 2008 - 02:44 PM
change the existing query:
$sql = "SELECT * FROM $tbl1 WHERE keyword='RSS' OR keyword='rss' UNION SELECT * FROM $tbl2 WHERE keyword_id > 0";
$resourceArray=array();
$result = $this->dbQuery($sql);
for($i=0;$i<@$this->recordCount($result);$i++) {
array_push($resourceArray,@$this->fetchRow($result));
}
//extract the document ids, pop the ist field off with keyword results
for($i=1; $i<count($resourceArray); $i++){
$RSSDocs[]=$resourceArray[$i]['id'];
}
into: $sql = "SELECT * FROM $tbl1 WHERE keyword='RSS' OR keyword='rss'";
$result = $this->dbQuery($sql);
for($i=0;$i<@$this->recordCount($result);$i++) {
$row = $this->fetchRow($result);
$rss_ids.= ','.$row['id'];
}
$sql = "SELECT content_id AS id FROM $tbl2 WHERE keyword_id IN (0".$rss_ids.")";
$resourceArray=array();
$result = $this->dbQuery($sql);
// echo 'aantal results uit query: '.$this->recordCount($result);
for($i=0;$i<@$this->recordCount($result);$i++) {
array_push($resourceArray,@$this->fetchRow($result));
}
//extract the document ids, pop the ist field off with keyword results
for($i=0; $i<count($resourceArray); $i++){
$RSSDocs[]=$resourceArray[$i]['id'];
// echo 'ID: '.$resourceArray[$i]['id'].'
';
}
So far, this is what i changed to make it work. I hope it will help people
(hmm, the debugging comments may be deleted
Edited by MoRRiS, 13 December 2008 - 02:45 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











