Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
Hi.How can i add html javascript code on some area on my website, so it will look like plugin.Code:[i]##SANITISED## language="javascript" type="text/javascript">##SANITISED##>
Or do you know any plugin that has onmouseover image popup? If you do please post the download link, if dont know then can you please put my javascript html code to plugin for e107 or to .php?You can see how this code look like at: http://sierra.byethost9.com/asf.html
Posts: 34 Joined: Tue Feb 28 2006, 05:01PM Registered Member #1088
I got this to work using an ##SANITISED##> and making the code into a webpage by adding: ##SANITISED##> Servers##SANITISED##>YOUR CODE HERE.....##SANITISED##>##SANITISED##> Then saving that page on the webserver.by adding this code in custom menus as a new menu then adding it into one of the columns I suggest the center(more below).....##SANITISED## src="/java.htm" width="100%" height="300" frameborder="2">##SANITISED##>The only thing is the pop ups only occur inside the menu box so you would need to either add them to a large column or somehow edit your code to allow them outside the window.
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
I already tried this. But it doesnt look good because iframe is limited and half of server picture is cutted out. Do you know how could i do a mouseover image popup like eBattlefield plugin is using? The code is <a href="http://bf2s.com/player/43596155/" onmouseover="popper.popShow(event, '<center><img src=\'e107_plugins/ebfstats_menu/img/rank_2_18.gif\' alt=\' \' height=\'50\' width=\'200\' /><br />Brigadier General<br />tF-afrojap<br />Score: 184,241</center>', '#000000', '#CCCCCC', '#CCCCCC')" onmouseout="popper.popDestruct()">tF-afrojap</a> But if i change it the plugin area doesnt even appear on website.
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
Ok. In this code there it is a lot of JavaScript and all should be putted in head of the site. How could i do this?Like:##SANITISED##>myheadcodehere##SANITISED##>mybodycodehere##SANITISED####SANITISED##>";?>Code for <[i]script language="javascript" type="text/javascript">##SANITISED##>Code for ##SANITISED##>
You should not need the javascript to go in the head.
The difference is for the body, it needs to be displayed, so for your menu:
<?php
$text1 = "
INSERT HEAD JAVASCRIPT
";
$text2 = "
INSERT BODY CODE
";
$ns -> tablerender("MENU TITLE", $text1.$text2)
?>
Remember that both the head javascript and body code need to be escaped ( speechmarks replaced with a backslash and speechmark ) like I mentioned above.
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
Sorry for double post, but i tried to convert the .html to .php with some program and it convert it like this:[i]##SANITISED## language=\"javascript\" type=\"text/javascript\">\n";echo "\n";echo "##SANITISED##>\n";echo "\n";";$text2 = "echo "\n";echo "
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
Ok. But can i put in this code without changing everything?New Code:##SANITISED## type="text/css">.thumbnail{position: relative;z-index: 0;}.thumbnail:hover{background-color: transparent;z-index: 50;}.thumbnail span{position: absolute;background-image: url(http://sierra.byethost9.com/transparent.png);padding: 10px;left: -1000px;border: 1px outset;visibility: hidden;color: white;text-decoration: none;}.thumbnail span img{border-width: 0;padding: 2px;}.thumbnail:hover span{ visibility: visible;top: 20px;left: 100px;}##SANITISED##>-=[ Up All Night]=- |CTF| Server Status -=[ Up All Night]=- |CTF| ; Password protected: 0 ; Slots: 16 ; Type: Capturing The Flags
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
I putted this code: ##SANITISED## type="text/css">.thumbnail1{position: relative;z-index: 0;}.thumbnail1:hover{background-color: transparent;z-index: 50;}.thumbnail1 span{ /*CSS for enlarged image*/position: absolute;background-image: url(http://sierra.byethost9.com/transparent.png);padding: 10px;left: -1000px;border: 1px outset;visibility: hidden;color: white;text-decoration: none;}.thumbnail1 span img{ /*CSS for enlarged image*/border-width: 5px;padding: 2px;}.thumbnail1:hover span{ /*CSS for enlarged image on hover*/visibility: visible;top: -35px;left: 125px; /*position where enlarged image should offset horizontally */}##SANITISED##>into style.css and now i only need to instert the html code in php plugin. The code is: -=[ Up All Night]=- |CTF| ; Password protected: 0 ; Slots: 16 ; Type: Capturing The Flags -=[ Up All Night]=- |objective| ; Password protected: 1 ; Slots: 32 ; Type: Objective -=[ Up All Night]=- |deathM| ; Password protected: 0 ; Slots: 16 ; Type: Death MatchI tried the several ways, but nothing happend or, just code showed up. Can you please convert it from html to php for me?
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
Great News Rich (and others) i gor finally my plugin to work.Here it is the code: ";$text2 = " -=[ Up All Night]=- |CTF| ; Password protected: 0 ; Slots: 16 ; Type: Capturing The Flags ";$text3 = " -=[ Up All Night]=- |objective| ; Password protected: 1 ; Slots: 32 ; Type: Objective ";$text4 = " -=[ Up All Night]=- |deathM| ; Password protected: 0 ; Slots: 16 ; Type: Death Match";$ns -> tablerender("SiERRA1 Server Status", $text1.$text2.$text3.$text4)?>You will also need to put this code to your style.css of theme:##SANITISED## type="text/css">.thumbnail1{position: relative;z-index: 0;}.thumbnail1:hover{background-color: transparent;z-index: 50;}.thumbnail1 span{ /*CSS for enlarged image*/position: absolute;background-image: url(http://sierra.byethost9.com/transparent.png);padding: 10px;left: -1000px;border: 1px outset;visibility: hidden;color: white;text-decoration: none;}.thumbnail1 span img{ /*CSS for enlarged image*/border-width: 5px;padding: 2px;}.thumbnail1:hover span{ /*CSS for enlarged image on hover*/visibility: visible;top: -35px;left: 125px; /*position where enlarged image should offset horizontally */}##SANITISED##>
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
I think that for that player list should be picture, but you can try fallowing code:CLICK TO VIEW PLAYER INFO##SANITISED## SRC=\" ".e_PLUGIN."lgsl_menu/lgsl_players.php?id=$data[id]\" WIDTH=500 HEIGHT=500 FRAMEBORDER=0 SCROLLING=auto />##SANITISED## />and add this code to your theme's style.css:##SANITISED## type="text/css">.thumbnai1l{position: relative;z-index: 0;}.thumbnail1:hover{background-color: transparent;z-index: 50;}.thumbnail1 span{position: absolute;background-image: url(http://sierra.byethost9.com/transparent.png);//Or add your transprent color picture and put your url betwen ().//You will get the best if you make blackcolor 40% transparent and save it as .png (48x48)padding: 10px;left: -1000px;border: 1px outset;visibility: hidden;color: white;text-decoration: none;}.thumbnail1 span img{border-width: 0;padding: 2px;}.thumbnail1:hover span{visibility: visible;top: 20px;left: 100px;}##SANITISED##>Or just create style.css file with same code in lgsl_menu.I am not even 50% shure that this will work, but you can try it out.
to the lgsl_menu.php as well as to the theme.css I added:
##SANITISED## type="text/css">.thumbnai1l{position: relative;z-index: 0;}.thumbnail1:hover{background-color: transparent;z-index: 50;}.thumbnail1 span{position: absolute;//background-color: #9c9595;background-image: url(http://snl1942.com/e107_plugins/lgsl_menu/bkgrnd.png);//Or add your transprent color picture and put your url betwen ().//You will get the best if you make blackcolor 40% transparent and save it as .png (48x48)padding: 10px;left: -1000px;border: 1px outset;visibility: hidden;color: white;text-decoration: none;}.thumbnail1 span img{border-width: 0;padding: 2px;}.thumbnail1:hover span{visibility: visible;top: 450px;left: 200px;}##SANITISED##>
The only problem Is that the tooltip was at the top of the page and not relative to the mouse. I just changed the top:to 450 and the left: to 200.I had to create a new page for the tooltip so that the header, and the footer of the lgsl_players.php page didn't show them and it was just the content. I just removed the require_once(HEADERF) & (FOOTERF) entries in the lgsl_players.php and saved it as lgsl_playerstip.php for the tooltip. So that the link will still operate as previously.Also had to add 'width=300' to the table at
$text .= "
Players $data[players] / $data[maxplayers] players on $data[hostname]
To get the tooltip to center.If you would like the complete code let me know and I will send it or post it.You can see it here www.snl1942.comTHANKS SiERRA1
Posts: 34 Joined: Tue Feb 28 2006, 05:01PM Registered Member #1088
Spoke too soon......... after I got it all set and running I check it in IE and it doesnt work in IE and it screws up the website...... need a little more tweaking I guess.....
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
Yea i forgot to mension that. This code doesnt work with IE. Sorry Anyway i am already creating javascript that it will work with IE and FireFox and it will be dynacly relative to the mouse. So the popup will be changin position relative to the mouse position when you re crossing the text with it. Expect the code by 9.00 PM (GMT+1)
Posts: 27 Joined: Thu Dec 21 2006, 05:52AM Registered Member #2766
Ok i created the code which shuld display like another menu. Here it is:[i]##SANITISED## language=\"javascript\" type=\"text/javascript\" />##SANITISED## />";$text2 = "
Player Information ";$ns -> tablerender("PlayerInfo", $text1.$text2)?> I dont know if it work, because i cant test it since my host is blocking port and external urls.If you want that it will be displayed inside LGSL, then add code:
Player Information instead of:"e_PLUGIN."lsgl_menu/lsgl_players.php?id=data[id]" and create new $text item like this:[i]$text9 = "##SANITISED## language=\"javascript\" type=\"text/javascript\" />##SANITISED## />";This shuld make it work, but as i said i dont know if it will....