Jump to content


Photo

Show_phpBB2


  • Please log in to reply
28 replies to this topic

#1 TheBear

TheBear

    Etomite Forum Newbie

  • Member
  • 30 posts

Posted 04 February 2006 - 07:09 PM

I have added a new snippet to the Snippet Library!

Snippet name: Show_phpBB2
Author: TheBear
Version: 1.0 (Final)
More info: View this snippet
Description:
Integrates the phpBB forum to your frontpage. It'll take a defined number of topics from a specific forum and display the first (or however many) posts to the front page. Adapted from John Maats' original Show_phpBB. This is quite a different script than his, but the principle behind it is the same. The author and date of the posts are extracted as well. All bbcode is converted into html (e.g. --> )

Please feel free to comment on this snippet, suggest improvements, or simply praise my work! ;)

[This is an automatically created message]

#2 TheBear

TheBear

    Etomite Forum Newbie

  • Member
  • 30 posts

Posted 04 February 2006 - 07:11 PM

Create a new snippet titled [[Show_phpBB2]] and copy the following code. Follow instructions inside the code for usage.

Attached Files



#3 TheBear

TheBear

    Etomite Forum Newbie

  • Member
  • 30 posts

Posted 06 February 2006 - 04:35 AM

So much for it being final :P

I made a small mistake:

Change the code
       $query="SELECT * FROM ".$table_prefix."posts WHERE topic_id=". $topic_id." ORDER BY 'topic_id' DESC LIMIT 0 , ". $postcount;
into
       $query="SELECT * FROM ".$table_prefix."posts WHERE topic_id=". $topic_id." ORDER BY 'post_id' ASC LIMIT 0 , ". $postcount;

Before, the $text would show the latest post in the topic. This will change it so that the first post of the topic will always be shown first. (Ascending order instead of descending).
I've also extracted the poll feature from phpBB (it takes the poll question and shows results in the front page). I'll release it here once I've cleaned it up.

#4 TheBear

TheBear

    Etomite Forum Newbie

  • Member
  • 30 posts

Posted 08 February 2006 - 07:42 AM

I've added the poll extraction. The calling of the snippet is still the same. If you have a poll in one of the topics, the poll question, poll options, and the results will appear.

Unfortunately, it's not as visually appealling as the rest of the extraction... oh well

Feel free to give any insights on the code... since i'm fairly new to php, i've pretty much created this thing through trial and error but everything works great for me. Let me know if you need any specific customizations and I will try my best to accomadate your needs.

Best regards

Attached Files



#5 lloyd_borrett

lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 607 posts

Posted 21 April 2006 - 05:09 AM

G'day,

Excellent work. It installed easily and is working just fine.

I now need to adapt it for use with the Mollio template.

Maybe I'll also throw in a few configuration options so that I can easily turn on and off what is displayed.

Best Regards, Lloyd.

Edited by lloyd_borrett, 07 May 2006 - 10:14 AM.


#6 vr_driver

vr_driver

    Etomite Forum Newbie

  • Member
  • 9 posts

Posted 22 April 2006 - 04:02 AM

Hi,
love your work.

Any chance of a variation to list the current active users instead/as well?

ta,

steve

#7 donnaNJ

donnaNJ

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 05 May 2006 - 07:48 PM

I have added a new snippet to the Snippet Library!

Snippet name: Show_phpBB2
Author: TheBear
Version: 1.0 (Final)
More info: View this snippet
Description:
Integrates the phpBB forum to your frontpage. It'll take a defined number of topics from a specific forum and display the first (or however many) posts to the front page. Adapted from John Maats' original Show_phpBB. This is quite a different script than his, but the principle behind it is the same. The author and date of the posts are extracted as well. All bbcode is converted into html (e.g. --> <b></b>)

Please feel free to comment on this snippet, suggest improvements, or simply praise my work! ;)

[This is an automatically created message]



Does the person have to log in again to post to the BB ?

I'd like to have a members only area (for kids - different levels of scouts) ... and then I'd like to be able to post events on the BB ... I want them to login to see their pages but not have to log in again to see BB.

Is this possible with Etomite/phpBB?

Thanks

Donna

DBK Web Development.com

#8 TheBear

TheBear

    Etomite Forum Newbie

  • Member
  • 30 posts

Posted 07 May 2006 - 08:39 AM

lloyd_borrett: Thank you for the nice comments! I look forward to see it with the template if you do make it.

vr_driver: It is possible but I had no plans to make such a snippet. I will have a look at how phpBB gets the stats but I think I should wait until Olympus (phpBB3) releases before I work on it. You can keep checking or perhaps somebody else will volunteer their time to make one. :)

donnaNJ: Just to clarify - did you want to integrate the etomite user system with the phpBB user system? If so, that goes beyond the scope of this snippet and I'm afraid I wouldn't know how to help you. If you're only concerned with the phpBB user privlidges, you can set the right permissions in your admin panel on your phpBB board and have the specific forum open to guests.

#9 R - stick

R - stick

    Etomite Forum Newbie

  • Member
  • 9 posts

Posted 18 May 2006 - 09:06 PM

Hi

i want append only single topic from my phpBB forum to my Etomite site. What right syntax to call snippet?

Thanks

#10 lloyd_borrett

lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 607 posts

Posted 18 May 2006 - 10:44 PM

G'day,

From the comments in the snippet:

# call snippet like:
#  [[Show_phpBB2?forumnr=1&topiccount=5&postcount=1]]
# This will show 1 post of the 10 latest topics from forum 1.

So if you only want one topic and one post from forum number 1, that would be:
[[Show_phpBB2?forumnr=1&topiccount=1&postcount=1]]

If you don't want to pass the values $forumnr, $topiccount or $postcount as arguments to the snippet, just add the following lines to where you change the other settings (i.e. $url, $ppath):

$forumnr = 1;
$topiccount = 1;
$postcount = 1;

Best Regards, Lloyd.

#11 R - stick

R - stick

    Etomite Forum Newbie

  • Member
  • 9 posts

Posted 19 May 2006 - 07:27 AM

thanks,

but i need specific topic from forum, not first topic.

Example: My forum name is "Magazin info" - ID is 81. This forum contains this topics:
"News" - ID is 127 (first position)
"Accesorries" - ID 135 (second position)
"Products" - ID 279 (third position)
"Support" - ID 347 (fourth position)

I need append only topic "Products" - ID 279

If necessary adapted script?

Best Regards, R - stick

#12 lloyd_borrett

lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 607 posts

Posted 19 May 2006 - 11:33 AM

G'day R - stick,

Yes, you'd probably need to modify the snippet to achieve that.

Alternatively, you could put your 'Product' topic in it's own forum, and then just call that forum.

Best Regards, Lloyd Borrett.

#13 R - stick

R - stick

    Etomite Forum Newbie

  • Member
  • 9 posts

Posted 20 May 2006 - 08:07 AM

Problem for specific topic from forum is solved:

Find code in the snippet:
// set desired topic number and define ids
    $query="SELECT * FROM ".$table_prefix."topics WHERE forum_id=".$forumnr." ORDER BY 'topic_id' DESC LIMIT 0 , ". $topiccount;

Replace:
// set desired topic number and define ids
    $query="SELECT * FROM ".$table_prefix."topics WHERE forum_id=".$forumnr." AND topic_id=".$topicnr;

Call snippet: [[Show_phpBB2?forumnr=80&topicnr=400&postcount=1]]
where forumnr is forum ID and topicnr is topic ID

#14 lloyd_borrett

lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 607 posts

Posted 29 August 2006 - 02:35 AM

G'day,

I've been playing with this snippet recently to use it in various ways on the Pragmatic Training web site.

Some of the changes I've made include:
  • Made XHTML Strict.
  • Added support for and BBCodes.
  • Added support for the list, list=1, list=a and list element BBCodes.
  • Use Etomite server time offset as the default time diff.
  • Set defaults for parameters.
  • Made showing the authors, comments and polls optional.
  • Documentented $diff argument.
  • Changed select statement to put sticky and announcement topics ahead of normal topics.
  • Added option to show all topics and all posts.
I don't think I've broken any earlier functionality, but my focus has been on getting it to work the way I want it to be.

Best Regards, Lloyd Borrett.

Attached File  Show_phpBB2_1_4.php   14.08K   72 downloads

Edited by lloyd_borrett, 29 August 2006 - 02:50 AM.


#15 lloyd_borrett

lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 607 posts

Posted 29 August 2006 - 02:43 AM

