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?
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?
Regards Anders
I wish i could code
My specialities Copy Paste with instruction
swedish dating version dolphin 6.1.5
I have some ideas... I'll post later.
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
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.
That's the third variant.
In your deign.inc.php function loadShoutbox() should be like this.
EnjoyPHP 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);
}
Last edited by GMD; 07-07-2007 at 10:38 PM.
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.
Regards Anders
I wish i could code
My specialities Copy Paste with instruction
swedish dating version dolphin 6.1.5
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:
Also change call to this function in your script)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;
}
Enjoy
Oh... I forgot. This function shold be in design.inc.php
Your code should be like thisPHP 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_smiles( process_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.
GMD you are star. as you help me with this but i ma confusedas 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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks