How does that work? Do you put in a simple username/password
unencrypted right in the url?  Easy enough to do. Perhaps you can do a
bit of research and find out how it is normally done...

Cheers,
Dan


On Mon, Sep 21, 2009 at 2:13 PM, Markus <[email protected]> wrote:
>
> While we are at RSS... What about username + password protection of
> feeds? I have a private site for which I would like to have a feed. Of
> course, putting private pages to a public feed is not my intention.
> Most feed readers seem to support authentication for feeds.
>
> Regards, Markus
>
> On Sep 21, 7:30 pm, Markus <[email protected]> wrote:
>> On Sep 21, 4:13 pm, The Editor <[email protected]> wrote:
>>
>> > On Mon, Sep 21, 2009 at 8:19 AM, Markus <[email protected]> 
>> > wrote:
>>
>> > > First, it's definitely the newest script version. Also the searches I
>> > > tried matched just two pages most of the time. The one I posted above
>> > > _should_ match around 20 or 25 at most. But read on...
>>
>> > Do you have your site fully indexed? It should affect the
>> > group=parameter, but if you are trying to do text/data/link, etc,
>> > indexing is essential.
>>
>> I have put [(index)] into my footer.
>>
>> > > Lesson 1:
>> > > One important information for the solutions page is that RSS might not
>> > > work with MAMP or the like on your localhost. The same code that gives
>> > > at least some RSS output on my server ends with an internal server
>> > > error when used with MAMP offline. As Dan pointed out, some tools
>> > > might be missing.
>>
>> > Possible, but not necessarily. I got the recent server errors online
>> > because something in my online configuration setup triggered a php bug
>> > that was not triggered offline. Nothing to do with apache--though it
>> > did a lousy job reporting the error. And even then windows and linux
>> > work differently in certain situations, so it could be anything. If it
>> > was a missing library, I would think you would get a message in your
>> > php error log for calling an undefined function. Have you checked your
>> > error logs?
>>
>> Sorry, I forgot to check the logs when you first mentioned it. Indeed,
>> every page hit gives this entry in the MAMP PHP error log:
>> [21-Sep-2009 16:43:09] PHP Notice:  Undefined index:  errors in /Users/
>> m/Sites/boltwire/barn/scripts/engine.php on line 17
>>
>>
>>
>>
>>
>> > > Lesson 2:
>> > > Even when action=rsslist shows exactly what you want to feed, it is no
>> > > guarantee that these pages will display in your RSS reader.
>> > > Dan, if interested you can check out the following page with the login
>> > > I gave you:
>> > > rss.listOKfeedNotOK (rsslist OK, feed broken)
>>
>> > This is very strange. The critical lines in the rssfeed function are these:
>>
>> >         $pages = BOLTsort(BOLTsearchPageList($args, $zone), $args); // add
>> > third false for no auth checking
>> >         if ($_GET['action'] == 'rsslist') return BOLTdisplay($pages, 
>> > $args);
>>
>> > You'll notice the action=rsslist option uses the exact same array of
>> > pages  used later by the script to generate the rss feed. So unless
>> > somehow one or the other cancels out some pages for some reason, their
>> > output should be the same...  I'm not denying it, just seems strange.
>> > Both start with exactly the same list of pages at least.
>>
>> > > Lesson 3:
>> > > I might not notice when the page RSS was not saved correctly. I edit
>> > > the page and save it. I get redirected to view the RSS page which is
>> > > automatically opened in my feed reader. Since the RSS page is not
>> > > displayed in the browser, the browser still displays the edit page
>> > > from before. Any further edits using the "old" edit form won't be
>> > > saved. Better remember which edit tabs you already used...
>>
>> > Yes, that could be a bit tricky.  :)  You could possibly try creating
>> > a custom edit action like this: copy action.edit => action.rss.edit,
>> > and add to the end of the form
>>
>> > [session nextpage {p}&action=source]
>>
>> > That way you should be able to check that what you saved is there now,
>> > and get any messages you need. If it works, we could possibly add it
>> > to the backup file.
>>
>> Yes, that works. Makes it much harder to use the same edit tab more
>> than once.
>>
>>
>>
>>
>>
>> > > Lesson 4:
>> > > It seems to be a misbelief that you can just put a search together
>> > > that matches the pages you want to see in your feed, then change the
>> > > function name to "rssfeed" and everything works. For example feeding
>> > > all pages with a certain keyword does not seem to work. Dan, you can
>> > > check:
>> > > rss.keyword
>>
>> > This is true, but we could add that functionality perhaps.  And in
>> > fact this could be our problem... This line in rss.php ~32 should be
>> > changed from
>>
>> >         $pages = BOLTsort(BOLTsearchPageList($args, $zone), $args); // add
>> > third false for no auth checking
>>
>> > to
>>
>> >         $pages = BOLTsearchPageList($args, $zone); // add third false for 
>> > no
>> > auth checking
>>
>> > The way it was written, with the new changes to the core search
>> > function, the sort function gets called twice.
>>
>> Changing this line did not fix the feed. (It's enough to change
>> rss.php in the plugins folder, right? As it seems not to be copied to
>> the field.)
>>
>> > To try adding the other search criteria we need to replace that line
>> > with this entire snippet (let me know if it works--we could polish
>> > this up more nicely, and I'll update the script):
>>
>> >         global $outarray
>> >         $outarray = BOLTsearchPageList($args, $zone); // add third false 
>> > for
>> > no auth checking
>> >         if (isset($args['text'])) BOLTcheckNest1($args['text'], 'text', 
>> > $args);
>> >         if (isset($args['data'])) BOLTcheckNest1($args['data'], 'data', 
>> > $args);
>> >         if (isset($args['link'])) BOLTcheckNest1($args['link'], 'link', 
>> > $args);
>> >         $pages = $outarray;
>>
>> This breaks the whole field. But only if you don't notice the missing
>> semi-colon in the first line. ;)
>>
>> This works! Just those pages containing the keyword are put to the
>> feed. And "exclude" does its job too. Good work!
>>
>> > This would be cool because you could generate a rss feed of all the
>> > pages that link to a page. IE, put /*[[rss]]*/ on a page and instantly
>> > it gets added to your feed (with link=rss).
>>
>> Sounds incredibly useful and flexible!
>>
>> > > Some problems I reported might have been caused by my naive approach
>> > > to start with some simple matching like this. From reading the
>> > > solutions page I expected that "rssfeed" can be used with all the
>> > > parameters of "search".
>>
>> > Let's see if we can't fix the code before we fix the docs.  :)
>>
>> Just in case... it was not meant to offend the editor of the docs. ;)
>>
>>
>>
>>
>>
>> > > Lesson 5:
>> > > When using a page named "rss" (and not some lower hierarchy like
>> > > rss.whatever), the following line is put into the edit field:
>> > >http://www.domain.com/field/index.php?p=rss
>> > > I think you won't see this when you use for example rss.blog. It would
>> > > be a non-issue if the solutions page did not specifically say that you
>> > > can use "rss" as the page name. :)
>>
>> > It should not do this anyway. And it just did it for me!  We have some
>> > weird things going on here, Markus...  I'm very busy this week, but
>> > I'll stick with you as best I can and try to work through it with you.
>>
>> > Another problem. I tried installing rss in a new field, didn't get it
>> > to work, then uninstalled. Got a white screen. Traced it down to a
>> > couple lines in engine.php that need to be rewritten:
>>
>> > ~1428 or so.
>>
>> >                 elseif ($pageArray[0] == 'rss') {
>> >                         if (! isset($_GET['action']) && 
>> > BOLTexists('code.skin.rss')) $skin
>> > = 'code.skin.rss';
>> >                         else $skin = BOLTgetlink($BOLTcodePages, 'skin');
>> >                         }
>>
>> > This will return the normal skin if code.skin.rss doesn't exist rather
>> > than a whole new skin. Seems the overall logic of this little code
>> > section (lines before and after) could be simplified, but this will
>> > work for now...  Does anyone remember why we have a print=true option
>> > here?
>>
>> > > Great, most of the issues with RSS seem to be solved, or at least
>> > > identified.
>>
>> > Solved?
>>
>> Well, a good portion of optimism shouldn't hurt... Let's say some
>> issues are solved. :)
>>
>> > > Is it possible to feed changed pages? Currently if I put a page into
>> > > my feed, it won't display as new in my feed reader when updated. I
>> > > have a similar page to BoltWire.com's download page, where I post
>> > > updates. But since I don't create a new page for each update, I wonder
>> > > how this can be reflected in the feed.
>>
>> > You should be able to do sort=lastmodified in the rssfeed function.
>> > Did that not work for you?
>>
>> Ah, this one is tricky, too. Yes, that does work. Though depending on
>> the feed reader you will see it or not. Some mark it unread, some give
>> a hint "updated" and some just update the retrieval time and "think"
>> the entry is the old one already downloaded. I guess BoltWire is not
>> to blame here.
>>
>> > > Thanks for reading!
>>
>> > Sorry it's not working as well as we'd like. We'll get there. It would
>> > be a fun problem to track down if I had more time today!!!
>>
>> Take your time! I think we already made quite some progress.
>>
>> Regards, Markus
>>
>> PS: Wished I was wrong with the BoltWire.com issue... ;)
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to