<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.huihoo.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-cn">
		<id>http://wiki.huihoo.com/wiki/?action=history&amp;feed=atom&amp;title=Gallery2%3AHow_to_add_Google_Adsense</id>
		<title>Gallery2:How to add Google Adsense - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.huihoo.com/wiki/?action=history&amp;feed=atom&amp;title=Gallery2%3AHow_to_add_Google_Adsense"/>
		<link rel="alternate" type="text/html" href="http://wiki.huihoo.com/wiki/?title=Gallery2:How_to_add_Google_Adsense&amp;action=history"/>
		<updated>2026-04-08T19:44:00Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.19.2</generator>

	<entry>
		<id>http://wiki.huihoo.com/wiki/?title=Gallery2:How_to_add_Google_Adsense&amp;diff=124006&amp;oldid=prev</id>
		<title>2013年1月26日 (六) 13:00 Allen</title>
		<link rel="alternate" type="text/html" href="http://wiki.huihoo.com/wiki/?title=Gallery2:How_to_add_Google_Adsense&amp;diff=124006&amp;oldid=prev"/>
				<updated>2013-01-26T13:00:22Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←上一版本&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;2013年1月26日 (六) 13:00的版本&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第81行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第81行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;来源: http://codex.gallery2.org/index.php/Gallery2:How_to_add_adsense&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;来源: http://codex.gallery2.org/index.php/Gallery2:How_to_add_adsense&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[category:ad]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[category:google]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[category:google]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Allen</name></author>	</entry>

	<entry>
		<id>http://wiki.huihoo.com/wiki/?title=Gallery2:How_to_add_Google_Adsense&amp;diff=124005&amp;oldid=prev</id>
		<title>2013年1月26日 (六) 12:59 Allen</title>
		<link rel="alternate" type="text/html" href="http://wiki.huihoo.com/wiki/?title=Gallery2:How_to_add_Google_Adsense&amp;diff=124005&amp;oldid=prev"/>
				<updated>2013-01-26T12:59:56Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←上一版本&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;2013年1月26日 (六) 12:59的版本&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第80行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第80行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;来源: http://codex.gallery2.org/index.php/Gallery2:How_to_add_adsense&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;来源: http://codex.gallery2.org/index.php/Gallery2:How_to_add_adsense&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[category:ad]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[category:google]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Allen</name></author>	</entry>

	<entry>
		<id>http://wiki.huihoo.com/wiki/?title=Gallery2:How_to_add_Google_Adsense&amp;diff=9616&amp;oldid=prev</id>
		<title>2006年10月14日 (六) 13:31 WikiSysop</title>
		<link rel="alternate" type="text/html" href="http://wiki.huihoo.com/wiki/?title=Gallery2:How_to_add_Google_Adsense&amp;diff=9616&amp;oldid=prev"/>
				<updated>2006-10-14T13:31:52Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This article describes how you can include [https://www.google.com/adsense/ Google AdSense] in your Gallery-powered website to generate revenue by displaying Google Ads.&lt;br /&gt;
&lt;br /&gt;
This How to is made for the default Gallery theme (matrix).&lt;br /&gt;
&lt;br /&gt;
First create a new tpl file under /gallery2/themes/matrix/templates/local/&lt;br /&gt;
&lt;br /&gt;
I called this file adsense.tpl&lt;br /&gt;
&lt;br /&gt;
Edit this file and insert the following code:&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
      {php}&lt;br /&gt;
      $adcode = &amp;lt;&amp;lt;&amp;lt;END&lt;br /&gt;
      HERE COMES YOUR GOOGLE BANNER CODE (its better to use 468x60 size)&lt;br /&gt;
      END;&lt;br /&gt;
      echo $adcode;&lt;br /&gt;
      {/php}''&lt;br /&gt;
&lt;br /&gt;
now you have to copy /gallery2/themes/matrix/templates/theme.tpl to /gallery2/themes/matrix/templates/local/ and edit /gallery2/themes/matrix/templates/local/theme.tpl&lt;br /&gt;
&lt;br /&gt;
After the logo line add this code:&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
       {g-&amp;gt;theme include=&amp;quot;adsense.tpl&amp;quot;}''&lt;br /&gt;
&lt;br /&gt;
thats it!&lt;br /&gt;
&lt;br /&gt;
you can see a live demo on my site&lt;br /&gt;
&lt;br /&gt;
[http://kdo.dyndns.org/photos/ Kedem photos] or [http://www.mapmyphoto.com/photos/ mapmyphoto]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Omrik|Omrik]] 08:44, 17 April 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is another way to add [https://www.google.com/adsense/ Google AdSense] in Gallery2.&lt;br /&gt;
You have to copy /gallery2/themes/matrix/templates/theme.tpl to /gallery2/themes/matrix/templates/local/ and edit /gallery2/themes/matrix/templates/local/theme.tpl.Find:&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
       &amp;lt;div id=&amp;quot;gsHeader&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;{g-&amp;gt;url href=&amp;quot;images/galleryLogo_sm.gif&amp;quot;}&amp;quot; width=&amp;quot;107&amp;quot; height=&amp;quot;48&amp;quot; alt=&amp;quot;&amp;quot;/&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
After that add the Adsense code, if you want to center the banner you have to use &lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
      &amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;--ADSENSE CODE--&amp;gt;&amp;lt;/div&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
You can see a libe demo on my site.&lt;br /&gt;
&lt;br /&gt;
*[http://bl06.net/album/main.php Visit me]&lt;br /&gt;
&lt;br /&gt;
But there is a problem is you use the Xp's Tool to publish photos from your Pc you have to deactivate the code, you can rename /gallery2/themes/matrix/templates/local/ folder and after upload the photos rename again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can add a Adsense Banner in the footer. Find the following code and bellow that add your adsense code.&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;div id=&amp;quot;gsFooter&amp;quot;&amp;gt;&lt;br /&gt;
	{g-&amp;gt;logoButton type=&amp;quot;validation&amp;quot;}&lt;br /&gt;
	{g-&amp;gt;logoButton type=&amp;quot;gallery2&amp;quot;}&lt;br /&gt;
	{g-&amp;gt;logoButton type=&amp;quot;gallery2-version&amp;quot;}&lt;br /&gt;
	{g-&amp;gt;logoButton type=&amp;quot;donate&amp;quot;}&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      {/if}  {* end of full screen check *}''&lt;br /&gt;
Remember to use &lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
      &amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;--ADSENSE CODE--&amp;gt;&amp;lt;/div&amp;gt;''&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Installing 120X600 Adsense Skyscraper in Side Bar&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.Using the default 'Matrix' theme open file: /matrix/templates/sidebar.tpl&lt;br /&gt;
&lt;br /&gt;
2.Below  ''{g-&amp;gt;block type=&amp;quot;core.NavigationLinks&amp;quot; class=&amp;quot;gbBlock&amp;quot;}&lt;br /&gt;
&amp;lt;/div&amp;gt;'' add your Adsense code for the 120x600 banner.&lt;br /&gt;
&lt;br /&gt;
3.This will display the 120x600 banner in your side bar and blend it with the colors of the Matrix theme.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;View Example Here [http://the360index.com/360pics/v/Games/ The 360 Index Gallery].&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
来源: http://codex.gallery2.org/index.php/Gallery2:How_to_add_adsense&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	</feed>