| Autor |
Zpráva |
Karo88
Štábní Rotmistr


Registrace: 28.12. 2006
Příspěvky: 189
|
 Zaslal:
út 10. červenec, 2007 20:40 Předmět: Module Forum - adsense |
  |
Ako si dostal do fóra tu reklamu od googla, a čo k tomu budem potrebovať. |
|
|
| Návrat nahoru |
|
 |
Inzerce
Sponsor


Registrace: 4.1. 2007 Příspěvky: 143
|
|
 |
Blassen
Armádní generál (Admin)


Registrace: 1.1. 1970
Příspěvky: 2140
|
 Zaslal:
út 10. červenec, 2007 21:00 Předmět: Re: Module Forum - adsense |
  |
InLine Ads, nebo Google Adsense in topics
nejsme moc specializovaní na phpBB, ale koukni se na phpbbhacks.com a phpbb.org |
_________________ Blassen,
Altruista, Redaktor, Programátor, Designér a Majitel
Hello IT. Have you tried turning it off and on again ? Are you sure it's plugged in ? |
|
| Návrat nahoru |
|
 |
Karo88
Štábní Rotmistr


Registrace: 28.12. 2006
Příspěvky: 189
|
 Zaslal:
út 10. červenec, 2007 22:41 Předmět: |
  |
hladám čo najjednoduchšie riešenie. A tu na fóre je čo použité. |
|
|
| Návrat nahoru |
|
 |
Blassen
Armádní generál (Admin)


Registrace: 1.1. 1970
Příspěvky: 2140
|
 Zaslal:
út 10. červenec, 2007 23:30 Předmět: Google Adsense in topics |
  |
Karo88 napsal:
hladám čo najjednoduchšie riešenie. A tu na fóre je čo použité.
Tady je použitá ta první možnost ale poměrně hodně upravená. Popravdě už ani nevim jak, ale doporučuju tu druhou Google Adsense in topics.
Pokud sem to dobře pochopil tak to je jednoduchý. Používá to například i drakeman na svém fóru. |
_________________ Blassen,
Altruista, Redaktor, Programátor, Designér a Majitel
Hello IT. Have you tried turning it off and on again ? Are you sure it's plugged in ? |
|
| Návrat nahoru |
|
 |
Karo88
Štábní Rotmistr


Registrace: 28.12. 2006
Příspěvky: 189
|
 Zaslal:
st 11. červenec, 2007 13:31 Předmět: |
  |
