title: PHPBB3 Forum feed on external page for non-authenticated users
body: <p>I am trying to integrate Forum Feeds of a PHPBB3 Forum into an external Frontpage.</p>
  
  <p>For this I'm using an example from the phpbbwiki :
  <a href="https://wiki.phpbb.com/Practical.Displaying_posts_and_topics_on_external_pages" rel="nofollow">here is the code</a></p>
  
  <p>My problem is that this only works if the user is authenticated on the forum allready, but I would like the user to see topics that are open to guest users, instead of a PHPBB default (blank-)page.</p>
  
  <p>In this case I am using ajax to return topics in JSON, but this should not really matter for my problem here.</p>
  
  <p>It would be good to know if this is achievable within the scope of what PHPBB is able to deliver and where to start looking if this is a more complicated problem.</p>
  
  <p>If this is a simple matter for some of you I would be grateful for help.</p>
  
  <p>Thank you!</p>
  
  <p><strong>update</strong></p>
  
  <p>The SQL Statement for retrieval of the posts is not created, because the user does not seem to have read permissions. The conditional that fails is (funnction: create_where_clauses) :</p>
  
  <pre><code>// If the type is forum, do the check to make sure the user has read permissions
  else if( $type == 'forum_id' &amp;&amp; $auth-&gt;acl_get('f_read', $id_check) )
  </code></pre>
  
  <p>where id_check is the current forum_id.  </p>
  
  <p>Here is part of the user data object:</p>
  
  <pre><code>  ["user_id"]  =&gt; string(1) "1"
    ["user_type"]=&gt; string(1) "2"
    ["group_id"] =&gt; string(1) "1"
  </code></pre>
  
  <p>This User is in the GUESTS Group and its type is IGNORE by default.
  I'have tried setting user_type to 0=NORMAL - to no avail.</p>
  
  <p>As a normal visitor on the PHPBB3 Forum I can read all open forums and I wonder
  why this generic guest user cannot access the forums.</p>
  
  <p><strong>update and sollution</strong></p>
  
  <p>I want to thank you for the answer that brought me on track again.
  I would have searchted endlessly for a sollution in the depths of PHPBBs user management
  when the original mistake I made was just a dumb copy/paste problem...</p>
  
  <pre><code>$forum_id = array(2, 5);
  $forum_id_where = create_where_clauses($forum_id, 'forum');
  
  $topic_id = array(20, 50);
  $topic_id_where = create_where_clauses($topic_id, 'topic');
  </code></pre>
  
  <p>These two lines where taken from the tutorial and still in place when trying to retrieve
  data from "all" forums and topics. Incidentally those Forum Id's where open to registered users
  and closed to non-authenticated users. When lifiting the above content restrictions the script
  again performs as it should be.</p>
  
  <p>So again - extra thanks goes to Andy.</p>