miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Re-cycled miniBB Support Forums / Re-cycled /  
 

Forum (Category) name (title) in latest discussions

 
Author Vishal
Partaker
#1 | Posted: 9 Jul 2005 15:08 
Is it possible to fetch the forum name also while querying for last discussions using the following modification? I mean I want the forum name also to be fetched to display in the alt/title text of forum icons in the last discussions for easy accessibility to my users.

Modification:

File bb_func_ldisc.php

line# 35

if($cols=db_simpleSelect(0, $Tt, 'topic_id, topic_title, topic_poster, topic_poster_name, topic_time, forum_id, posts_count, topic_last_post_id, topic_views, forum_name','','','',$orderBy,$viewlastdiscussions )){

and then specify:

$forum_name=$cols[9];

Author Team
8-)
#2 | Posted: 10 Jul 2005 18:44 
We'll implement forum title in latest discussions in the next release, but in a different manner. Thanks.

Author Team
8-)
#3 | Posted: 14 Jul 2005 18:14 
How it will be implemented.

In bb_func_vforum.php, find this line:

$fIcon[$forum]=$cols[3];

right AFTER it, add this:

$fTitle[$forum]=$cols[1];

After that, {$fTitle[$forum]} will be available in templates/main_last_discuss_cell.html

Author fohanlon
Guest
#4 | Posted: 11 Jun 2007 13:41 
Hi

Could someone tell me how I go about listing the forum the topic belongs to after the topic name in the latest discussions list when a user logs in.

So far I can get the forum listing beside the topic but in each row the forum is the same name (i.e the last forum in the forum list above the latest discussions list).

I suspect this is because it is the last value in the $forum variable.

Many thanks,

Fergal.

Author Paul
Lead Developer 
#5 | Posted: 12 Jun 2007 01:55 
Don't understand what you're trying to achieve, but probably the variable you need to paste in templates/main_lastdiscuss_cell.html is:

{$fTitle[$forum]}

i.e. the link to this forum will be

<a href="https://www.minibb.com/forums/{$indexphp}action=vtopic&amp;forum={$forum}">{$fTitle[$forum]}</a>

or the corresponding mod_rewrite URL if you use it.

Author fohanlon
Guest
#6 | Posted: 12 Jun 2007 08:13 
Paul

This is exactly what I needed.

Many thanks for your help.

Regards

Fergal.

Author Bluesplayer
Partaker
#7 | Posted: 6 Dec 2013 13:54 
I have used this ...

$fIcon[$forum]=$cols[3];

right AFTER it, add this:

$fTitle[$forum]=$cols[1];

and it has worked but not with regard to more discussions?

Author Jaime
Partaker
#8 | Posted: 6 Dec 2013 16:33 
Hi Bluesplayer,

if i put {$fTitle[$forum]} in my main_last_discuss_cell.html ... i see there by the posttitles added the relevant forumtitle. And i scroll further, now works main_last_discuss_more.htm, i see the foumstitle too. And thats not work by you? Or do i have something here understood wrong ..

Author Bluesplayer
Partaker
#9 | Posted: 6 Dec 2013 17:34 
Jaime:
if i put {$fTitle[$forum]} in my main_last_discuss_cell.html ... i see there by the posttitles added the relevant forumtitle. And i scroll further, now works main_last_discuss_more.htm, i see the foumstitle too. And thats not work by you? Or do i have something here understood wrong ..
Not working on my forum, though it is heavily customised.

Forum Latest Discussions

Forum Latest Discussions Page 2

Author Paul
Lead Developer 
#10 | Posted: 6 Dec 2013 17:40 
I'm not sure what are you doing and what is not working.

You are taking examples from the message which is 8 years old.
In miniBB, all that things are added by default time ago.
You don't have to modify core script, if you are about that.

Author Bluesplayer
Partaker
#11 | Posted: 6 Dec 2013 17:47 
Paul:
I'm not sure what are you doing and what is not working.

You are taking examples from the message which is 8 years old.
In miniBB, all that things are added by default time ago.
You don't have to modify core script, if you are about that.
Yes I have confused the issue a bit. I found the reference to the $fTitle[$forum]=$cols[1] in bb_func_vforum.php so I could see that was in place. I then used {$fTitle[$forum]} as mentioned in the main_last_discuss_cell.html which works as intended but only on the latest discussion page, once I click on page 2 (more file?) it no longer works on my forum.

Author Paul
Lead Developer 
#12 | Posted: 6 Dec 2013 18:42 
Got it.

You need to paste {$fTitle[$forum]} not just in Latest Discussions template (main_last_discuss_cell.html or main_modern_lcell.html depending on your front layout), but also in the topics template - main_topics_cell.html.
This template is used to display paginated forum sections.

Author Bluesplayer
Partaker
#13 | Posted: 6 Dec 2013 18:58 
Paul:
You need to paste {$fTitle[$forum]} not just in Latest Discussions template (main_last_discuss_cell.html or main_modern_lcell.html depending on your front layout), but also in the topics template - main_topics_cell.html.
This template is used to display paginated forum sections.
Yep. That did it.

Thanks

Re-cycled miniBB Support Forums / Re-cycled /
 Forum (Category) name (title) in latest discussions
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the File and Picture Attachments add-on: extend your miniBB-forums, attaching images and files.


  ⇑