Please help! connection request popup window

15 years 7 months ago #72911 by Tomek1
Hi,

there is no css file on the right for element.style, the overdiv is a div which is used in the javascript overlib files.

And in the standard templates from joomla everything works perfect...

Thabnks for help

kind regards Tomek

Please Log in to join the conversation.

15 years 7 months ago #72920 by Tomek1
the other tooltip overlib javascript windows from the registration works perfectly, with good overdiv propertys.

But this connection request javascrict overlip doenst work properly.

Thanks for your help

Please Log in to join the conversation.

15 years 4 months ago #81198 by pure_cobalt
Replied by pure_cobalt on topic Re:Please help! connection request popup window
Bump--

I guess no progress has been made on this issue, but I wanted to confirm that I have a very similar problem. The pop up div (class overDiv) that appears when the add connection link is clicked has an appropriate "top" and "width" value but a large negative "left" value which makes the pop up appear half out of the window. At first I thought the problem could be within the overlib_mini.js (within components/com_comprofiler/js/) file, where it seems the div is being generated, but though I tried messing with the parameters in the createDivContainer function and the main overLib function, I was unable to make a change in the resulting popup (though I was able to break the functionality by making the createDivContainer function return nothing, so it's clear that they are being used for this functionality).

My guess is that something needs to be changed in the cb.menu.php (components/com_comprofiler/plugin/user/plug_cbmenu/) file around where it calls the javascript overlib function (after the "//
CONNECTIONS MENU
" comment, or line 1000ish):

[code:1]
if($ueConfig!=0) {
$connectionurl="javascript:void(0)\" onclick=\"return overlib('"
. str_replace(array("<",">"«»), array("&lt;","&gt;"«»),
_UE_CONNECTIONINVITATIONMSG."<br /><form action=&quot;".$connectionurl
."&quot; method=&quot;post&quot; id=&quot;connOverForm&quot; name=&quot;connOverForm&quot;>"._UE_MESSAGE
."<br /><textarea cols=&quot;40&quot; rows=&quot;8&quot; name=&quot;message&quot;></textarea><br />"
. "<input type=&quot;button&quot; class=&quot;inputbox&quot; onclick=&quot;cbConnSubmReq();&quot; value=&quot;"
._UE_SENDCONNECTIONREQUEST."&quot; />&nbsp;&nbsp;"
."<input type=&quot;button&quot; class=&quot;inputbox&quot; onclick=&quot;cClick();&quot; value=&quot;"
._UE_CANCELCONNECTIONREQUEST."&quot; /></form>"«»)
."', STICKY, CAPTION,'"
.sprintf(_UE_CONNECTTO,htmlspecialchars(str_replace("'","&#039;",getNameFormat($user->name,$user->username,$ueConfig)),ENT_QUOTES))
."', CENTER,CLOSECLICK,CLOSETEXT,'"._UE_CLOSE_OVERLIB."',WIDTH,350, ANCHOR,'cbAddConn',ANCHORALIGN,'LR','UR');";
// $flink="<a href=\"".$connectionurl."\" id=\"cbAddConn\" name=\"cbAddConn\" title=\"".$fmsgdesc."\">".getLangDefinition($fmsg)."</a>";
$flink = $connectionurl."\" id=\"cbAddConn\" name=\"cbAddConn"; //BBTRYREMOVED: "\" title=\"".$fmsgdesc."\">".getLangDefinition($fmsg)."</a>";
} else {
$flink=$connectionurl;
}
[/code:1]

I'm going to go for some good ol guess and check debugging to see if I can first, find where the problem is, and second, fix it, but if anyone else can guess the problem or knows a fix, please share!

Thanks,
Andrew

Please Log in to join the conversation.

15 years 4 months ago #81206 by pure_cobalt
Replied by pure_cobalt on topic Re:Please help! connection request popup window
Right, so a little bit of overLIB research later to understand all of those commands listed in that code, and I figured out how to solve the problem on my site. I hope this is useful for you Tomek, but for me, it required no template adjustments.

My problem was pretty much just the end of the $connectionurl string, which seems to try to align the popup div to the Add Connection link ( <a id="cbAddCon"...> )

[code:1]."', CENTER,CLOSECLICK,CLOSETEXT,'"._UE_CLOSE_OVERLIB."',WIDTH,350, ANCHOR,'cbAddConn',ANCHORALIGN,'LR','UR');";[/code:1]
Also, it contains the command "CENTER", which tells the overlib function to center the popup div around the mouse, though that was being overridden by the ANCHOR and ANCHORALIGN commands.

To solve my problem, I just needed to remove
[code:1], ANCHOR,'cbAddConn',ANCHORALIGN,'LR','UR'[/code:1]
and take out
[code:1] CENTER,[/code:1]

Now, the div loads in its default position, which is to the right of and below the mouse position.

Tomek, for your problem, maybe you should check what comes after WIDTH in that last line of code (350 in my example). That number should be what controls the width of the div that pops up. Because of the layout of your profile, the rest of the code should work fine (all the ANCHOR and ANCHORALIGN stuff), but if you're still having trouble, you can try removing it so that it just relies on the mouse position (CENTER, LEFT, or RIGHT) to determine where to position the div.

Good luck!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.172 seconds

Facebook Twitter LinkedIn