Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: hubfub on February 03, 2007, 01:44:00 AM

Title: Board Name in MessageIndex.template.php
Post by: hubfub on February 03, 2007, 01:44:00 AM
SMF Version: SMF 1.1.1
Hi guys,

Im a bit a newbie at php so this is kinda a stupid question

in MessageIndex.template.php how do I get it to display the name of the board

$context['current_board'] displays the board ID but i need to display the actual name .. how do i do this?

thanks  :)
Title: Re: Board Name in MessageIndex.template.php
Post by: KGIII on February 03, 2007, 02:49:42 AM
Where did you want it to display this?
Title: Re: Board Name in MessageIndex.template.php
Post by: hubfub on February 03, 2007, 03:02:20 AM
I would like to display on page of the board that lists all the topics so within MessageIndex.template.php  is there another variable which i can just use similar to $context['current_board']  which will just display the board name on the page which lists all the topics of the board?
Title: Re: Board Name in MessageIndex.template.php
Post by: KGIII on February 03, 2007, 03:28:46 AM
I am still not sure I am understanding what it is you are trying to ask. You can likely get a list of all the topics using something like SSI.php. Open your forum up, change the index.php to ssi_examples.php in your address bar and hit enter.

I think you are asking about $context['current_topic'] or $context['topic_first_message'] perhaps?
Title: Re: Board Name in MessageIndex.template.php
Post by: hubfub on February 03, 2007, 04:38:03 AM
HI KGIII,

thanks for you patience and sorry about the confusion.

if you refer to the attached screenshot of the SMF forums.. this particular page is the message index of "General English Support"

I was wondering if I could display on this very page like say a bit after the child boards table the words General English Support (ie the name of the board) and what I would have to modify to  MessageIndex.template.php to do so

Thanks  :)
Title: Re: Board Name in MessageIndex.template.php
Post by: KGIII on February 03, 2007, 05:33:28 AM
I think I understand what you want. Do you want it below the LIST of child boards or where it SAYS child boards? In other words, in your example, do you want it directly above OR below the "Performance and Server Configuration?"

(I still don't know the answer no matter what your response is. I am looking and I am not sure if it is $board or ['ID_BOARD'] - for starters - but it is probably $board_info['name'] I suppose.)

In short, what you are asking, seems to be a rather problematic pain in the butt.
Title: Re: Board Name in MessageIndex.template.php
Post by: hubfub on February 03, 2007, 05:42:05 AM
yes! u know what im looking for .. i want it below "Performance and Server Configuration?"

but the values u gave me didnt work :( .. is there a way to find out?  
Title: Re: Board Name in MessageIndex.template.php
Post by: KGIII on February 03, 2007, 05:45:29 AM
I have pinged the people who are more adept than I already. Maybe they will see something that I am missing. There are still many parts of SMF that are new to me but your question wasn't really clear so, even if I couldn't answer, I could ask for more information so that it was easier for someone more adept than I.
Title: Re: Board Name in MessageIndex.template.php
Post by: hubfub on February 03, 2007, 08:48:29 AM
thanks =)
Title: Re: Board Name in MessageIndex.template.php
Post by: niko on February 03, 2007, 08:51:32 AM
You can either add $board_info to globals or you can use $context['name']
Title: Re: Board Name in MessageIndex.template.php
Post by: hubfub on February 03, 2007, 09:08:52 AM
thanks so much! thats worked!
Title: Re: Board Name in MessageIndex.template.php
Post by: KGIII on February 03, 2007, 12:43:01 PM
Nice, thanks Niko.