Loading...
 
Features / Usability

Features / Usability


LATEST FORUM MESSAGES LISTING

posts: 28 United States

This is a repost of a question buried in another thread in hopes that it gets a solution and as a separate topic can be easily found by others (a forum search shows it's been asked before in various ways but never answered - let's see if we can correct that... )
-------------------
Attached is a screenshot of the part my current forum page critical to this question .. what I would like to do is include in the display of the Last 20 Posts in this forum listings at a minimum, author, date/time, and a truncated display of message content.

At the least, can someone point me to the code file(s) that generate that listing, as a starting point?

-Dan

posts: 2428 Czech Republic

Hi Dan,
check this out: https://demo.luciash.eu/tiki20x/PluginList
You can put this in any wiki page:

Copy to clipboard
Latest forum posts: {LIST(gui="1" cache="y")} {filter type="forum post"} {OUTPUT( template="table")} {column field="title" label="Title"} {column field="creation_date" label="Created" sort="creation_date"} {column field="post_author" label="Author"} {column field="post_snippet" label="Post Snippet"} {OUTPUT} {pagination max="5"} {sort mode="creation_date_desc"} {LIST}

See the source code: https://demo.luciash.eu/tiki20x/tiki-pagehistory.php?page=PluginList&source=0

posts: 28 United States

Hi Luci -

Looks cool, but it appears that's dependent on the GUI, correct?
If so, alas, the GUI wasn't introduced until v. 19 or 20 as I recall, and I'm still working with v. 15.7, which means Tiki's response to that call would be a silent 'huh?" wouldn't it?
If upgrade is my only path to nirvana I'll bite the bullet, but I'd love to take a peek at the source files that generate the current list first, and evaluate the efficacy of a quick hack, if I can figure out what code is doing the dirty work there.
Unfortunately I'm a bit of an old dog learning new tricks and trying to sniff out a particular unfamiliar bone in a big pile of old unfamiliar bones - don't mind chewing on php code a bit if I can find the right code to chew.
So while this looks like one solution (which I thank you mightily for, and perhaps others so endowed with a Gui-supporting version will shed copious ratings point on you for it), I'll be patient and see if someone knows and takes pity on me and points out which file contains the 'magic code' (or if I stumble over it).

But for sure if there's no joy to be had that way I've got this solution to work with.. thanks muchly!

luciash d' being 🧙 wrote:

Hi Dan,
check this out: https://demo.luciash.eu/tiki20x/PluginList
You can put this in any wiki page:

Copy to clipboard
Latest forum posts: {LIST(gui="1" cache="y")} {filter type="forum post"} {OUTPUT( template="table")} {column field="title" label="Title"} {column field="creation_date" label="Created" sort="creation_date"} {column field="post_author" label="Author"} {column field="post_snippet" label="Post Snippet"} {OUTPUT} {pagination max="5"} {sort mode="creation_date_desc"} {LIST}

See the source code: https://demo.luciash.eu/tiki20x/tiki-pagehistory.php?page=PluginList&source=0

posts: 2428 Czech Republic

Hi Nelson,
it doesn't depend on the ListGUI (introduced in v17 iirc). The "GUI" is just a drag'n'drop helper introduced later to the PluginList to help users "compose" the wiki-plugin List's control blocks but you can just copy-paste the code and write the code in wiki-syntax and it should work just as fine in younger Tiki versions having the gui param there or not.

When you ask where to look to hack Tiki's code you can enable "Smarty Template usage indicator" (Preference name: log_tpl) and it will show you (after clearing your Tiki cache) when you inspect the rendered page source in which templates/ file you can modify it. Just search for "template" in your admin control panels preferences search field.

HTH,
luci

posts: 28 United States

AH! Thanks Luci! That gives me a few things to play with.

I'm gaining a sober realization of just how much I have yet to learn - but ignorance has never stopped me before.

-Dan

// All non-academic knowledge comes in suppository form. //