TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 790
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

FlashChat User

Started by Sakuragi, November 01, 2005, 07:24:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gerrymo


technodragon73

Great IchBin!  That code was nearly perfect...here is what i ended up doing to allow for the image at the top menu bar:

echo'
<a href="http://www.technodragon.net/forum/chat/flashchat.php" onclick="window.open(this.href, &quot;popupwindow&quot;, &quot;width=500,height=500,scrollbars,resizable&quot;); return false;">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']. '/chat_icon.gif" alt="FlashChat" style="margin: 2px 0;" border="0" />' : "FlashChat"),'</a>';

technodragon73

Every them I use now has the chat successfully popup from the forum.  Great work everyone! Although the Oxygen theme was rather difficult to get it to work properly...I almost have it right (the theme works, but the buttons at the top for some reason push the logout button to the secon row instead of keeping it on the same line).

IchBin

If you post the whole function template_menu() section I'll gladlly take a look and see if anything is wrong.

technodragon73

Here you go:
function template_menu()
{
        global $context, $settings, $options, $scripturl, $txt;


        $mycode='onmouseover="this.style.backgroundPosition=\'0 0px\'" onmouseout="this.style.backgroundPosition=\'0 -24px\'"';
        echo '
                <div id="myshrink"><div style=" position: relative;  float: left;">';

// TinyPortal

         if($context['TPortal']['showtop'])
             echo '<a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 1ex;" /> ';
         if($context['TPortal']['leftbar'])
             echo '<a href="#" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
         if($context['TPortal']['rightbar'])
             echo '<a href="#" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
// TinyPortal end

         echo '</div><div id="bbhome"  '.$mycode.'><a href="', $scripturl, '"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt[103] . '" style="margin: 0px; width: 47px; height: 24px;" border="0" /></a></div>
         <div id="bbforum"  '.$mycode.'><a href="', $scripturl, '?action=forum"><img src="' . $settings['images_url'] . '/blank.gif" alt="forum" style="margin: 0px; width: 52px; height: 24px;" border="0" /></a></div>
                                <div id="bbhelp"  '.$mycode.'><a href="', $scripturl, '?action=help" target="_blank"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt[119] . '" style="margin: 0px; width: 36px; height: 24px;" border="0" /></a></div>';

        // How about the [search] button?
        if ($context['allow_search'])
                echo '
                                <div id="bbsearch"  '.$mycode.'><a href="', $scripturl, '?action=search"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt[182] . '" style="margin: 0px; width: 56px; height: 24px;" border="0" /></a></div>';

        // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin']){
                echo '
                                <div id="bbadmin"  '.$mycode.'><a href="', $scripturl, '?action=admin"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt[2] . '" style="margin: 0px; width: 52px; height: 24px;" border="0" /></a></div>
                                <div id="bbtpadmin"  '.$mycode.'><a href="', $scripturl, '?action=tpadmin"><img src="' . $settings['images_url'] . '/blank.gif" alt="tpadmin" style="margin: 0px; width: 65px; height: 24px;" border="0" /></a></div>';
        }
        // Edit Profile... [profile]
        if ($context['allow_edit_profile'])
                echo '
                                <div id="bbprofile"  '.$mycode.'><a href="', $scripturl, '?action=profile"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt[79] . '" style="margin: 0px; width: 56px; height: 24px;" border="0" /></a></div>';

        // The [calendar]!
        if ($context['allow_calendar'])
                echo '
                                <div id="bbcalendar"  '.$mycode.'><a href="', $scripturl, '?action=calendar"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt['calendar24'] . '" style="margin: 0px; width: 74px; height: 24px;" border="0" /></a></div>';

        // If the user is a guest, show [login] and [register] buttons.
        if ($context['user']['is_guest'])
        {
                echo '
                                <div id="bblogin"  '.$mycode.'><a href="', $scripturl, '?action=login"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt[34] . '" style="margin: 0px; width: 48px; height: 24px;" border="0" /></a></div>
                                <div id="bbregister"  '.$mycode.'><a href="', $scripturl, '?action=register"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt[97] . '" style="margin: 0px; width: 62px; height: 24px;" border="0" /></a></div>';
        }
        // Otherwise, they might want to [logout]...
        else
echo '
<div id="bbchat"  '.$mycode.'><a href="http://www.technodragon.net/forum/chat/flashchat.php" onclick="window.open(this.href, &quot;popupwindow&quot;, &quot;width=500,height=500,scrollbars,resizable&quot;); return false;">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url']. '/chat_icon.gif" alt="Chat" style="margin: 0px; width: 52px; height: 24px;" border="0" />' : "FlashChat"),'</a></div>';
                echo '
                                <div id="bblogout"  '.$mycode.'><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><img src="' . $settings['images_url'] . '/blank.gif" alt="' . $txt[108] . '" style="margin: 0px; width: 60px; height: 24px;" border="0" /></a></div>';
}

IchBin

You still need to add the id's to the style.css file. Scroll to the bottom of that file and you'll see what I mean. :)

technodragon73

coolness...well I was wondering what file thos codes were in Thanks IchBin

technodragon73

That fixed it!  Finally, all of my themes now have the chat working and the window pops up...thank you everyone especially IchBin!

RoarinRow

Quote from: gerrymo on November 02, 2005, 12:41:29 PM
This is the Code Bloc gave me to show the members using flashchat in a Block (php).


global $boardurl;
echo '
<iframe frameborder="0" height="100" src="', $boardurl, '/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>';


Do you notice any slowness of the page refreshing when you have the chat stats enabled?  I notice a slight delay at times and others a longer delay where the chat stats box turns white on the inside of the box.

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

camflan

Quote from: RoarinRow on February 03, 2006, 04:16:51 AM
Quote from: gerrymo on November 02, 2005, 12:41:29 PM
This is the Code Bloc gave me to show the members using flashchat in a Block (php).


global $boardurl;
echo '
<iframe frameborder="0" height="100" src="', $boardurl, '/chat/info_embedded.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe>';


Do you notice any slowness of the page refreshing when you have the chat stats enabled?  I notice a slight delay at times and others a longer delay where the chat stats box turns white on the inside of the box.


I am experiencing an issue where this block doesn't render in IE.  the frame and the collapse button are there, but there is no text displayed w/in it.  anyone know why, or maybe some kind of idea?

This website is proudly hosted on Crocweb Cloud Website Hosting.