MyBB Community Forums

Full Version: edit html code of my forum with ftp? URGENT! :)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[/quote]Hey friends
My forum is:talkmoneyonline.com
Can you go there and click view source and scroll to the bottom of the source code??
There's something like this:
Quote:<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5263515-4']);
_gaq.push(['_setDomainName', '.3eeweb.com']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

That's a google analytics but,ITS NOT MY GOOGLE ANALYTICS Sad
I checked in the admin panel and go to my template and edit it and I can't found that thing Sad
And I checked the plugin and I founded the google analytic plugin and I change it to my code but the code still doesn't changed
I changed that into text and that code turn into text! :O
_gaq.push(['_setAccount', '(some text)']);
Not like this:
_gaq.push(['_setAccount', 'UA-5263515-4']);
And I know that this plugin is fake,I tried to remove it but I can't
I have deactivate the plugin and the source code still like that Sad
And I haven't try to delete it,should I delete this plugin??

Thanks!Big Grin
Please attach the plugin you are using.

Also, instead of using a plugin, go to YOUR THEME TEMPLATES -> Footer ->footer -> Add this add the bottom, just above </body>

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'YOUR CODE']);
_gaq.push(['_setDomainName', 'YOUR DOMAIN']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

Replace Your code & your domain with your own.
Hey if I add that code,Can I verify?? Huh
And how to delete that another google analytic code??
Look the html code of file:
Quote:Google Analytics Plugin for MyBB
Copyright © 2010 Sebastian Wunderlich

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

if(!defined('IN_MYBB'))
{
die();
}

$plugins->add_hook('pre_output_page','ganalytics');

function ganalytics_info()
{
return array
(
'name'=>'Google Analytics',
'description'=>'Adds Google Analytics tracking code to every page.',
'website'=>'http://mods.mybboard.net/view/google-analytics',
'author'=>'Sebastian Wunderlich',
'version'=>'1.5',
'guid'=>'b928e2bd9d442c830c672ec3d94397b6',
'compatibility'=>'14*,16*',
'codename'=>'ganalytics'
);
}

function ganalytics_activate()
{
global $db,$mybb;
$info=ganalytics_info();
$setting_group_array=array
(
'name'=>$info['codename'],
'title'=>$info['name'],
'description'=>'Here you can edit '.$info['name'].' settings.',
'disporder'=>1,
'isdefault'=>0
);
$db->insert_query('settinggroups',$setting_group_array);
$group=$db->insert_id();
$settings=array
(
'ganalytics_webpropertyid'=>array
(
'Google Analytics web property ID',
'Enter here your Google Analytics web property ID (for example "UA-7207177-6").',
'text',
''
)
);
$i=1;
foreach($settings as $name=>$sinfo)
{
$insert_array=array
(
'name'=>$name,
'title'=>$db->escape_string($sinfo[0]),
'description'=>$db->escape_string($sinfo[1]),
'optionscode'=>$db->escape_string($sinfo[2]),
'value'=>$db->escape_string($sinfo[3]),
'gid'=>$group,
'disporder'=>$i,
'isdefault'=>0
);
$db->insert_query('settings',$insert_array);
$i++;
}
rebuild_settings();
}

function ganalytics_deactivate()
{
global $db;
$info=ganalytics_info();
$result=$db->simple_select('settinggroups','gid','name="'.$info['codename'].'"',array('limit'=>1));
$group=$db->fetch_array($result);
if(!empty($group['gid']))
{
$db->delete_query('settinggroups','gid="'.$group['gid'].'"');
$db->delete_query('settings','gid="'.$group['gid'].'"');
rebuild_settings();
}
}

function ganalytics($page)
{
global $mybb;
if($mybb->settings['ganalytics_webpropertyid'])
{
$page=str_replace('</body>','<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("'.$mybb->settings['ganalytics_webpropertyid'].'");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>',$page);
}
return $page;
}

?>