MyBB Community Forums

Full Version: RSS and password protected board
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey there,

I'd like to use the rss syndication feature of mybb to have the latest postings show up in my rss reader. However, the board we're using is set to private and requires a password. Is it somehow possible to include the login information with the rss feed I put into my reader?

Thanks,
TOM
Simply NO
I beg to differ. There was a discussion on this topic in the MyBB 1.2 Series forum, which is still largely applicable. The original thread is http://community.mybboard.net/thread-32425.html

Of course as with all sorts of automatic login, security issues arise, so implementing this solution should only be done after carefully weighing the benefits and risks, and the trustworthiness of the software or service that you give the Feed URL to must be questioned carefully. However, I do feel that there are circumstances that make this desirable, so I am presenting the solution I have implemented for our board. On the other hand, the mybbuser Cookie string is also transmitted with every request while browsing the forum, in the clear unless you use https.

I found that minor adjustments were required when I applied this solution to MyBB 1.4.6 because of some code changes. I also expanded the RSS feed URL generator to provide the required URLs to make it easier for users.

Part 1: accepting the mybbuser string in the feed URL

in inc/class_session.php insert two lines:
               if($mybb->input['mybbuser'])
                       $mybb->cookies['mybbuser'] = $mybb->input['mybbuser'];
immediately before (near line 70)
                if($mybb->cookies['mybbuser'])
                {
                        $logon = explode("_", $mybb->cookies['mybbuser'], 2);

Part 2: provide a login-enriched feed URL to the user

In the template misc_syndication, replace at the end of the input form the line:
</tr></table>
by the section (for our board I have for simplicity directly included the German text in the template. If you cater for an international audience, please define additional language variables instead):
</tr>
<tr>
<td class="trow1" width="40%" valign="top"><strong>Login einbinden</strong><br /><span class="smalltext">Authentifizierungsdaten in die URL einbinden, so dass der Feed immer Zugriff auf die nichtöffentlichen Daten hat. Dies bedingt einen gewissen Verlust an Sicherheit.</span></td>
<td class="trow1" width="60%"><input type="checkbox" class="checkbox" name="includelogin" value="yes" /> </td>
</tr>
</table>

as well as in misc.php, after line (about line 562)
        $forums = $mybb->input['forums'];
add the line
       $includelogin = $mybb->input['includelogin'];

and after the lines (about line 630)
                        {
                                $url .= "limit=$limit";
                        }
add the lines
                       if($includelogin == "yes")
                       {
                               $url .= "&mybbuser=".$mybb->cookies['mybbuser'];
                       }