View Full Version : PHPBB - Customizing the index page
convertabus
08-28-2006, 08:20 PM
How do you go about adding things like list of recent posts to PHPBB?
dkinzer
08-28-2006, 09:14 PM
How do you go about adding things like list of recent posts to PHPBB?
I believe that there is a mod (http://www.phpbb.com/phpBB/viewtopic.php?t=145150) to do this.
That mod doesn't work for me because I want the list on my site's main page which is an osCommerce page. On my site I have a box in the left hand column that shows the title of the 5 most recent forum topics that have been started or added to. The entries are hot links to the topics themselves. You can see the effect by visiting the site using the link below.
This is slightly more difficult to do than having it on the phpBB main page. I have a script that I run via a cron job that periodically queries the phpBB database to extract the information about the most recent topics, which information it writes to a text file. Then, the box code on osCommerce reads the text file and produces the content for the box.
convertabus
08-28-2006, 09:23 PM
I might give it a try. The funny thing is that even the PHPBB site is not using it. I will see if I can find one in action before biting off too much. Thanks for the link.
Maggilove
08-28-2006, 11:46 PM
I have the Daily Topics mod installed on this (http://www.fadbeens.co.uk/phpBB2/index.php) forum. That lists all topics active in the last 24 hours.
dkinzer
08-29-2006, 09:06 AM
I will see if I can find one in action before biting off too much.
The site http://www.miricommunity.net/ appears to have it installed. From the postings in the original mod thread it looks like they might have modified it a bit to suit their needs.
Mazzic
08-29-2006, 11:46 AM
Might look around here... http://www.phpbbhacks.com/
mods of all kinds. Keep in mind the downside of installing mods, is that your altering the phpBB "original" code. So when an update to phpBB comes out, if you install it, you basically remove your mods. Then you either wait for the mods to be updated or try to make it work yourself.
BartG
08-29-2006, 01:04 PM
Take a look at http://moredialogue.com. I wrote a php script to select the top 5 posts and display them on this home page. Adding AJAX, I was able to add a function that lets you mouseover the topics on the left, and see a preview of the post on the right.
I also extract my own posts on phpBB into a blog format:
http://www.moredialogue.com/php_uploads/myPHPBlog/blogIndex.php
If you need the code, let me know. I haven't added it to the mod repository. It's simple to install, just add the folder to your site, add CSS pieces, and put the html code in via include.php... and that's it. its simpler then mods, and it wont be overwritten by updates, as Mazzic pointed out.
Bart
convertabus
08-29-2006, 08:36 PM
Take a look at http://moredialogue.com. I wrote a php script to select the top 5 posts and display them on this home page. Adding AJAX, I was able to add a function that lets you mouseover the topics on the left, and see a preview of the post on the right.
I also extract my own posts on phpBB into a blog format:
http://www.moredialogue.com/php_uploads/myPHPBlog/blogIndex.php
If you need the code, let me know. I haven't added it to the mod repository. It's simple to install, just add the folder to your site, add CSS pieces, and put the html code in via include.php... and that's it. its simpler then mods, and it wont be overwritten by updates, as Mazzic pointed out.
Bart
First, thanks everyone.
Second, I was sort of thinking of only a listing of the recent posts (that is, only the topic title).
Now, it seems like Bart's sort of comes the closest to what I was thinking. But still takes a little more room, so I would have to rethink my index page design.
About your extract into a blog; pretty cool. Brings to mind a need to extract all of one's posts from various sites and consolidate into one (or others). Does that make sense? For example, I have several sites where I am posting, but would like to have those posts also appear on other sites I have (or is that something that can be done via RSS?).
dkinzer
08-29-2006, 10:17 PM
... I was sort of thinking of only a listing of the recent posts (that is, only the topic title).
As part of my mod, I wrote a PHP function
function latest_topics($count = 0, $user_id = 0)
{
...
}
This function returns a list of "latest topics" limited by the $count parameter value. Each entry on the list contains the topic title, a URL to the topic and the topic ID. Once you have that list, you can do whatever you want with it with respect to formatting the content, etc.
If you like the code, let me know and I'll send it to you.
Objective
09-01-2006, 08:31 AM
Not that there is any shortage of ideas here, but one more for you is to consider EZPortal (http://smartor.is-root.com/viewtopic.php?t=1860) mod by Smartor which just adds a page in front of the forum which you can then customize. Ours has been souped up a bit but it looks like this MSCFORUM (http://www.mscforum.com/portal.php) if you like it, google ezportal and you'll find the mod no problem.
1darkangel
09-01-2006, 11:25 AM
I assume you are looking for something to list the last 5, 10 or however many topics posted in, on your index page correct? There are a few different mods out there that do that. I happen to be running one that scrolls through the last so many posts made instead of being a static list and I really like it. I will try and get you the link of it and some others that I have came accross.
As for phpBB's own forum not using the one you looked at, there is a reason. Their forum is pretty void of most any type of mod period. What you see there is basically what you get right off the bat.
convertabus
09-01-2006, 07:53 PM
As part of my mod, I wrote a PHP function
function latest_topics($count = 0, $user_id = 0)
{
...
}
This function returns a list of "latest topics" limited by the $count parameter value. Each entry on the list contains the topic title, a URL to the topic and the topic ID. Once you have that list, you can do whatever you want with it with respect to formatting the content, etc.
If you like the code, let me know and I'll send it to you.
Sure. Please do (to panterrasbox @ gmail . com). (do I just insert it somewhere in the index template file where I like its position?).
Thank you.
convertabus
09-01-2006, 07:56 PM
The site http://www.miricommunity.net/ appears to have it installed. From the postings in the original mod thread it looks like they might have modified it a bit to suit their needs.
Looks pretty cool. Do you know if the code readily available?
convertabus
09-01-2006, 07:58 PM
[QUOTE=1darkangel]I assume you are looking for something to list the last 5, 10 or however many topics posted in, on your index page correct? QUOTE]
Yes sounds good.
convertabus
09-01-2006, 08:00 PM
Thank you everyone. I will make it a point to sit down and experiment this weekend with whatever anyone can send me. Thank you so much, I appreciate it! :)
1darkangel
09-03-2006, 05:31 PM
Okay I found the link of the one I use. It is in the phpBB database. Just go here (http://www.phpbb.com/phpBB/viewtopic.php?t=145150&highlight=latest+topic+index)
convertabus
09-03-2006, 08:49 PM
Okay I found the link of the one I use. It is in the phpBB database. Just go here (http://www.phpbb.com/phpBB/viewtopic.php?t=145150&highlight=latest+topic+index)
OK. From a quick look at the description in that thread, looks like I'll need to make edits to the index and the index template pages. Does that sound correct? Also, what do I do with the zip download file; where do the contents go?
Thanks,
Notaprogrammer
1darkangel
09-04-2006, 12:52 PM
You will need to download the zip into your own computer, open it up and read through it. The instructions are in that zip. All you need to know will be in there. Yes you will have to make changes to the index and index tpl files at the very least. I don't recall off the top of my head what all file that one needs edited. I have installed way to many mods to keep track of. But as I said it will let you know in that zip what all is going on.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.