Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2053

phpBB Custom Coding • Re: Board index: set a.subforum url to unread posts in board

$
0
0
MWAHAHAHA! Devious bastardry FTW. :mrgreen:

Not knowing anything at all about Twig, I did some digging. Naturally, none of the answers or docs I could find told me exactly what I wanted to know, but by trying a few guesses and white pages of death I came up with a viable method. It brought back not-so-fond-at-the-time memories of learning PHP by parse error many years ago. :lol:

Code:

{% set foo = forumrow.subforum.U_SUBFORUM | trim('./viewforum.php?f=') %}<a{% if forumrow.subforum.S_UNREAD %} href="{{ U_SEARCH_UNREAD }}&fid[]={{ foo }}"{% elseif forumrow.subforum.IS_LINK %} href="{{ forumrow.subforum.U_SUBFORUM }}"{% endif %}...
If there's no other way of getting that pesky subforum ID, this will do it. OTOH, if anyone has a cleaner way of doing it I'm all ears.

Statistics: Posted by Gumboots — Tue Aug 20, 2024 2:11 am



Viewing all articles
Browse latest Browse all 2053

Trending Articles