G'day,

Attached is a variation on this snippet I built for the Articles page on the Pragmatic Training web site.

It looks through the phpBB open forums for topics that start with the title "Article - ". It builds a list of links to those topics, sorted by category, forum, and topics creation date.

Best Regards, Lloyd Borrett.

Attached File  Show_phpBB2_Articles_1_0.php   4.36K   48 downloads

#16 lloyd_borrett

lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 607 posts

Posted 29 August 2006 - 02:45 AM

G'day,

And here is yet another snippet variation.

This one builds the list of links to 'News and Events' that is displayed on the home page of the Pragmatic Training web site.

Best Regards, Lloyd Borrett.

Attached File  Showhead_phpBB2_1_2.php   2.72K   40 downloads

#17 lloyd_borrett

lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 607 posts

Posted 16 September 2006 - 06:45 AM

G'day,

Here is the latest version of this snippet, as it is being used on the Pragmatic Training web site to produce the FAQ and Recent Announcements pages.

The changes made are:
  • Made XHTML Strict.
  • Added support for and BBCodes.
  • Added support for [ * ] list BBCode.
  • Use Etomite server time offset as the default time diff.
  • Set defaults for parameters.
  • Made showing the authors, comments and polls optional.
  • Documentented $diff argument.
  • Changed select statement to put sticky and announcement topics ahead of normal topics.
  • Added option to show all topics and all posts.
Best Regards, Lloyd Borrett.

Attached File  Show_phpBB2_1_4.php   14.08K   87 downloads

#18 Mukke

Mukke

    Etomite Forum Newbie

  • Member
  • 47 posts

Posted 10 November 2006 - 10:05 AM

It looks through the phpBB open forums for topics that start with the title "Article - ". It builds a list of links to those topics, sorted by category, forum, and topics creation date.


Hey man, nice work, this is exactly what i was looking for altho i made a few ajustments cause i have different pages wich will show different documents.

find this:
$timeadjust = isset($diff) ? ($diff * 60 * 60) : $server_offset_time;
after added this:
$prefix = isset($pre) ? $pre : "Article";
and
find
$query .= "WHERE (t.topic_title LIKE 'Article - %') AND (f.auth_view = 0) AND (f.auth_read = 0) ";
replace by
$query .= "WHERE (t.topic_title LIKE '".$prefix." - %') AND (f.auth_view = 0) AND (f.auth_read = 0) ";

all u need to do then is [[Show_phpBB2_Articles?pre=Guide]] for example if that page can only contain guides.

Edited by Mukke, 10 November 2006 - 10:07 AM.


#19 lloyd_borrett

lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 607 posts

Posted 10 November 2006 - 01:11 PM

Nice changes. I'll look at adding those next time I play with that snippet.

Best Regards, Lloyd Borrett.

#20 Mukke

Mukke

    Etomite Forum Newbie

  • Member
  • 47 posts

Posted 10 November 2006 - 07:45 PM

Also i'm gonna dig into it more cause i'm gonna think out a new concept.

The problem is i don't want people to register on the site twice ( as in once for the board and once for the site)

It's a fansite for a game where people can post guides reviews and much more

i'm gonna make a private forum where newsposters can post news, reviewers can post reviews , reporers can post stories, others can post their guides and so on.
I will make a pgae within etomite that shows every of those topics. If u click one of those tittles u get a page of all topics done with ur script. then u will be able to click to read the article/story on the site (not link to the board) and every post of that topic will be a page. i use the js CoolMenu, the hard thing i guess will be that i'll have a folder documents and i need subfolders in it for each topic an it subpages for each topic posted in the specific forum.. That's gonna be the hardest part

It looks maybe hard to understand but it in my opinion the easiest way to write since i don't wonna rewrite what is written b4 and i like the phpBB structure and used it many times b4 (like in a game i used it db and rewrote my own php for it).

If any1 wants to help me in this i'd be him/her very thankfull. I see this as a challenge but i have done such things b4, the ultimate dream ofc would be a full integration of phpBB to etomite (even regarding to layout) ofc the layout has to written for it a bit.

Regards,
Mukke
U'll here soon again from me.

edit : oh almost forgot, http://www.enemyskillz.com
u will be able to see my progress there

Edited by Mukke, 10 November 2006 - 07:46 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users