Feb 05

Topic Ads - Invision IPB Google Adsense Manager Mod

Tiếp theo bài viết về Social Bookmark Invision, bài viết này tớ sẽ chia sẻ với các bạn Mod quản lý Google Adsense cho Invision với tỷ lệ click cao nhất có thể và khả năng tùy biến cao. Mod này được sửa từ Google Ads của Vandim88, do không liên lạc được với tác giả nên tớ theo qui định GPL mà cải tiến và chia sẻ lại với cộng đồng.
Bản nâng cấp cho phép bạn tùy biến định dạng format cho từng vị trí riêng như thế trình bày trang đẹp hơn mà lại hiệu quả hơn nhiều và đương nhiên lợi nhuận cao hơn.

Description Invision Google Adsense

With this mod u could set up an ad to be displayed in different positions in the board or in a topic. The multi format of ads would be displayed between the first and second post, after the first post, in the header or footer of board. A new addition is the group permission so u could set the groups who would avoid seeing ads. You can custumize you setting through board admin.

Google Ads Invision Mod

With this mod you would be able to show differents formats of google ads in 5 different places across the board.

  • Inside Topics After the first post on every page
  • Inside Forums At The top
  • Inside Forums At The Bottom
  • On the board index Page at the top
  • On the board index Page at the Bottom
Mod Google Adsense Manager

Download

Download Topic Ads - Invision IPB Google Adsense Manager Mod
[download=4]

Files Affected

  • sources/classes/class_display.php (1 Edit)
  • sources/action_public/forums.php (2 Edit)
  • sources/lib/func_topic_linear.php (1 Edit)
  • 1 Template Bit Changed
  • 1 Template Bit Added

Requirements

This mod was designed to be installed using the Universal Mod Installer, available from IPSBeyond or Invision Modding

Files Uploaded:

  • mod_install/googleads.xml To mod_install/

IPB Versions:

  • IPB 2.2 / 2.2.1

Support

Support will be provided at Bulletin-Board quang ba Web.

Change Log

  • 1.1.0 - Add customized format for different places
  • 1.0.0 - Initial Release (Vandim88)

Install Mod Invision Adsense Manager

  • Running The Installers
  • Using the Universall Mod Installer After Uploading the googleads.xml To the Mod_install Directory then run the installation script from the ACP -> COMPONENTS -> Universall Mod Installer

Open: sources/classes/class_display.php
Find:

$this->ipsclass->skin['_wrapper'] = str_replace( "<% CSS %>"            , $css                                , $this->ipsclass->skin['_wrapper']);

Add Above:

if($this->ipsclass->vars['google_ads_header'])
{
if (preg_match("/(^|,)".$this->ipsclass->member['mgroup']."(,|$)/", $this->ipsclass->vars['google_view_groups']))
{
$adt = $this->ipsclass->compiled_templates['skin_global']->ga_header();
$this->ipsclass->skin['_wrapper'] = str_replace( ""     , $adt                 , $this->ipsclass->skin['_wrapper']);
}
}
if($this->ipsclass->vars['google_ads_footer'])
{
if (preg_match("/(^|,)".$this->ipsclass->member['mgroup']."(,|$)/", $this->ipsclass->vars['google_view_groups']))
{
$adb = $this->ipsclass->compiled_templates['skin_global']->ga_footer();
$this->ipsclass->skin['_wrapper'] = str_replace( ""     , $adb                 , $this->ipsclass->skin['_wrapper']);
}
}

Save & Upload.
Open: sources/action_public/forums.php
Find:

//-----------------------------------------
// Start printing the page
//-----------------------------------------

Add Above:

//-----------------------------------------
// Show google ads by vadim88
//-----------------------------------------
if($this->ipsclass->vars['google_ads_forums'])
{
if (preg_match("/(^|,)".$this->ipsclass->member['mgroup']."(,|$)/", $this->ipsclass->vars['google_view_groups']))
{
$this->output .= $this->ipsclass->compiled_templates['skin_global']->google_ads();
}
}

Find:

//-----------------------------------------
// Multi-moderation?
//-----------------------------------------

Add Above:

