Jump to content

Recommended Posts

Posted (edited)

Need help with this, if it is at all possible,

I'm wanting to add a snippet (no more than 3 lines) of the text that appears in a topic into the topic list: See below for example:

This is a section of the topic list in a forum:

image.thumb.png.9a811696a75055cffe875fbc045187c8.png

 

Below is what is inside the topic:

image.thumb.png.9ab030b4458e31071025cec59d1f2fef.png

The orange arrow is pointing to the text I want to include in the topic list, but no more than 3 lines regardless of how much text is in the topic. Mock-up is below:

topic1.thumb.png.9d3736e54858c575f8685ed3efc78735.png

This is going to be a template edit, but what do I put into which template to get this effect, if indeed it is at all possible?

With thanks

Edited by Davyc
Posted
4 hours ago, Davyc said:

This is going to be a template edit,

Pretty sure it's not going to be that simple - what you are asking is for the "Content" of the first post, which is not included in the SQL query which results in the data available for the topic listing. "Content" becomes available when the topic is read.

Why? Well, why return the "Content" of the topic when it's not needed? Think about the potential size of that data set if the "Content" was a 10,000 word essay.

I reckon you're going to need a plugin which does the following:

1) Parses the "Content", strips HTML, truncates it to X number of characters
2) Adds that to the data set returned to the template
3) Modifies the template to display the parsed content

Posted
37 minutes ago, Nathan Explosion said:

Pretty sure it's not going to be that simple

 

I figured that lol.  I had a look at the templates, and it was something beyond my reckoning. Seems like a lot of work just to add a few lines of text, but if it can be done I'm happy to pay someone as long as it isn't a huge sum as I have a very limited budget 🙂

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...