Stiahol som google Adsense topic no ten zo brazoval len jednu reklamu v topicu. Tak som ho upravil aby zobrazoval väčší počet reklám na stránku ako v InLine Ads.
Tu stiahnete Google Adsense in topics
Po nainštalovaní módu ho upravíte ešte následne
vyhladajte {Kód}:  if($i == $ad_after)
{
A nahradíte týmto
A to je všetko  |
|
|
| Návrat nahoru |
|
 |
Blassen
Armádní generál (Admin)


Registrace: 1.1. 1970
Příspěvky: 2140
|
 Zaslal:
st 11. červenec, 2007 16:07 Předmět: |
  |
Výbordeleně.
Jen připomenu že na jedné stránce se stejně nezobrazí více jak 3 reklamy + doporučení a odkazová jednotka. |
_________________ Blassen,
Altruista, Redaktor, Programátor, Designér a Majitel
Hello IT. Have you tried turning it off and on again ? Are you sure it's plugged in ? |
|
| Návrat nahoru |
|
 |
jamaica
Desátník


Registrace: 23.4. 2006
Příspěvky: 33
|
 Zaslal:
so 01. prosinec, 2007 20:26 Předmět: |
  |
Jak nainstaluju ten mod a kam,můžete mi poradit?díky. |
_________________ Bůh odpouští,JÁ NE!!!
www.jptuning.net |
|
| Návrat nahoru |
 |
 |
Inzerce
Sponsor


Registrace: 4.1. 2007 Příspěvky: 143
|
|
 |
Blassen
Armádní generál (Admin)


Registrace: 1.1. 1970
Příspěvky: 2140
|
 Zaslal:
so 01. prosinec, 2007 20:44 Předmět: Google Adsense In Topics |
  |
MOD Name: Google Adsense In Topics
Author: Texan78
MOD Description: This is a nicer and easier way of adding your google adsense after the first post in each thread.
MOD Version: 1.0.0
Installation Level: Easy
Installation Time: 5 Minutes
Download File: Google_Adsense_in_topics_1.0.0
editace se týká: viewtopic.php
{Kód}:  
 #-----[ OPEN ]------------------------------------------
 #
 viewtopic.php
 
 #
 #-----[ FIND ]------------------------------------------
 #
 $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
 $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 
 #
 #-----[ REPLACE WITH ]------------------------------------------
 #
 $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
 $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 $num ++;
 
 #
 #-----[ FIND ]------------------------------------------
 #
 'U_POST_ID' => $postrow[$i]['post_id'])
 );
 
 #
 #-----[ AFTER, ADD ]------------------------------------------
 #
 if($i == $ad_after)
 {
 $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
 $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
 $num ++;
 
 $mini_post_url = append_sid('viewtopic.' . $phpEx . '?' . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#ad';
 $template->assign_block_vars('postrow', array(
 'ROW_COLOR' => '#' . $row_color,
 'ROW_CLASS' => $row_class,
 'POST_DATE' => $post_date,
 'POST_SUBJECT' => 'Advertisement',
 'MINI_POST_IMG' => $mini_post_img,
 'POSTER_NAME' => 'Google',
 'POSTER_RANK' => 'Sponsor',
 'POSTER_AVATAR' => '<img src="images/google_avatar.gif" alt=""/>',
 'MESSAGE' => '<div align="center">YOUR ADSENSE CODE HERE</div>',
 'L_MINI_POST_ALT' => $mini_post_alt,
 'U_MINI_POST' => $mini_post_url,
 'U_POST_ID' => 'ad')
 );
 }
 
 #
 #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
 #
  |
_________________ Blassen,
Altruista, Redaktor, Programátor, Designér a Majitel
Hello IT. Have you tried turning it off and on again ? Are you sure it's plugged in ? |
|
| Návrat nahoru |
|
 |
jamaica
Desátník


Registrace: 23.4. 2006
Příspěvky: 33
|
 Zaslal:
so 01. prosinec, 2007 20:50 Předmět: |
  |
Mno tak sem tomu s prominutím hovno rozuměl Upravenej ten soubor ke stažení by nebyl, pro lamu?Pochopil sem že to sou úpravy, ale nepobral sem co kam a jak. |
_________________ Bůh odpouští,JÁ NE!!!
www.jptuning.net |
|
| Návrat nahoru |
 |
 |
Blassen
Armádní generál (Admin)


Registrace: 1.1. 1970
Příspěvky: 2140
|
 Zaslal:
so 01. prosinec, 2007 21:03 Předmět: Google Adsense In Topics pro fórum do United-Nuke |
  |
jamaica napsal:
Mno tak sem tomu s prominutím hovno rozuměl Upravenej ten soubor ke stažení by nebyl, pro lamu?Pochopil sem že to sou úpravy, ale nepobral sem co kam a jak.
No muhehe, OKI
ke konci souboru si uprav tyto řádky dle potřeby:
A tenhle:
{Kód}:    
   
   <?php
   
   /**
   * phpBB module for United-Nuke CMS
   * http://United-Nuke.openland.cz/
   *
   * 2002 - 2005, (c) Jiri Stavinoha
   * http://United-Nuke.openland.cz/weblog/
   *
   * Portions of this software are based on phpBB
   * http://www.phpbb.com - 2001, (c) phpBB Group
   *
   * 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 2
   * of the License, or (at your option) any later version.
   **/
   
   /***************************************************************************
   * viewtopic.php
   * -------------------
   * begin : Saturday, Feb 13, 2001
   * copyright : (C) 2001 The phpBB Group
   * email : support@phpbb.com
   *
   * $Id: viewtopic.php,v 1.186.2.43 2005/07/19 20:01:21 acydburn Exp $
   *
   *
   ***************************************************************************/
   
   /***************************************************************************
   *
   * 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 2 of the License, or
   * (at your option) any later version.
   *
   ***************************************************************************/
   
   if (!stristr($_SERVER['SCRIPT_NAME'], "modules.php") OR !defined('UN_KERNELFILES_LOADED')) {
   die ("You can't access this file directly...");
   }
   
   define('IN_PHPBB', true);
   $phpbb_root_path = 'modules/Forums/';
   include($phpbb_root_path . 'extension.inc');
   include($phpbb_root_path . 'common.'.$phpEx);
   include($phpbb_root_path . './../../includes/bbcode.'.$phpEx);
   
   //
   // Start initial var setup
   //
   $topic_id = $post_id = 0;
   if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) )
   {
   $topic_id = intval($HTTP_GET_VARS[POST_TOPIC_URL]);
   }
   else if ( isset($HTTP_GET_VARS['topic']) )
   {
   $topic_id = intval($HTTP_GET_VARS['topic']);
   }
   
   if ( isset($HTTP_GET_VARS[POST_POST_URL]))
   {
   $post_id = intval($HTTP_GET_VARS[POST_POST_URL]);
   }
   
   
   $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
   $start = ($start < 0) ? 0 : $start;
   
   if (!$topic_id && !$post_id)
   {
   message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
   }
   
   //
   // Find topic id if user requested a newer
   // or older topic
   //
   if ( isset($HTTP_GET_VARS['view']) && empty($HTTP_GET_VARS[POST_POST_URL]) )
   {
   if ( $HTTP_GET_VARS['view'] == 'newest' )
   {
   if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_GET_VARS['sid']) )
   {
   $session_id = isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid'] : $HTTP_GET_VARS['sid'];
   
   if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
   {
   $session_id = '';
   }
   
   if ( $session_id )
   {
   $SQL = "SELECT p.post_id
   FROM " . POSTS_TABLE . " p, " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
   WHERE s.session_id = '$session_id'
   AND u.user_id = s.session_user_id
   AND p.topic_id = $topic_id
   AND p.post_time >= u.user_lastvisit
   ORDER BY p.post_time ASC
   LIMIT 1";
   if ( !($result = $db->sql_query($SQL)) )
   {
   message_die(GENERAL_ERROR, 'Could not obtain newer/older topic information', '', __LINE__, __FILE__, $SQL);
   }
   
   if ( !($row = $db->sql_fetchrow($result)) )
   {
   message_die(GENERAL_MESSAGE, 'No_new_posts_last_visit');
   }
   
   $post_id = $row['post_id'];
   
   if (isset($HTTP_GET_VARS['sid']))
   {
   redirect(append_sid("viewtopic.$phpEx?sid=$session_id&" . POST_POST_URL . "=$post_id#$post_id", true));
   }
   else
   {
   
| |