Avatar

Notify a new post on another site page (Technics)

by Alfie ⌂, Vienna, Austria, Tuesday, April 28, 2015, 16:07 (3286 days ago) @ Jean-Michel2

Hi Jean-Michel,

2) by getting the info from the MLF database. But then, access must be granted to a third party.

Why? Given what you stated in your post I assume that you run the site (say example.org) and the forum either in a subdirectory (example.org/forum) or subdomain (forum.example.org). Where does a third party come into play here?

Examples from my site:

  • Example 1
    In the left column of the main site a list of the last fifteen top-level posts (id == tid) of the forum – which is located in a subdomain.
  • Example 2
    In the subdomain a list of the latest twenty posts. List items are styled in such a way that one can distinguish between top-level posts and replies. This is the page people generally bookmark if they don’t use the RSS-feed.

In your case query the DB limiting to one (the latest) result within the last two days. Suggestion: In the main-page write sumfink like <?php include('foo.inc.php'); ?>. Within foo.inc.php query the database and style the result accordingly: "New!" with "visibility:hidden;" if there is nothing new or with "visibility:visible;" otherwise. More elegantly, if you have respective classes in a CSS.

3) by retrieving a certain predefined flag on the forum home page. This does probably not exist today.

Yep.

What is the easiest way to get this info ?

Maybe I’m biased but I would opt for 2).

--
Cheers,
Alfie (Helmut Schütz)
BEBA-Forum (v1.8β)


Complete thread:

 RSS Feed of thread