SMF Support > SMF 2.0.x Support

How to show ads also on the wap2 and printpage type pages

<< < (2/3) > >>

Arantor:

--- Quote ---really have you disabled them both?
and how?
--- End quote ---

Yes, piece of the proverbial.

To disable WAP, change index.php

--- Code: ---if (!defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));
--- End code ---


--- Code: ---if (!defined('WIRELESS'))
define('WIRELESS', false);
--- End code ---

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: --- 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
--- End code ---


--- Code: ---/* 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'), */
--- End code ---

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)

PersianDeveloper:
thanks
and could this change make  things go wrong while installing or un-installing packages?

Arantor:
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.

mrintech:

--- Quote from: Arantor on July 30, 2012, 02:16:31 PM ---
--- Quote ---really have you disabled them both?
and how?
--- End quote ---

Yes, piece of the proverbial.

To disable WAP, change index.php

--- Code: ---if (!defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));
--- End code ---


--- Code: ---if (!defined('WIRELESS'))
define('WIRELESS', false);
--- End code ---

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: --- 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
--- End code ---


--- Code: ---/* 'print' => array('text' => 'print', 'image' => 'print.gif', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'), */
--- End code ---

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)

--- End quote ---

Thanks a lot :)

Storman™:
Hang on, you're hijacking someones else's thread (from August) with a slightly different issue. You should really start a new topic.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version