//-----------------------------------------
// Show Google ads by vadim88
//-----------------------------------------
if($this->ipsclass->vars['google_ads_forums_bottom'])
{
if (preg_match("/(^|,)".$this->ipsclass->member['mgroup']."(,|$)/", $this->ipsclass->vars['google_view_groups']))
{
$this->output .= $this->ipsclass->compiled_templates['skin_global']->google_ads();
}
}

Save & Upload.
Open: sources/lib/func_topic_linear.php
Find:

}
//-----------------------------------------
// Print the footer
//-----------------------------------------

Add Above:

if($this->ipsclass->vars['google_ads_topics'])
{
if (preg_match("/(^|,)".$this->ipsclass->member['mgroup']."(,|$)/", $this->ipsclass->vars['google_view_groups']))
{
$this->post_count++;
if ($this->post_count == 1)
{
$ad = array (
'name_css' => 'normalname',
'post_css' => ($post_count % 2 ? 'post1' : 'post2'),
'pid' => '0',
'post'  => $this->ipsclass->compiled_templates['skin_global']->google_ads(),
);
$bot_poster = array (
'_members_display_name'   => 'Googlebot',
'avatar'  => '<img alt="google adsense" src="http://www.google.com/images/logo_sm.gif" />',
);
$this->post_count++;
$ad['post_date'] = $row['post_date'];
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->RenderRow( $ad, $bot_poster );
}
}
}

Save & Upload.
Goto ACP -> LOOK & FEEL -> Edit Template HTML -> Edit Board Header & Footer Wrapper
Find:

< % MEMBER BAR %>

OR

< % NAVIGATION %>

Add Below:

<!--GOOGLE_ADS_TOP-->

Find:

< % BOARD %>

Add Below:

<!--GOOGLE_ADS_BOTTOM-->

Save & Upload.

Configuration Invison Topic Ads

After installation is done, and you have edited the files required it is importent that you go to ACP -> TOOLS & SETTINGS -> Google Ads and configure the settings there to your needs.
Also to change the Google Ad Please Goto: ACP -> LOOK & FEEL -> Edit Template HTML -> ALL Global HTML -> Google_ads, change the google ad to yours.

Bài viết cùng chủ đề liên quan

  1. Google Adsense toàn tập - Website, Invision, vBulletin
    Xin giới thiệu tới các bạn một tài liệu khá hay về Google Adsense. Tài liệu cung cấp cho bạn những thông tin cần thiết trước khi thực sự dấn...
  2. Google Adsense - Thuật ngữ SEO Webmaster Internet
    Google Adsense trước tiên là một dịch vụ thương mại của Google cho phép chủ nhân Website lớn bé để nhanh chóng, dễ dàng đăng quảng cáo Google trên nội...
  3. Google AdSense lịch sử của cỗ máy in tiền lớn nhất thế giới
    Giới thiệu chung Phần AdSense trong một trang web AdSense là một dịch vụ quảng cáo của Google. Người viết web hay thậm chí là cả blog có thể đăng...
  4. Social Bookmarking for IBP | Invision Power Board Bookmark Mod
    Khi các bạn đăng một bài viết trên blog cá nhân, Website hay các diễn đàn thảo luận thì các bạn đều mong muốn bài viết của mình được nhiều...
  5. Thủ thuật Google Adsense dành cho Webmaster Vietnam
    Các qui định chung người chơi Adsense cần chú ý : Điều lệ của Google Adsense luôn ghi rõ : Khi chơi đẹp không cần gian lận bạn sẽ...
  6. Quản lý ảnh WordPress với Image Manager | Thu thuat Blog
    Giới thiệu Trong khi viết bài trên nền WordPress, chắc bạn ít nhất một lần đã từng dùng đến ảnh minh họa. Các tính năng ngầm định của WordPress...
Tags: , , , ,
1 lời bình cho “Topic Ads - Invision IPB Google Adsense Manager Mod”
  1. Saokim999 Says:

    Mình dùng mod ads in topic cũng được, hack mod đơn giản hơn
    ngoài ra còn có goolge bot, tự thêm 1 baiài y như 1 thành iveen trong mỗi chủ đề…

Bình luận của bạn