![]() |
How difficult would it be .. (First Post on Threadbit)
How difficult would it be to pull the first post of a thread (with bbcode formating) and put it on forumdisplay (threadbit template to be exact). I'm looking to duplicate it for my news page, and $threadpreview works for a really cheapo way of doing it - but I would like to do it in a much better way .. any ideas? It'd be a huge help.
If anyone is actually interested, and wants more info .. this is the page (http://www.absolutepunk.net/newsdisp...p?f=165&page=1) and as you can see it's duplicating my main page's news (www.absolutepunk.net) - and I am going to use this version (the newsdisplay.php) as a news archive with ajax buttons at the bottom to scroll through news posts. |
I have made a simple index.php page (vbulletins index.php -> forumhome.php) which achieves basically what you want.
http://www.ozfortress.com/ - pulled from a single forums you specify, it is run through the postbit class, and treated just like a post (which you could then run some kind of string limiting / cutting function over it) and inserts it into a custom postbit template (newsbit iirc). Are you interested? |
That does look like what I need .. I am.
|
The script doesnt currently support pagination (ive never needed it) and is limited to a fixed number of items.
index.php should look something like: PHP Code:
You should change the forumid in the query and fetch_foruminfo() functions to one that matches your forum for news. You will also need to add a hook into postbit_factory with the contents: PHP Code:
Maybe I should tidy it up more and release it, but eh ;) |
I've been looking through the code .. not sure if I can use it to do what I want.
I just parsed bbcode for $threadpreview in functions_forumdisplay.php and it worked exactly how I wanted. |
If it worked then it doesnt matter does it ;)
|
All times are GMT. The time now is 10:40 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|