Author |
Message |
NeapolitanWorld
Involved
Joined: Nov 06, 2005
Posts: 339
Location: Los Angeles, USA
|
Posted:
Thu Jul 22, 2010 5:45 pm |
|
Has anyone tried out the meebo bar? I'm trying to install it but with no luck, anyone know which files you need to insert the snippets of javascript?
thx
jc |
_________________ My Raven Site Only registered users can see links on this board! Get registered or login! |
|
|
|
nuken
RavenNuke(tm) Development Team
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Thu Jul 22, 2010 7:05 pm |
|
Here is an example of my theme.php that has the meebo bar on it. I added the first bit of code after the body tag in themeheader and the second code at the end of themefooter.
Code:function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix, $anonymous, $topic, $name, $sel, $db, $ThemeSel, $nukeNAV, $name;
cookiedecode($user);
echo "<body>";
echo "<script type=\"text/javascript\">\n";
echo "if (typeof Meebo == 'undefined') {\n";
echo " Meebo=function(){(Meebo._=Meebo._||[]).push(arguments)};\n";
echo " (function(q){\n";
echo " var d=document,b=d.body;\n";
echo " if(!b){var cb=arguments.callee;return setTimeout(function(){cb(q)},100);}\n";
echo " var m=b.insertBefore(d.createElement('div'), b.firstChild), s=d.createElement('script');\n";
echo " m.id='meebo'; m.style.display='none'; m.innerHTML='<iframe id=\"meebo-iframe\" frameBorder=\"0\" ><\/iframe>';\n";
echo " s.src='http'+(q.https?'s':'')+'://'+(q.stage?'stage-':'')+'cim.meebo.com/cim/cim.php?network='+q.network;\n";
echo " d.getElementsByTagName('head')[0].appendChild(s);\n";
echo " })({network: 'site id and number goes here', stage: false});\n";
echo " Meebo('makeEverythingSharable');\n";
echo "}\n";
echo "</script>\n";
echo "\n";
if ($banners) {
echo ads(1);
}
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.0') !== FALSE) {
$navtop = ' • <a href="index.php"><b>'._HOME.'</b></a> • <a href="downloads.html"><b>'._UDOWNLOADS.'</b></a> • <a href="account.html"><b>'._FSIYOURACCOUNT.'</b></a> • <a href="forums.html"><b>'._BBFORUMS.'</b></a> • ';
}
else {
$navtop = $nukeNAV;
}
if (defined('INDEX_FILE')) {
echo '<div id="header"><div id="header_inner" class="fixed"><div id="logo"><span><img src="themes/'.$ThemeSel.'/images/logo.png" alt="Tricked Out News" border="0" /></span></div>';
if ($banners) {
echo '<div id="logo_right">';
echo ads(0);
echo '</div>';
};
echo '</div><center>'.$navtop.'</center><br style="clear: left" /></div><div id="main" class="clearfix"><div id="main_inner" class="fixed"><div id="primaryContent_3columns">';
}else{
echo '<div><div id="header"><div id="header_inner" class="fixed"><div id="logo"><span><img src="themes/'.$ThemeSel.'/images/logo.png" alt="" border="0" /></span></div>';
if ($banners) {
echo '<div id="logo_right">';
echo ads(0);
echo '</div>';
};
echo '</div><center>'.$navtop.'</center><br style="clear: left" /></div><div id="main" class="clearfix"><div id="main_inner" class="fixed"><div id="primaryContent_2columns">';
}
if (defined('INDEX_FILE')) {
echo '<div id="columnA_3columns">';
}else{
echo '<div id="columnA_2columns">';
}
}
/************************************************************/
/* Function themefooter() */
/* Control the footer for your site. */
/************************************************************/
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4, $name;
echo '</div></div><div id="secondaryContent_3columns">';
if (defined('INDEX_FILE')) {
echo '<div id="secondaryContent_2columns"><div id="columnC_2columns">';
}else{
echo '<div id="columnB_3columns">';
}
blocks('left');
echo '</div>';
if (defined('INDEX_FILE')) {
echo '<div id="columnC_3columns">';
blocks('right');
echo '</div>';
}
$footer_message = "<p>$foot1</p><p>$foot2</p><p>$foot3</p><p>$foot4</p>";
echo '</div><br class="clear" /></div></div></div><div id="footer" class="fixed">';
footmsg();
echo '</div>';
echo "<script type=\"text/javascript\">\n";
echo " Meebo(\"domReady\");\n";
echo "</script>\n";
}
|
|
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
|
NeapolitanWorld
|
Posted:
Fri Jul 23, 2010 1:39 am |
|
nuken, thank you! works like a charm
jc |
|
|
|
|
kguske
Site Admin
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Sat Jul 24, 2010 7:43 am |
|
I added to nukeSEO.com without touching the theme and only by adding a new file or two. I could post the files if you like. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
|
NeapolitanWorld
|
Posted:
Sat Jul 24, 2010 10:28 am |
|
kguske, that would be nice to have! no need to edit all my themes anytime theres an update please do.
jc |
|
|
|
|
Palbin
Site Admin
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Sat Jul 24, 2010 10:35 am |
|
addJSToBody() and addons folder |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
|
kguske
|
Posted:
Sat Jul 24, 2010 8:50 pm |
|
Create a file called includes/addons/body-Meebo.php with this, substituting the value of your Meebo network code:
Code:<?php
$meebo_network = 'myMeeboNetworkCode';
$bodyHTML = '
<script type="text/javascript">if (typeof Meebo == \'undefined\') { Meebo=function(){(Meebo._=Meebo._||[]).push(arguments)}; (function(q){ var d=document,b=d.body; if(!b){var cb=arguments.callee;return setTimeout(function(){cb(q)},100);} var m=b.insertBefore(d.createElement(\'div\'), b.firstChild), s=d.createElement(\'script\'); m.id=\'meebo\'; m.style.display=\'none\'; m.innerHTML=\'<iframe id="meebo-iframe" frameBorder="0" ></iframe>\'; s.src=\'http\'+(q.https?\'s\':\'\')+\'://\'+(q.stage?\'stage-\':\'\')+\'cim.meebo.com/cim/cim.php?network=\'+q.network; d.getElementsByTagName(\'head\')[0].appendChild(s); })({network: \''.$meebo_network.'\', stage: false}); Meebo(\'makeEverythingSharable\');}</script>
<script type="text/javascript"> Meebo("domReady");</script>';
if (is_array($bodyJS) and function_exists('addJSToBody')) addJSToBody($bodyHTML, 'inline');
else echo $bodyHTML."\n";
?>
|
|
|
|
|
|
NeapolitanWorld
|
Posted:
Sat Jul 24, 2010 11:59 pm |
|
kguske, thank you. This is great because I don't have to worry about adding it to new themes or when upgrades come along I don't have to add code to each and every theme. this works perfect. Thank you!
jc |
|
|
|
|
zacklk
Regular
Joined: Mar 06, 2010
Posts: 79
|
Posted:
Wed Sep 01, 2010 2:44 am |
|
Mr. kguske. did u update meebo code in nukeseo.com? i tried the code way added here. everything works except chat logins. when i check view source in ur site its showing a bigger code then showing in mine. if u change the code can u please share with us. thank you. |
|
|
|
|
kguske
|
Posted:
Wed Sep 01, 2010 11:09 am |
|
Here's the updated code (Meebo changed the JS):
Code:<?php
$meebo_network = 'myMeeboNetworkCode';
$bodyHTML = '
<script type="text/javascript">
window.Meebo||function(b){function p(){return["<",i,\' onload="var d=\',g,";d.getElementsByTagName(\'head\')[0].",
j,"(d.",h,"(\'script\')).",k,"=\'//",b.stage?"stage-":"","cim.meebo.com/cim?iv=",a.v,
"&",q,"=",b[q],b[l]?"&"+l+"="+b[l]:"",b[e]?"&"+e+"="+b[e]:"","\'\"></",i,">"].join("")}
var f=window,a=f.Meebo=f.Meebo||function(){(a._=a._||[]).push(arguments)},d=document,
i="body",m=d[i],r;if(!m){r=arguments.callee;return setTimeout(function(){r(b)},
100)}a.$={0:+new Date};a.T=function(u){a.$[u]=new Date-a.$[0]};a.v=4;var j="appendChild",
h="createElement",k="src",l="lang",q="network",e="domain",n=d[h]("div"),v=n[j](d[h]("m")),
c=d[h]("iframe"),g="document",o,s=function(){a.T("load");a("load")};f.addEventListener?
f.addEventListener("load",s,false):f.attachEvent("onload",s);n.style.display="none";
m.insertBefore(n,m.firstChild).id="meebo";c.frameBorder="0";c.id="meebo-iframe";
c.allowTransparency="true";v[j](c);try{c.contentWindow[g].open()}catch(w){b[e]=
d[e];o="javascript:var d="+g+".open();d.domain=\'"+d.domain+"\';";c[k]=o+"void(0);"}try{var t=
c.contentWindow[g];t.write(p());t.close()}catch(x){c[k]=o+\'d.write("\'+p().replace(/"/g,
\'\\"\')+\'");d.close();\'}a.T(1)}({network:"'.$meebo_network.'"});
Meebo("makeEverythingSharable");
</script>
';
if (is_array($bodyJS) and function_exists('addJSToBody')) addJSToBody($bodyHTML, 'inline');
else echo $bodyHTML."\n";
?>
|
|
|
|
|
|
zacklk
|
Posted:
Wed Sep 01, 2010 12:16 pm |
|
thank you sir. its works great |
|
|
|
|
fernades
New Member
Joined: Aug 18, 2010
Posts: 21
|
Posted:
Fri Apr 08, 2011 4:22 am |
|
I am also looking for the same! Anyway thanks a lot. |
|
|
|
|
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Sat Aug 20, 2011 5:01 am |
|
how can I find myMeeboNetworkCode ?? |
|
|
|
|
|