FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Using Forum Description in Thread Page
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Using Forum Description in Thread Page [message #187218] Fri, 04 November 2016 05:22 Go to next message
alopezie is currently offline  alopezie   Germany
Messages: 90
Registered: September 2003
Karma: 1
Member
add to buddy list
ignore all messages by this user
There is a forum description (listed in forum list). Variable is forum.descr (Variable 11 in thread.php)

I would like to show this description not only in the list of forums, but also in the thread page of the forum.

a) in the title tag of the thread-page
b) as a headline and description of the content of the particular forum in the thread-page


If I place the variable $frm->descr I alway get just the forum title (like $frm->name), but not the full description.

I see its collected in thread.php,and I also tried VAR: r[11], but this gives no result as well.

Any idea??






Alopezie.de - das Forum zum Thema Haarausfall
Aw: Using Forum Description in Thread Page [message #187219 is a reply to message #187218] Sun, 06 November 2016 16:08 Go to previous message
alopezie is currently offline  alopezie   Germany
Messages: 90
Registered: September 2003
Karma: 1
Member
add to buddy list
ignore all messages by this user
Okay, I solved it myself:

1) Add in src/thread_view_common.inc.t in the database call funktion "make_perms_query" (Line 42 in FUDFORUM 3.0.6)

", f.descr"

so roughly:

... SELECT f.id, f.name, f.descr, f.thread_count ...


2) Add a tag in the Thread-Page (I added in header.tmpl for all pages, so I had to add a check to just show it when there is a thread description:
{IF: !empty($frm->descr)}<div class="headtitle"><h1>{VAR: frm->name}</h1></div><div class="headdescr">{VAR: frm->descr}</div>{ENDIF} 

3) Add a tag in the TITLE section, my title is now

<title>{GVAR: FORUM_TITLE} {GVAR: TITLE_EXTRA} : {VAR: frm->descr}</title>


Alopezie.de - das Forum zum Thema Haarausfall
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: User Auth and Caching proxies
Next Topic: HELP: Is there a way to reset the thread order?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Oct 18 12:55:40 EDT 2017

Total time taken to generate the page: 0.00604 seconds