PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
NeapolitanWorld
Involved
Involved


Joined: Nov 06, 2005
Posts: 318
Location: Los Angeles, USA

PostPosted: Thu Jul 22, 2010 5:45 pm Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Thu Jul 22, 2010 7:05 pm Reply with quote Back to top

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";
}
View user's profile Send private message Send e-mail Visit poster's website
NeapolitanWorld
Involved
Involved


Joined: Nov 06, 2005
Posts: 318
Location: Los Angeles, USA

PostPosted: Fri Jul 23, 2010 1:39 am Reply with quote Back to top

nuken, thank you! works like a charm Very Happy

jc
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sat Jul 24, 2010 7:43 am Reply with quote Back to top

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.
View user's profile Send private message
NeapolitanWorld
Involved
Involved


Joined: Nov 06, 2005
Posts: 318
Location: Los Angeles, USA

PostPosted: Sat Jul 24, 2010 10:28 am Reply with quote Back to top

kguske, that would be nice to have! no need to edit all my themes anytime theres an update Very Happy please do.

jc
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Sat Jul 24, 2010 10:35 am Reply with quote Back to top

addJSToBody() and addons folder Wink
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Sat Jul 24, 2010 8:50 pm Reply with quote Back to top

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";

?>
View user's profile Send private message
NeapolitanWorld
Involved
Involved


Joined: Nov 06, 2005
Posts: 318
Location: Los Angeles, USA

PostPosted: Sat Jul 24, 2010 11:59 pm Reply with quote Back to top

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. Very Happy this works perfect. Thank you!

jc
View user's profile Send private message Visit poster's website
zacklk
Regular
Regular


Joined: Mar 06, 2010
Posts: 79

PostPosted: Wed Sep 01, 2010 2:44 am Reply with quote Back to top

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.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Wed Sep 01, 2010 11:09 am Reply with quote Back to top

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";

?>
View user's profile Send private message
zacklk
Regular
Regular


Joined: Mar 06, 2010
Posts: 79

PostPosted: Wed Sep 01, 2010 12:16 pm Reply with quote Back to top

thank you sir. its works great Smile
View user's profile Send private message
fernades
New Member
New Member


Joined: Aug 18, 2010
Posts: 21

PostPosted: Fri Apr 08, 2011 4:22 am Reply with quote Back to top

I am also looking for the same! Anyway thanks a lot.
View user's profile Send private message
unicornio
Involved
Involved


Joined: Aug 13, 2009
Posts: 432

PostPosted: Sat Aug 20, 2011 5:01 am Reply with quote Back to top

how can I find myMeeboNetworkCode ??
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum