Recent Topics

1 Nov 20, 2007 22:45    

My b2evolution Version: Not Entered

Step by step how do i get adsense on my blog/website. I have already signed up for it and have the code. I just don't know where to place the appropriate code. I don't understand html and can't figure out where the adsense code goes. please help.

(title edited by EdB)

3 Nov 21, 2007 00:09

in vegas 2.1 it's a bundled plugin.. you may use that plugin to insert into posts, or use the FreeHTML function in sidebar to show ur ads in sidebar, or you can use html.header.php in ur themes folder

4 Nov 21, 2007 01:16

Its version 1.10.2, thanks for the help

5 Nov 21, 2007 01:21

Then use the Adsense plugin, for starters :)

6 Nov 21, 2007 02:23

Thanks but i don't think you understand. Could you spell it out for me. I don't really know anything about this program. where is that. how do i get there. when will i know im in it? thanks
p.s. I don't want them in my posts i want them on the sides of my page.
and on the bottom.

7 Nov 21, 2007 02:50

So.... what size adsense units do you have? and where on your sidebar do you want it located?

8 Nov 21, 2007 03:02

Ok ill try to be specific as i know you are probably fustrated with my questions. sorry im new to this. and appreciate the help. okay.

I have a blog b2evolution. version 1.10.2 and i want to put at leat 3 ad senses on my site. I have the skin nifty_corners, i just want them on my site where they are viewable, you know. doesn't have to be on the side. And i believe the 728x90 , i have no idea how big that is BTW. so any info would help thanks.

9 Nov 21, 2007 04:24

OK,
Go to your downloaded folder of B2 and
open ->blogs, then ->skins, then ->nifty_corners, and then _main.php
Back up that copy of _main.php and replace it with the version below that has two adsense banners, one before the first post and one after the last post.
Your skin is too narrow for the 728 banner ad so I suggest the 468 x 60.

NOTE: you must replace my ADSENSE code in the file below with your specific ADSENSE code ( just cut and paste), they are easy to find.

For a third Ad I would suggest a smaller one for the sidebar, but lets get first things first :)

Yell if you have a problem

<?php
	/**
	 * This is the main template. It displays the blog.
	 *
	 * However this file is not meant to be called directly.
	 * It is meant to be called automagically by b2evolution.
	 * To display a blog, you should call a stub file instead, for example:
	 * /blogs/index.php or /blogs/blog_b.php
	 *
	 * b2evolution - {@link http://b2evolution.net/}
	 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
	 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}
	 *
	 * @package evoskins
	 * @subpackage custom
	 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

skin_content_header();	// Sets charset!
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>">
<head>
	<?php skin_content_meta(); /* Charset for static pages */ ?>
	<?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>
	<title><?php
		$Blog->disp('name', 'htmlhead');
		request_title( ' - ', '', ' - ', 'htmlhead' );
	?></title>
	<?php skin_base_tag(); /* Base URL for this skin. You need this to fix relative links! */ ?>
	<meta name="description" content="<?php $Blog->disp( 'shortdesc', 'htmlattr' ); ?>" />
	<meta name="keywords" content="<?php $Blog->disp( 'keywords', 'htmlattr' ); ?>" />
	<?php robots_tag(); ?>
	<meta name="generator" content="b2evolution <?php echo $app_version ?>" /> <!-- Please leave this for stats -->
	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>" />
	<link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>" />
	<link rel="stylesheet" href="rsc/styles.css" type="text/css" />
	<link rel="stylesheet" type="text/css" href="rsc/nifty_corners.css" />
	<link rel="stylesheet" type="text/css" href="rsc/nifty_print.css" media="print" />
	<script type="text/javascript" src="rsc/nifty_corners.js"></script>
	<script type="text/javascript">
		window.onload=function()
		{
			if(!NiftyCheck())
					return;
			Rounded("div.outerwrap","all","transparent","#fff","");
			Rounded("div.posts","all","transparent","#fff","");
			Rounded("div.bSideBar","all","transparent","#fff","");
			Rounded("div.bTitle","top","#fff","#06a3c4","smooth");
		}
	</script>
</head>
<body>
<div class="wrapper">

<div class="outerwrap">
<div class="innerwrap">

<?php
	// --------------------------- BLOG LIST INCLUDED HERE -----------------------------
	require dirname(__FILE__).'/_bloglist.php';
	// ------------------------------- END OF BLOG LIST --------------------------------
?>

<div class="pageHeader">

<h1 id="pageTitle"><?php $Blog->disp( 'name', 'htmlbody' ) ?></h1>

<div class="pageSubtitle"><?php $Blog->disp( 'tagline', 'htmlbody' ) ?></div>

</div>

</div>
</div>

<div class="posts">
<div class="innerwrap">

<!-- =================================== START OF MAIN AREA =================================== -->
<!-- ===== GOOGLE ADSENSE === -->
<p class="center">
<script type="text/javascript"><!--
google_ad_client = "pub-0000000000000";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "EFF5FF";
google_color_bg = "FDFDFF";
google_color_link = "DD9955";
google_color_text = "7788AA";
google_color_url = "777777";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<!-- ==== END GOOGLE ADSENSE ==== -->
<?php
	// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
	$Messages->disp( '<div class="action_messages">', '</div>' );
	// --------------------------------- END OF MESSAGES ---------------------------------
?>

<?php
	// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
	request_title( '<h2>', '</h2>', ' - ', 'htmlbody' );
	// ------------------------------ END OF REQUEST TITLE -----------------------------
?>

<?php // ------------------------------------ START OF POSTS ----------------------------------------
	if( isset($MainList) ) $MainList->display_if_empty( '' ); // Display message if no post

	if( isset($MainList) ) while( $Item = & $MainList->get_item() )
	{
		$MainList->date_if_changed( '<h2>', '</h2>', '' );
		locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
	?>
	<div class="bTitle"><h3 class="bTitle"><?php $Item->title( '', '', true ); ?></h3></div>
	<div class="bPost" lang="<?php $Item->lang() ?>">
		<?php
			$Item->anchor(); // Anchor for permalinks to refer to
		?>
		<div class="bSmallHead">
		<?php
			$Item->permanent_link( '#icon#', '#', '' );
			echo ' ';
			$Item->issue_time( '' );
			echo ', ', T_('Categories'), ': ';
			$Item->categories( '#', '<strong>', '</strong>', '', '', '<em>', '</em>', ', ' );
			echo ' &nbsp; ';
		?>
		</div>
		<div class="bText">
			<?php $Item->content(); ?>
			<?php link_pages( '#', '#', 'number', '#', '#', '%d' ) ?>
		</div>
		<div class="bSmallPrint">
			<?php $Item->permanent_link(); ?>
			<?php $Item->feedback_link( 'comments', ' &bull; ' ) // Link to comments ?>
			<?php $Item->feedback_link( 'trackbacks', ' &bull; ' ) // Link to trackbacks ?>
			<?php $Item->feedback_link( 'pingbacks', ' &bull; ' ) // Link to trackbacks ?>

			<?php $Item->edit_link( ' &bull; ' ) // Link to backoffice for editing ?>

			<?php $Item->trackback_rdf() // trackback autodiscovery information ?>
		</div>
		<?php
			// ------------- START OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. -------------
			$disp_comments = 1;					// Display the comments if requested
			$disp_comment_form = 1;			// Display the comments form if comments requested
			$disp_trackbacks = 1;				// Display the trackbacks if requested

			$disp_trackback_url = 1;		// Display the trackbal URL if trackbacks requested
			$disp_pingbacks = 1;				// Display the pingbacks if requested
			require( dirname(__FILE__).'/_feedback.php' );
			// ---------------- END OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. ----------------
		?>
	</div>
<?php
	locale_restore_previous();	// Restore previous locale (Blog locale)
} // ---------------------------------- END OF POSTS ------------------------------------ ?>

	<p class="center"><strong>
		<?php posts_nav_link( ' :: ', '#', '#' ); ?>
		<?php
			// previous_post( '<p class="center">%</p>' );
			// next_post( '<p class="center">%</p>' );
		?>
	</strong></p>

	<?php
		// -------------- START OF INCLUDES FOR LAST COMMENTS, MY PROFILE, ETC. --------------
		// Note: you can customize any of the sub templates included here by
		// copying the matching php file into your skin directory.
		$current_skin_includes_path = dirname(__FILE__).'/';
		// Call the dispatcher:
		require $skins_path.'_dispatch.inc.php';
		// --------------- END OF INCLUDES FOR LAST COMMENTS, MY PROFILE, ETC. ---------------
	?>
  <!-- ==== START GOOGLE ADSENSE ==== -->
	<p class="center">
	<script type="text/javascript"><!--
	google_ad_client = "pub-0000000000000";
	google_ad_width = 468;
	google_ad_height = 60;
	google_ad_format = "468x60_as";
	google_ad_type = "text";
	google_ad_channel = "";
	google_color_border = "EFF5FF";
	google_color_bg = "FDFDFF";
	google_color_link = "DD9955";
	google_color_text = "7788AA";
	google_color_url = "777777";
	//-->
	</script>
	<script type="text/javascript"
	  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
	</script></p>
     <!-- ==== END GOOGLE ADSENSE ==== -->
</div>
</div>
<!-- =================================== START OF SIDEBAR =================================== -->

<div class="bSideBar">
<div class="innerwrap">

	<?php // -------------------------- CALENDAR INCLUDED HERE -----------------------------
		// Call the Calendar plugin:
		$Plugins->call_by_code( 'evo_Calr', array(	// Params follow:
				'title'=>'',			// No title.
			) );
		// -------------------------------- END OF CALENDAR ---------------------------------- ?>

	<div class="bSideItem">
		<h3><?php $Blog->disp( 'name', 'htmlbody' ) ?></h3>
		<p><?php $Blog->disp( 'longdesc', 'htmlbody' ); ?></p>
		<ul>
			<li><a href="<?php $Blog->disp( 'dynurl', 'raw' ) ?>"><strong><?php echo T_('Recently') ?></strong></a></li>
			<li><a href="<?php $Blog->disp( 'arcdirurl', 'raw' ) ?>"><strong><?php echo T_('Archives') ?></strong></a></li>
			<li><a href="<?php $Blog->disp( 'lastcommentsurl', 'raw' ) ?>"><strong><?php echo T_('Last comments') ?></strong></a></li>
		</ul>
	</div>

	<div class="bSideItem">
		<h3 class="sideItemTitle"><?php echo T_('Search') ?></h3>
		<?php form_formstart( $Blog->dget( 'blogurl', 'raw' ), 'search', 'SearchForm' ) ?>
			<p><input type="text" name="s" size="30" value="<?php echo htmlspecialchars($s) ?>" class="SearchField" /><br />
			<input type="radio" name="sentence" value="AND" id="sentAND" <?php if( $sentence=='AND' ) echo 'checked="checked" ' ?>/><label for="sentAND"><?php echo T_('All Words') ?></label><br />
			<input type="radio" name="sentence" value="OR" id="sentOR" <?php if( $sentence=='OR' ) echo 'checked="checked" ' ?>/><label for="sentOR"><?php echo T_('Some Word') ?></label><br />
			<input type="radio" name="sentence" value="sentence" id="sentence" <?php if( $sentence=='sentence' ) echo 'checked="checked" ' ?>/><label for="sentence"><?php echo T_('Entire phrase') ?></label></p>
			<input type="submit" name="submit" class="submit" value="<?php echo T_('Search') ?>" />
		</form>
	</div>


	<?php
		// -------------------------- CATEGORIES INCLUDED HERE -----------------------------
		// Call the Categories plugin:
		$Plugins->call_by_code( 'evo_Cats', array(	// Add parameters below:
			) );
		// -------------------------------- END OF CATEGORIES ----------------------------------
	?>


	<?php
		// -------------------------- ARCHIVES INCLUDED HERE -----------------------------
		// Call the Archives plugin:
		$Plugins->call_by_code( 'evo_Arch', array(	// Add parameters below:
			) );
		// -------------------------------- END OF ARCHIVES ----------------------------------
	?>


	<?php if( ! $Blog->get('force_skin') )
	{	// Skin switching is allowed for this blog: ?>
		<div class="bSideItem">
			<h3><?php echo T_('Choose skin') ?></h3>
			<ul>
				<?php // ------------------------------- START OF SKIN LIST -------------------------------
				for( skin_list_start(); skin_list_next(); ) { ?>
					<li><a href="<?php skin_change_url() ?>"><?php skin_list_iteminfo( 'name', 'htmlbody' ) ?></a></li>
				<?php } // ------------------------------ END OF SKIN LIST ------------------------------ ?>
			</ul>
		</div>
	<?php } ?>

	<div class="bSideItem">
		<h3><?php echo T_('Misc') ?></h3>
		<ul>
			<?php
				user_login_link( '<li>', '</li>' );
				user_register_link( '<li>', '</li>' );
				user_admin_link( '<li>', '</li>' );
				user_profile_link( '<li>', '</li>' );
				user_subs_link( '<li>', '</li>' );
				user_logout_link( '<li>', '</li>' );
			?>
		</ul>
	</div>

<div class="bSideItem">
		<h3><img src="<?php echo $rsc_url ?>icons/feed-icon-16x16.gif" width="16" height="16" class="top" alt="" /> <?php echo T_('XML Feeds') ?></h3>
			<ul>
				<li>
					RSS 0.92:
					<a href="<?php $Blog->disp( 'rss_url', 'raw' ) ?>"><?php echo T_('Posts') ?></a>,
					<a href="<?php $Blog->disp( 'comments_rss_url', 'raw' ) ?>"><?php echo T_('Comments') ?></a>
				</li>
				<li>
					RSS 1.0:
					<a href="<?php $Blog->disp( 'rdf_url', 'raw' ) ?>"><?php echo T_('Posts') ?></a>,
					<a href="<?php $Blog->disp( 'comments_rdf_url', 'raw' ) ?>"><?php echo T_('Comments') ?></a>
				</li>
				<li>
					RSS 2.0:
					<a href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>"><?php echo T_('Posts') ?></a>,
					<a href="<?php $Blog->disp( 'comments_rss2_url', 'raw' ) ?>"><?php echo T_('Comments') ?></a>
				</li>
				<li>
					Atom:
					<a href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>"><?php echo T_('Posts') ?></a>,
					<a href="<?php $Blog->disp( 'comments_atom_url', 'raw' ) ?>"><?php echo T_('Comments') ?></a>
				</li>
			</ul>

		<a href="http://webreference.fr/2006/08/30/rss_atom_xml" title="External - English">What is this?</a>

</div>

<p class="center"><!-- Please help us promote b2evolution and leave this link on your blog. --><a href="http://b2evolution.net/" title="b2evolution: next generation blog software"><img src="../../rsc/img/powered-by-b2evolution-120t.gif" alt="powered by b2evolution free blog software" title="b2evolution: next generation blog software" width="120" height="32" border="0" class="middle" /></a></p>

</div>
</div>

<div class="clear"><img src="<?php echo $rsc_url; ?>img/blank.gif" width="1" height="1" alt="" /></div>

<div id="pageFooter">
	<p class="baseline">
		<?php $Blog->contact_link() ?>
		&bull;
		Original <?php display_param_link( $skin_links ) ?> by <a href="http://severinelandrieu.com/">S&eacute;verine Landrieu</a>
		&amp; <?php display_param_link( $fplanque_links ) ?>
		&bull;
		<?php
			// Display additional credits (see /conf/):
 			// If you can add your own credits without removing the defaults, you'll be very cool :))
			// Please leave this at the bottom of the page to make sure your blog gets listed on b2evolution.net
			display_list( $credit_links, T_('Credits').': ', '', '|', ' ', ' ' );
		?>
	</p>
	<?php
		$Hit->log();	// log the hit on this page
		debug_info(); // output debug info if requested
	?>
</div>

</div>

</body>
</html>

10 Nov 21, 2007 04:59

i will still advice you to go to backoffice>>blog settings>>widgets

there you will see "sidebar" seciton title and "add widget" right at the end of the row.. click on it then you will see "Free HTML" add it to your sidebar.. after that click on edit and just paste your code

