Latest Posts by Topic ID on EhPortal Home Page

Started by Aaron10, June 04, 2022, 12:33:34 PM

Previous topic - Next topic

Aaron10

Hello, I'm using Ehportal currently and was wanting to make the home/portal page to display the latest posts from certain topics (ordered from top to bottom).

I'm not sure how to do this (SSI?) except to make a php/html block for display on the home/portal page. There is a similar feature in Ehportal Articles already but it only shows the first post of a topic.

In addition I'm wanting to PREG REPLACE certain parts of the posts (make images within the post to be links to the post).

Thank you

Doug Heffernan

Quote from: Aaron10 on June 04, 2022, 12:33:34 PMHello, I'm using Ehportal currently and was wanting to make the home/portal page to display the latest posts from certain topics (ordered from top to bottom).

I'm not sure how to do this (SSI?) except to make a php/html block for display on the home/portal page. There is a similar feature in Ehportal Articles already but it only shows the first post of a topic.

In addition I'm wanting to PREG REPLACE certain parts of the posts (make images within the post to be links to the post).

Thank you

You must post about this at that mod 's support topic. All mods and themes related questions should be posted on their respective support topics.

Aaron10

I did like a week ago lol

I figured posting here would get a response since Ehportal is just making a block, the php code within is doing the work.

EDIT: When I say "here" I mean on this forum since Ehportal doesnt have a support topic here, its on their website at web-develop.ca, but yeah no response.

Doug Heffernan

Quote from: Aaron10 on June 04, 2022, 01:56:51 PMI did like a week ago lol

I figured posting here would get a response since Ehportal is just making a block, the php code within is doing the work.

EDIT: When I say "here" I mean on this forum since Ehportal doesnt have a support topic here, its on their website at web-develop.ca, but yeah no response.

A bit off topic, but have you considered to use one of the other portal mods instead that are fully supported and have support topics here, such as TinyPortal or Light Portal?

Aaron10

I could but I kinda got everything (besides this) setup nicely at this point, Ehportal works fine and has a nice shoutbox too. I did try Light Portal on a test site but it still doesnt have this (from what I could tell), so I need some kind of php function to display recent posts within a php block no matter which portal mod I go with.

@rjen

Have you checked the blockcodes and examples on www.TinyPortal.net?

You may find a suitable php block code there.

Tbh Your exact requirement is not clear to me so cannot help without more details in what you want exactly
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Aaron10

Basically something similar to the recent posts page where it displays posts, however I want them on the portal page and from specific topics. Right now I have a block and am just copy/pasting the BBC of the posts that I want but its tedious to do.

There is a feature very similar to this within articles but it only shows a topics first post, instead of last post, so when a topic is posted in it will be on the front page but showing the topic first post which doesnt make sense.

So to summarize:

A specified list of topics, which when posted in, the last post will be shown on the portal/home page in descending order (the last 15 posts), separated by a horizonal rule BBC tag. In addition, a PREG_REPLACE for any img tags within the post to be surrounded by url tags automatically linking to the post as well.

Advertisement: