Jump to content


Show_phpBB2


28 replies to this topic

#16 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

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

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

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

    Etomite Forum Newbie

  • Member
  • 47 posts

Posted 10 November 2006 - 10:05 AM

View Postlloyd_borrett, on Aug 29 2006, 03:43 AM, said:

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

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

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

    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.


#21 rockarena

    Etomite Forum Newbie

  • Member
  • 12 posts

Posted 25 November 2006 - 11:19 PM

How would I use this snippet to just show all the new topics? Is there a way to identify them or maybe just post the new snippets from a certain date? The reason I'm asking this is because I want this snippet to post that information on a small space on my website, namely a sidebar. Is this at all possible?

#22 Gyepmester

    Etomite Forum Newbie

  • Member
  • 2 posts

Posted 19 June 2007 - 05:25 AM

Does it work for phpBB 3 too?

#23 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 19 June 2007 - 06:57 AM

phpBB3 is still classified as UNSTABLE, therefore, if it does work now, that doesn't guarantee that it will work in the future, and vice versa. Why not try it and let us all know if it works? I personally would be waiting to integrate a STABLE release.

#24 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 30 September 2009 - 10:45 PM

G'day,

I've just noticed that my versions of the Show_phpBB2 and Showhead_phpBB2 are no longer returning the topics I expect them to. I haven't checked the pages using them for years, so I'm not quite sure when the problem surfaced. I suspect it has something to do with the host being updated at some stage to 4.1.22-standard or PHP to 5.2.5. Or maybe the query in the snippet was just never correct for the functionality required.

I want to get the first x topics from the desired forum. Say the first 5 topics as shown at http://www.scubadoct...ewforum.php?f=1

Instead I'm getting a very different result. See http://www.scubadoct...nouncements.htm, or maybe easier, the bottom of the page http://www.scubadoctor.com.au/home.htm.

Nothing has changed in the snippet's SELECT statements.
	$query = "SELECT * FROM ".$table_prefix."topics WHERE forum_id=".$forumnr." ORDER BY 'topic_type' DESC , 'topic_first_post_id' DESC LIMIT 0 , ". $topiccount ;
	$result2 = mysql_query($query);
	while($row = mysql_fetch_array($result2)) {

It seems as if MySQL is getting the first x topics and then sorting them. That is, the LIMIT is applied before the ORDER BY.

I need to be getting all of the topics, sorting them, and then just returning the first x after the sort. That is, the LIMIT is applied after the ORDER BY.

When I try the SELECT statement in phpMyAdmin I get the results I'd expect. But not by the snippets.

Any suggestions as to how to resolve this would be gratefully received.

Question: Is there an easy way to dump the results of the query in the snippet for debugging purposes?

Edited by lloyd_borrett, 30 September 2009 - 10:59 PM.


#25 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 01 October 2009 - 12:12 AM

Two ideas for you Lloyd... First, try using LIMIT ". $topiccount instead of LIMIT 0 , ". $topiccount as the zero can be implicit and may help... If that doesn't work, could you create an index for 'topictype'...??? If neither of those works, let us know...


#26 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 01 October 2009 - 11:00 PM

Changing and even removing the LIMIT part makes no difference.
Thus it seems my first thoughts are probably incorrect.

It seems the ORDER BY part of the query simply isn't working.
Doesn't work in phpMyAdmin either.

It's got me stumped.

#27 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,506 posts
  • Gender:Male

Posted 01 October 2009 - 11:50 PM

I just noticed that you're using single quotes instead of backticks around your column names... Try using either nothing around the column names, or backticks, and then single quotes around values...

$query = "SELECT * FROM {$table_prefix}topics WHERE forum_id={$forumnr} ORDER BY topic_type DESC , topic_first_post_id DESC LIMIT 0,{$topiccount}";
-- OR --
$query = "SELECT * FROM {$table_prefix}topics WHERE `forum_id`={$forumnr} ORDER BY `topic_type` DESC , `topic_first_post_id` DESC LIMIT 0,{$topiccount}";


#28 lloyd_borrett

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 605 posts
  • Gender:Male

Posted 02 October 2009 - 12:22 AM

That did it! Many thanks Ralph.

#29 DodoG

    Etomite Forum Newbie

  • Member
  • 7 posts

Posted 17 August 2010 - 11:13 PM

Has anyone modified this script for phpBB3? It would be very usefull.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users