HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


main_forum_topics.php

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#105139 (In Topic #20496)
Avatar

Fan in action

Adding the body of the topic to main_forum_topics.php

Hi all. I wrote several cool mods for OCP a long time ago, and I'm revisiting OCP for a project. So I wanted to take the generic topic block main_forum_topics  (main_forum_topics.php) and give it the capability to print all or part of the actual body of the topic post. I believe this will be done in main_forum_topics.php, but I am looking for the php file that actually prints the actual body of the post. So, right now, the default is:

(some topic title here)
By Someone_user . 1 post
Last post: 1:23 PM

But I want it to print:

(some topic title here)
lorem ipsum, quia dolor sit amet consectetur adipisci[ng] velit, sed quia non numquam [do] eius modi tempora inci[di]dunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?
By Someone_user . 1 post
Last post: 1:23 PM

Anyone have some ideas about the location of the php file that prints the body of the post, so that I can modify main_forum_topics.php ?


Back to the top
 
Posted
Rating:
#105174
Avatar

Community saint

The main_forum_news.php file has similar code to main_forum_topics.php. Main_forum_news.php grabs the first post from a news topic. Borrowing and editing a few bits of code from main_forum_news.php and adding them to main_forum_topics.php along with a some additional minor edits to the main_forum_topics.php code and one of the related templates should get you the layout you want.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: