Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: shoutbox open in new wimdow not working.

  1. #1
    birkenstam's Avatar
    Join Date
    Mar 2006
    Posts
    205

    Default shoutbox open in new wimdow not working.

    Hi i am trying to make my my shoutbox to open in a new window but can t makle it work. i have tried with _parent and _blank but noting working. Check the code i have attached. does anyone know what the problem can be?
    Attached Files Attached Files
    Regards Anders
    I wish i could code
    My specialities Copy Paste with instruction
    swedish dating version dolphin 6.1.5

  2. #2
    GMD
    GMD is offline

    Join Date
    Sep 2006
    Posts
    85

    Default

    I have some ideas... I'll post later.

  3. #3
    birkenstam's Avatar
    Join Date
    Mar 2006
    Posts
    205

    Default

    Thanks GMD i appreciate it a lot. i cant wait
    Regards Anders
    I wish i could code
    My specialities Copy Paste with instruction
    swedish dating version dolphin 6.1.5

  4. #4
    GMD
    GMD is offline

    Join Date
    Sep 2006
    Posts
    85

    Default

    two variants:
    1) at main page user can see only link to the shoutbox
    2) user can see whole shoutbox with link instead of posting section

    The original shoutbox will appear as popup.

  5. #5
    GMD
    GMD is offline

    Join Date
    Sep 2006
    Posts
    85

    Default

    That's the third variant.
    In your deign.inc.php function loadShoutbox() should be like this.
    PHP Code:
    function loadShoutbox()
    {

        global 
    $site;
        global 
    $oTemplConfig;

        
    $linkDivider " | ";

        
    $reloadtime 60000;
        
    $s_win $_COOKIE['s_win'] ? $_COOKIE['s_win']  : 'inline';


    $out '
     <script type="text/javascript">
    <!--
     function popupshoutbox()
    {
        var win = "width=300,height=400,left=200,top=100,copyhistory=no,directories=no,menubar=no,location=no,resizable=no,scrollbars=yes";
        window.open("'
    .$site['url'].'shoutbox.php",\'ShoutBox\',win);

    }

    //-->
    <!--

        function sShowHide()
        {
            var s_win = document.getElementById(\'shout\');

            if (s_win.style.display == \'none\')
            {
                document.cookie = "s_win=inline;";
                s_win.style.display = \'inline\';
            }
            else
            {
                document.cookie = "s_win=none;";
                s_win.style.display = \'none\';
            }
        }

    //-->
    </script>

        <table border="0" cellpadding="0" cellspacing="0" align="center">
            <tr>
                <td align="center" width="' 
    $oTemplConfig -> framewidth '" height="20" style="text-align:center;">
    <a href="javascript:void(0);" onClick="popupshoutbox();">'
    _t("_PopUp") . '</a>'.$linkDivider.'
            <a href="javascript:void(0);" onClick="sShowHide();">'
    _t("_Show/Hide") . '</a>
                </td>
            </tr>'
    ;
    $out .= '<tr><td>
    <div id="shout" style="display: '
    .$s_win.'">
    <iframe id="loadshoutbox" name="loadshoutbox" src="'
    .$site['url'].'shoutbox.php" marginwidth="0" marginheight="0" width="' $oTemplConfig -> framewidth.'" height="' $oTemplConfig -> frameheight '" frameborder="0" scrolling="yes">
    <font color="#FFFFFF"><a href="'
    .$site['url'].'shoutbox.php">View the shoutbox</a></font>
    </iframe>
    </div>
    </td></tr>
    </table>'
    ;


        return 
    DesignBoxContent _t("_shout_box_title"), $out,  $oTemplConfig -> loadShoutbox_db_num);


    Enjoy
    Last edited by GMD; 07-07-2007 at 10:38 PM.

  6. #6
    birkenstam's Avatar
    Join Date
    Mar 2006
    Posts
    205

    Default

    Hello GMD,

    i appreciate the time you have taken for me. i copy all your code in to my code and i realise at i have not explained my problem right.

    is the pictures in the shoutbox when you click on them is open inside the frame.

    if you have time look at the shoutbox.php code i have attached.
    Attached Files Attached Files
    Regards Anders
    I wish i could code
    My specialities Copy Paste with instruction
    swedish dating version dolphin 6.1.5

  7. #7
    GMD
    GMD is offline

    Join Date
    Sep 2006
    Posts
    85

    Default

    Quote Originally Posted by birkenstam View Post
    is the pictures in the shoutbox when you click on them is open inside the frame.
    Which pictures?

  8. #8
    GMD
    GMD is offline

    Join Date
    Sep 2006
    Posts
    85

    Default

    Ok... This problem appears when you use get_member_thumbnail function.
    Look it trough... There's inserted profile link.
    So I think you should make another thumnail function, where's no profile link.
    Like this:
    PHP Code:
    function get_member_thumbnail2$ID$float )
    {
        require_once( 
    BX_DIRECTORY_PATH_ROOT 'profilePhotos.php' );
        
    $oPhoto = new ProfilePhotos$ID );
        
    $oPhoto -> getActiveMediaArray();
        
    $aFile $oPhoto -> getPrimaryPhotoArray();

        if( 
    extFileExists$oPhoto -> sMediaDir 'thumb_' $aFile['med_file'] ) )
        {
            
    $sFileName $oPhoto -> sMediaUrl 'thumb_' $aFile['med_file'];
        }
        else
        {
            
    $sFileName getTemplateIcon'no_photo.gif' );
        }

        
    $style 
            
    'width:' $oPhoto -> aMediaConfig['size']['thumbWidth'] . 'px;' .
            
    'height:' $oPhoto -> aMediaConfig['size']['thumbHeight'] . 'px;' .
            
    'background-image:url(' $sFileName ');';

        
    $ret '';
        
    $ret .= '<div class="thumbnail_block" style="float:' $float '; ">';
                        
    $ret .= '<img src="' getTemplateIcon'spacer.gif' ) . '" style="' $style '" alt="' process_line_output$aFileName['med_title'] ) . '" />';
            
    $ret .= '</div>';

        return 
    $ret;

    Also change call to this function in your script)
    Enjoy

  9. #9
    GMD
    GMD is offline

    Join Date
    Sep 2006
    Posts
    85

    Default

    Oh... I forgot. This function shold be in design.inc.php
    Your code should be like this
    PHP Code:
    $sPic str_replace('110px','60px',get_member_thumbnail2($shout_arr['id'],'left'));
            
    $sPic str_replace('member.php"','member.php" target="_blank"',$sPic);

    $shout_text process_smilesprocess_line_output$shout_arr['text'], $oTemplConfig -> maxwordlength) );
     
    $content .= "
                            <tr><td title=\"{$shout_arr['date']}\" class=\"{$shout_arr['class']}\">
                                 <a target=\"_blank\" href=\"{$site['url']}profile.php?ID={$shout_arr['id']}\" class=\"membermenu\">$sPic {$shout_arr['NickName']}</a>: {$shout_text}
                            </td></tr>"

    Last edited by GMD; 07-08-2007 at 05:22 PM.

  10. #10
    birkenstam's Avatar
    Join Date
    Mar 2006
    Posts
    205

    Default

    GMD you are star. as you help me with this but i ma confused as dont know so much about coding. the get_member_thumbnail code you show me should that be in design.inc?

    i have no clue now
    Regards Anders
    I wish i could code
    My specialities Copy Paste with instruction
    swedish dating version dolphin 6.1.5

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dolphin 6.000.4 Ray and Shoutbox not working
    By Stuart in forum Ray Community Widget Suite
    Replies: 11
    Last Post: 03-04-2008, 01:04 AM
  2. Shoutbox Dolphin 6.000.4 not working
    By Stuart in forum Ray Community Widget Suite
    Replies: 1
    Last Post: 03-01-2008, 08:25 PM
  3. shoutbox how can i limit the amoont of members in the shoutbox
    By birkenstam in forum Chat / ShoutBox / Instant Messenger (non-Ray)
    Replies: 0
    Last Post: 12-11-2007, 07:03 AM
  4. no new window open but.....
    By Jack Kubel in forum General Troubleshooting
    Replies: 3
    Last Post: 07-22-2005, 01:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •