Advertisement:

Author Topic: How to show ads also on the wap2 and printpage type pages  (Read 1404 times)

Offline PersianDeveloper

  • Semi-Newbie
  • *
  • Posts: 97
  • Gender: Male
    • تالار گفتگوی ایرانی ها
How to show ads also on the wap2 and printpage type pages
« on: July 29, 2012, 06:20:47 PM »
actually 2/3 of my forum's visitors are visiting the wap2 and printpage pages
I used to use "Global Headers and Footers" package to show ads on my SMF1 forum and it used to show ads both on the regular and wap pages

but the "Global Headers and Footers" package on SMF2 is not showing ads on wap2 and printpage type pages, accordingly I'm losing $   :(

Offline Storman™

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,424
Re: How to show ads also on the wap2 and printpage type pages
« Reply #1 on: July 30, 2012, 09:07:48 AM »
Quote
actually 2/3 of my forum's visitors are visiting the wap2 and printpage pages

Are u sure ? What makes you say that as I find it highly unlikely. Are you sure it's not search bots influencing those stats ?
Any Backup method is bettter than no Backup method....

Offline PersianDeveloper

  • Semi-Newbie
  • *
  • Posts: 97
  • Gender: Male
    • تالار گفتگوی ایرانی ها
Re: How to show ads also on the wap2 and printpage type pages
« Reply #2 on: July 30, 2012, 12:22:53 PM »
according to the stats page of my PPC provider
the number of hits are almost 1/3 that of I had previously
and the number of clicks is also decreasing, so if the bots were ding that, so who was clicking on the ads?

Offline Arantor

  • SMF Legend
  • *
  • Posts: 50,932
    • wedgebook on Facebook
Re: How to show ads also on the wap2 and printpage type pages
« Reply #3 on: July 30, 2012, 12:24:08 PM »
I think what Storman is saying is that this 2/3 of the forum visitors is likely to be quite heavily to be bots, who wouldn't click ads but would push your figures up.

Personally I just disable both WAP and printpage and be done with it ;)

Offline PersianDeveloper

  • Semi-Newbie
  • *
  • Posts: 97
  • Gender: Male
    • تالار گفتگوی ایرانی ها
Re: How to show ads also on the wap2 and printpage type pages
« Reply #4 on: July 30, 2012, 02:07:56 PM »
really have you disabled them both?
and how?

BTW
what would it show when someone click on a google search result that was previously used to be a WAP page?

Offline Arantor

  • SMF Legend
  • *
  • Posts: 50,932
    • wedgebook on Facebook
Re: How to show ads also on the wap2 and printpage type pages
« Reply #5 on: July 30, 2012, 02:16:31 PM »
Quote
really have you disabled them both?
and how?

Yes, piece of the proverbial.

To disable WAP, change index.php
Code: [Select]
if (!defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));

Code: [Select]
if (!defined('WIRELESS'))
define('WIRELESS', false);

Disabling print page is trivial too. Only takes two changes.
1. Display.template.php - and you'll need to do this in all themes that have their own Display.template.php
Code: [Select]
'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
Code: [Select]
/* 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'), */
Then remove the line from index.php which refers to printpage.


As far as Google results go, I never worried about them, I only ever applied these before the site ever launched, so I never had a duplication problem. In your case, the WAP stuff will just fade out of the index over time because of how it's implemented, the print page will all just refer to the board index, but you can probably fix that in .htaccess rewrite rules (more effort than I can be bothered with right this moment in time)

Offline PersianDeveloper

  • Semi-Newbie
  • *
  • Posts: 97
  • Gender: Male
    • تالار گفتگوی ایرانی ها
Re: How to show ads also on the wap2 and printpage type pages
« Reply #6 on: August 04, 2012, 05:04:56 PM »
thanks
and could this change make  things go wrong while installing or un-installing packages?

Offline Arantor

  • SMF Legend
  • *
  • Posts: 50,932
    • wedgebook on Facebook
Re: How to show ads also on the wap2 and printpage type pages
« Reply #7 on: August 04, 2012, 06:28:02 PM »
If a mod package changes that code, sure it could. Mods that change the code will always rely on the code that they expect to find, there's no way to change that.

Offline mrintech

  • Full Member
  • ***
  • Posts: 415
  • Gender: Male
    • mrinmay.bhattacharjee on Facebook
    • @mrintech on Twitter
Re: How to show ads also on the wap2 and printpage type pages
« Reply #8 on: August 05, 2012, 08:01:47 AM »
Quote
really have you disabled them both?
and how?

Yes, piece of the proverbial.

To disable WAP, change index.php
Code: [Select]
if (!defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));

Code: [Select]
if (!defined('WIRELESS'))
define('WIRELESS', false);

Disabling print page is trivial too. Only takes two changes.
1. Display.template.php - and you'll need to do this in all themes that have their own Display.template.php
Code: [Select]
'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
Code: [Select]
/* 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'), */
Then remove the line from index.php which refers to printpage.


As far as Google results go, I never worried about them, I only ever applied these before the site ever launched, so I never had a duplication problem. In your case, the WAP stuff will just fade out of the index over time because of how it's implemented, the print page will all just refer to the board index, but you can probably fix that in .htaccess rewrite rules (more effort than I can be bothered with right this moment in time)

Thanks a lot :)

Offline Storman™

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,424
Re: How to show ads also on the wap2 and printpage type pages
« Reply #9 on: October 28, 2012, 05:11:16 PM »
Hang on, you're hijacking someones else's thread (from August) with a slightly different issue. You should really start a new topic.
Any Backup method is bettter than no Backup method....

Offline CS Sentinel

  • Semi-Newbie
  • *
  • Posts: 12
Re: How to show ads also on the wap2 and printpage type pages
« Reply #10 on: October 28, 2012, 05:18:23 PM »
Okay I will start a new topic

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 2,087
  • Gender: Male
    • i30 Owners Club
Re: How to show ads also on the wap2 and printpage type pages
« Reply #11 on: October 28, 2012, 05:24:48 PM »
But fair play to you for searching first... something that a lot of members don't bother doing ;)