News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Flashchat and RC3

Started by adbrad, December 01, 2009, 07:58:50 PM

Previous topic - Next topic

adbrad

Hi all
I'm testing out RC2 and i intergrated flashchat v5 with the forum.

I added a chat button by adding:
'chat' => array(
            'title' => Chat,
            'href' => $GLOBALS['boardurl'].'/chat/flashchat.php',
            'show' => true,
            'sub_buttons' => array(


To subs.php is there any thing i can add, to make the chat open up in a new window/tab.

Thanks in advance

Arantor

Um, you seem to be missing a couple of lines there, actually.

Try:
'chat' => array(
'title' => Chat,
'href' => $GLOBALS['boardurl'].'/chat/flashchat.php',
'show' => true,
'target' => '_blank',
'sub_buttons' => array(
),
),

adbrad

thanks arantor, that did the trick. is there anyway to get it to appear as an option on the drop down menu cheers

Arantor

Actually not with that code, that'll give you an error in the log because I didn't look fully at it.

'chat' => array(
'title' => 'Chat',
'href' => $boardurl . '/chat/flashchat.php',
'show' => true,
'target' => '_blank',
'sub_buttons' => array(
),
),


title needs to be a string rather than not in quotes at all. You also shouldn't need to reference $GLOBALS - $boardurl should be in scope at that point.

adbrad

Quote from: Arantor on December 02, 2009, 04:28:47 AM
Actually not with that code, that'll give you an error in the log because I didn't look fully at it.

'chat' => array(
'title' => 'Chat',
'href' => $boardurl . '/chat/flashchat.php',
'show' => true,
'target' => '_blank',
'sub_buttons' => array(
),
),


title needs to be a string rather than not in quotes at all. You also shouldn't need to reference $GLOBALS - $boardurl should be in scope at that point.

Thanks again Arantor i corected the codes and stopped giving a error in the log
how ever with out the $globals it throws an error saying url not found.

Arantor

Odd, I was sure $boardurl was in scope at that point but apparently not. In which case yes you would have to use $GLOBALS.

adbrad

#6
thanks again Arantor it all seems to be working now. I also have duplicated the code under sub buttons and now users will have a choice as to wether they wanna open in new window or not.
will mark as solved.
thanks again.

nunk

so the code is

   'chat' => array(
      'title' => Chat,      
                                'href' => $GLOBALS['boardurl'].'/chat/flashchat.php',      'show' => true,      
                                'target' => '_blank',      
                                'sub_buttons' => array(      
                                ),
   ),

adbrad

Quote from: nunk on December 05, 2009, 02:12:19 AM
so the code is

   'chat' => array(
      'title' => Chat,      
                                'href' => $GLOBALS['boardurl'].'/chat/flashchat.php',      'show' => true,      
                                'target' => '_blank',      
                                'sub_buttons' => array(      
                                ),
   ),
nope the secon line should be:
'title' => 'Chat',
otherwise you will get an error in error log
cheers

nunk

ok so its

'chat' => array(
        'title' => 'Chat',   
        'href' => $GLOBALS['boardurl'].'/chat/flashchat.php', 
        'show' => true,     
         'target' => '_blank',     
         'sub_buttons' => array(     
                                ),
   ),


where it says boardurl do i insert my site or leave the boardurl

Arantor

As above, leave that as-is.

nunk

and what do i add this under
as far as line and location?

Arantor

You find the code in Subs.php that looks very similar to that, that includes 'home' =>, and add it in after the entry you want to put the button after.

I can't give you a line number unless you're using a completely untouched RC2.

nunk

Quote from: Arantor on December 05, 2009, 03:39:02 PM
You find the code in Subs.php that looks very similar to that, that includes 'home' =>, and add it in after the entry you want to put the button after.

I can't give you a line number unless you're using a completely untouched RC2.

it is completly untouched

uploaded straight from smf files

Arantor

I still don't know where exactly you want it, or which button you want it after, so I'll just list all of them.

Before 'Home': add starting on line 3817
Before 'Help': add starting on line 3826
Before 'Search': add starting on line 3833
Before 'Admin': add starting on line 3840
Before 'Moderate': add starting on line 3867
Before 'Profile': add starting on line 3894
Before 'My Messages': add starting on line 3916
Before 'Calendar': add starting on line 3933
Before 'Members': add starting on line 3950
Before 'Login': add starting on line 3967
Before 'Register': add starting on line 3974
Before 'Logout': add starting on line 3982

nunk

i cant find the sub.php folder  :o

Arantor

It's not a folder, it's a file. Sources/Subs.php.

adbrad

Ok could some one please tell me what files to edit and what code to use so the users in chat show up on the info centre on board index.

much appreciated.

adbrad

any one help with the above is there much coding difference between rc1.2 and rc2

Arantor

Under the hood, not especially. In the templates, a huge amount.

Advertisement: