Page 1 of 1

Recent Topics mod in center block...

Posted: 16. July 2008 18:46
by Fliggerty
Hello all!

Let me first say I love this portal. It does all that I wanted in a better way than all other portals I looked at. Thanks for this guys!

Now my question: there is a Recent Posts mod for phpbb3 that I enjoy. It puts a block on the top of the index page that shows the last 5 posts, and when you follow the topic title link it displays that last post. I would like to have it display in a center block on the portal though.

This is the mod support thread: (it hasn't seen a lot of support lately)
http://www.phpbb.com/community/viewtopi ... 0&t=628205

This is the code block that is put in styles/prosilver/template/index_body.html to make it show up on the forum index:

Code: Select all

styles/prosilver/template/index_body.html,
    <!-- IF S_USER_LOGGED_IN -->
       <!-- BEGIN lp_config -->
       <!-- IF lp_config.LP_ENABLE -->
          <!-- IF lp_config.LP_SLIDE --><!-- INCLUDE viewlast_post_slide.html -->
          <!-- ELSE --><!-- INCLUDE viewlast_post.html --><!-- ENDIF -->
       <!-- ENDIF -->
       <!-- END lp_config -->
    <!-- ENDIF -->
I put that same block in portal_body.html, and nothing shows up at all. So I simplified it, and only included this: (and various modifications)

Code: Select all

<!-- IF S_USER_LOGGED_IN -->
<!-- INCLUDE viewlast_post.html -->
<!-- ENDIF -->
The block showed up just fine this time, but there was no forum content.

You can see what I mean at http://ghf.erekson.org

Any ideas?

Thanks in advance!

--Fligg

Re: Recent Topics mod in center block...

Posted: 17. July 2008 08:27
by Kevin
Have you done this changes to the portal.php?

find:

Code: Select all

// output page
page_header($user->lang['PORTAL']);
add before:

Code: Select all

include($phpbb_root_path . 'includes/last_post.'.$phpEx);
Then it should work with the portal.

Re: Recent Topics mod in center block...

Posted: 18. July 2008 04:07
by Fliggerty
Thank you for your suggestion! It worked, the 5 most recent topics are showing up on the front page. However, they are only appearing after 10 blank topic slots in the block. So it's definitely an improvement, and progress is always a fantastic thing!

I do appreciate the help. PHP is definitely a new thing for me, I'm converting my site from Perl to PHP (the possibilities astound me!)

So thanks again!

--Fligg

Re: Recent Topics mod in center block...

Posted: 18. July 2008 14:52
by Kevin
Odd...
How do you have the mod configured? To display 5 posts? Or 15?

Re: Recent Topics mod in center block...

Posted: 19. July 2008 04:02
by Fliggerty
I have it set as the default, just 5. It displays only 5 posts on my index page. :?

Re: Recent Topics mod in center block...

Posted: 25. July 2008 05:38
by Sharky
Hi Fliggerty,

What did you change to rectify this problem you had?

Re: Recent Topics mod in center block...

Posted: 25. July 2008 08:05
by Kevin
Looks to me, like he had adapted the recent topic mod by nickvergessen:

Code: Select all

<!-- $Id: recent_topics_body.html 68 2008-01-06 01:03:56Z nickvergessen $ -->
http://www.phpbb.com/community/viewtopi ... 0&t=573680


Would be nice if you could describe your adaption to others in the Blocks - In Development forum. ;)

Re: Recent Topics mod in center block...

Posted: 26. July 2008 00:33
by Fliggerty
Yeah, I just switched to a different mod. I couldn't figure out what the problem was, and no one was forthcoming with any help. So I went a different route. :D

I'll make a post over there. I'm going to play with a few things first though to get it just right. :D