11 Nov 21, 2007 05:51

Does 1.10.2 have widgets tilicom?

12 Nov 21, 2007 07:18

John wrote:

Does 1.10.2 have widgets tilicom?

yea.sure ;)

13 Nov 21, 2007 07:28

Well, there are no widgets in the download and there are no widgets in the Demo...... am I missing something?

14 Nov 21, 2007 14:00

hi john,
if you are...then...i am too.

15 Mar 07, 2008 22:58

Hello,

I've tried the adsense plugin but got back an illegal tag: script. I've posted on that but received no replies.

I'm using the originalb2 skin. Where do I post the adsense code into the HTML?

Thanks.

Justine

16 Mar 08, 2008 00:02

Please post the code you got for your adsense so I can play with it.

Seems a lot of folks have trouble with adsense in 1.10.* so I figure if I had a clue about adsense I could probably figure something out about this issue. Dunno though. Heck maybe it's already been solved too!

BTW if there is something blatantly wrong I doubt it'll ever get fixed officially. The 1.* generation is effectively dead - even though 1.10.3 is the most stablest release to date. All development work goes into 2.* is the thing.

Anyway if someone wants to provide me with their adsense code I'll play with it on a 1.10.3 installation that I have laying about.

17 Mar 08, 2008 02:13

Hello again Ed,

How are you?

Here's the code as requested.

<script type="text/javascript"><!--
google_ad_client = "pub-9144311636559535";
//Ad Ten
google_ad_slot = "4432878569";
google_ad_width = 120;
google_ad_height = 600;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

It's maybe just be easier to just upgrade b2. I installed through Fantastico so I don't how easy that'd be.

Justine

18 Mar 08, 2008 02:20

Hi Justine,

In the textfield for the Adsense plugin (Back Office -> Global settings -> Plugins -> Adense plugin) put this:

<div style="float:right; clear:both; margin:5px;">

<script type="text/javascript"><!--
google_ad_client = "pub-9144311636559535";
//Ad Ten
google_ad_slot = "4432878569";
google_ad_width = 120;
google_ad_height = 600;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script> 

</div>

Good luck

19 Mar 08, 2008 02:40

It doesn't work. Or, in a 1.10.3 installation with every skin available and the custom skin selected, putting that code in the adsense plugin box gave me nothing. I even viewed the source to see if it's there and not showing me anything because I block ads: no go. I even tried IE because IE sucks: no go. Therefore my slightly-more-than-uninformed opinion is that the adsense plugin that ships with v1.10.3 is junk.

Justine I think you said you wanted it in the sidebar anyway right? In the originalb2 skin? Open skins/originalb2/_main.php and look for this:

$Plugins->call_by_code( 'evo_Cats', array( // Add parameters below:
	'title'=>'<h4>'.T_('categories').':</h4>',
	) );
// --------------------------- END OF CATEGORIES ---------------------------- ?>


<?php // --------------------- SEARCH BOX INCLUDED HERE --------------------- ?>
<h4><?php echo T_('search') ?>:</h4>

Then pop your adsense code in between the two bits if you think after the cats and before the search box is a good place for ads.

$Plugins->call_by_code( 'evo_Cats', array( // Add parameters below:
	'title'=>'<h4>'.T_('categories').':</h4>',
	) );
// --------------------------- END OF CATEGORIES ---------------------------- ?>


<script type="text/javascript"><!--
google_ad_client = "pub-9144311636559535";
//Ad Ten 
google_ad_slot = "4432878569";
google_ad_width = 120;
google_ad_height = 600;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<?php // --------------------- SEARCH BOX INCLUDED HERE --------------------- ?>
<h4><?php echo T_('search') ?>:</h4>

20 Mar 08, 2008 04:44

Thanks for the advice, Afwas and Ed. I'll try both ways and see what happens. There's always a way, you just gotta find it or ask for it. :)

21 Mar 08, 2008 05:09

On upgrading from a Fantastico installation: not that hard really, but a little bit tricky. When the time comes for that do check the manual ("Docs" link above) as I think it's been covered there quite nicely.


Form is loading...