Просмотр файла Mobile WAP Style.xml

Размер файла: 6.46Kb
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.-->
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD.\nAlthough MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD.\nNo support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.phpbb.com/mods/xml/modx-1.2.6.xsd">
	<header>
		<meta name="generator" content="MODX file generated with PP MODX Creator 1.2.6 by tumba25 (phpBB version)"/>
		<license><![CDATA[http://opensource.org/licenses/gpl-license.php GNU General Public License v2]]></license>
		<title lang="en"><![CDATA[Mobile Wap Style]]></title>
		<description lang="ru"><![CDATA[Мобильный стиль для phpbb3.0.12
Стиль создан максимально облегчённо, что позволяет моментально, без дополнительных задержек грузиться браузером мобильного телефона/opera mini и другими. Отличная индексация поисковыми системами.]]></description>
		<author-notes lang="ru"><![CDATA[Благодарность можете отправлять на webmoney:   R285455511665, Z127145802180]]></author-notes>
		<author-group>
			<author>
				<realname><![CDATA[Анвар Стыбаев]]></realname>
				<username phpbbcom="no"><![CDATA[[email protected]]]></username>
				<homepage><![CDATA[apwa.ru]]></homepage>
				<email><![CDATA[[email protected]]]></email>
			</author>
		</author-group>
		<mod-version>3.0.1</mod-version>
		<installation>
			<level>easy</level>
			<time>300</time>
			<target-version>3.0.12</target-version>
		</installation>
		<history>
			<entry>
				<date>2011-01-31</date>
				<rev-version>1.0.0</rev-version>
				<changelog lang="en">
					<change><![CDATA[http://visavi.net/load/down.php?act=view&id=1318]]></change>
				</changelog>
			</entry>
			<entry>
				<date>2013-07-17</date>
				<rev-version>2.0.0</rev-version>
				<changelog lang="en">
					<change><![CDATA[http://visavi.net/load/down.php?act=view&id=1689]]></change>
				</changelog>
			</entry>
			<entry>
				<date>2013-09-29</date>
				<rev-version>3.0.1</rev-version>
				<changelog lang="en">
					<change><![CDATA[phpbb 3.0.11 update version phpbb 3.0.12]]></change>
				</changelog>
			</entry>
		</history>
		<link-group>
			<link type="contrib" href="contrib/CSS Style Option.xml" lang="en">CSS Style Option</link>
			<link type="contrib" href="contrib/Full Forums.xml" lang="en">Full Forums</link>
		</link-group>
	</header>
	<action-group>
		<copy>
			<file from="root/styles/*" to="styles/*"/>
		</copy>
		<open src="includes/session.php">
			<edit>
				<comment lang="ru"><![CDATA[Авто-определение стиля браузером и переключение стиля:
Узнаём id стиля, для этого заходим в администраторский раздел - Стили - mobile - Пред-просмотр
откроется мобильная версия форума, в адресной строке будет style=2 
Это и есть id стиля, он понадобится ниже если отличается от 2]]></comment>
			</edit>
			<edit>
				<find><![CDATA[if (!empty($_GET['style']) && $auth->acl_get('a_styles') && !defined('ADMIN_START'))]]></find>
			</edit>
			<edit>
				<action type="replace-with"><![CDATA[		// Set mobile style for mobile browsers
		$is_mobile = false;
		
		if (isset($_SERVER['HTTP_ACCEPT'])&&(stristr($_SERVER['HTTP_ACCEPT'],'text/vnd.wap.wml')||stristr($_SERVER['HTTP_ACCEPT'],'application/vnd.wap.xhtml xml'))) 
		{
			$is_mobile = true;
		}
		if (isset($_SERVER['HTTP_X_WAP_PROFILE'])|| isset($_SERVER['HTTP_PROFILE'] )|| isset($_SERVER['X-OperaMini-Features'])|| isset($_SERVER['UA-pixels']))
		{
			$is_mobile = true;
		}
		
		$user_browser = strtolower($this->browser);
		$browsers_array = array('240x320', '320x240', 'alcatel', 'android', 'audiovox', 'au-mic', 'avantgo', 'blackberry', 'blazer', 'cldc', 'compal', 'danger', 'elaine', 'epoc', 'ericsson', 'ericy', 'fennec', 'hiptop', 'ipaq', 'iphone', 'ipod', 'iris', 'j2me', 'kindle', 'lge', 'maemo', 'midp', 'mmp', 'mobile', 'motorola', 'netfront', 'nitro', 'nokia', 'opera mini', 'opera mobi', 'palm', 'panasonic', 'pda', 'philips', 'phone', 'plucker', 'pocket', 'portalmmm', 'psp', 'rover', 'samsung', 'sanyo', 'series60', 'sharp', 'sony', 'symbian', 't-shark', 'treo', 'up.browser', 'up.link', 'vodafone', 'wap', 'webos', 'windows ce', 'wireless', 'xiino/i');
		foreach ($browsers_array as $useragent_match)
		{
			if (strpos($user_browser, $useragent_match) !== false)
			{
				$is_mobile = true;
				break;
			}
		}
		
		if ( $is_mobile )
		{
			$style = 2; // id mobile style (id мобильного стиля)
		}
		
		if (!empty($_GET['style']) && !defined('ADMIN_START'))]]></action>
				<comment lang="ru"><![CDATA[$style = 2; // id mobile style - В этой переменной надо заменить id мобильного стиля на ваш, если он отличается от 2.]]></comment>
			</edit>
		</open>
		<open src="styles/mobile/templates/overall_footer.html">
			<edit>
				<find><![CDATA[</body></html>]]></find>
			</edit>
			<edit>
				<comment lang="en"><![CDATA[?style=1 // id prosilver/web style]]></comment>
				<action type="before-add"><![CDATA[<a href="./?style=1" class="buttom">WEB {L_INDEX}</a>]]></action>
			</edit>
		</open>
		<open src="styles/prosilver/templates/overall_footer.html">
			<edit>
				<find><![CDATA[<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->]]></find>
			</edit>
			<edit>
				<comment lang="en"><![CDATA[?style=2 // id mobile wap style]]></comment>
				<action type="after-add"><![CDATA[<br /><strong><a href="./?style=2">WAP {L_INDEX}</a></strong>]]></action>
			</edit>
		</open>
		<diy-instructions lang="en"><![CDATA[Копирайт можно убрать после отправки 30р. на webmoney R285455511665 с адресом сайта в комментарии
Donate 1$ min webmoney Z127145802180 = Delete copyright overall_footer.html.]]></diy-instructions>
	</action-group>
</mod>