Adult Script Pro Community Forums

Create, help and share your ideas with the community!

You are not logged in.

#1 2017-03-08 20:32:21

DuttyRock
Member
Registered: 2011-11-05
Posts: 736

Mobile photo

So i just don't like the mobile photo for this script.

How can i force to desktop photo when someone click the mobile photo? When you click m.mysite.com/photo/ you will get www.mysite.com/photo/

The other parts of the mobile site is fine, i just want to force the desktop photo in replace of mobile photo.

Last edited by DuttyRock (2017-03-08 20:33:22)

Offline

#2 2017-03-09 09:27:18

symtab
Administrator
Registered: 2010-08-23
Posts: 7,326
Website

Re: Mobile photo

you edit path/to/script/mobile/templates/default/extend/plugins/menu_main.tpl.php and add:

        if ($link['link'] == '/photo/') {
          $url  = BASE_URL.'/photo/';
        }

after:

$url    = ($link['type'] == 'int') ? MOBILE_REL.$link['link'] : $link['link'];

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

#3 2017-03-09 17:35:49

DuttyRock
Member
Registered: 2011-11-05
Posts: 736

Re: Mobile photo

Only see menu_main.plugin.tpl.php

<?php
defined('_VALID') or die('Restricted Access!');
function template_plugin_menu_main($current=FALSE)
{
	$cache = VF::factory('cache');
	if (!$links = $cache->get('mobile_main_links', 0)) {
		$db = VF::factory('database');
		$db->query("SELECT l.name, l.title, l.link, l.type, l.target, l.lang, l.current
		            FROM #__menu_links AS l, #__menu AS m
					WHERE m.name = 'mobile_main'
					AND l.menu_id = m.menu_id
					AND l.status = '1'
					ORDER BY l.pos ASC");
		if ($db->affected_rows()) {
			$links	= $db->fetch_rows();
			$cache->store('mobile_main_links', $links, 0);
		} else {
			$links	= array();
		}
	}
	
	$lang	= VLanguage::get('language');
	$menu 	= array();
	foreach ($links as $link) {
		$url	= ($link['type'] == 'int') ? MOBILE_REL.$link['link'] : $link['link'];
	if ($link['link'] == '/photo/') {           $url  = BASE_URL.'/photo/';    }	$rel	= ' rel="external"';
		$active	= ($link['current'] == $current) ? ' class="ui-btn-active"' : '';
		$name	= ($lang == 'en-US') ? $link['name'] : __($link['lang']);
		$menu[]	= '<li><a href="'.$url.'"'.$active.$rel.'>'.htmlspecialchars($name, ENT_QUOTES, 'UTF-8').'</a></li>';
	}
		
	return implode("\n", $menu);
}
?>

Offline

#4 2017-03-09 20:58:25

symtab
Administrator
Registered: 2010-08-23
Posts: 7,326
Website

Re: Mobile photo

Yeah...and it doesnt work?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

#5 2017-03-10 07:23:58

symtab
Administrator
Registered: 2010-08-23
Posts: 7,326
Website

Re: Mobile photo

You want to redirect the url. I thaught you only want to change the menu entry. I do not recommend this...google will not like it.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

#6 2017-03-13 05:04:51

DuttyRock
Member
Registered: 2011-11-05
Posts: 736

Re: Mobile photo

So does google like the redirect option you use in the mobile module?

Isn't there a safer way to direct based on resolution size rather than redirect?

Offline

#7 2017-03-13 07:39:23

symtab
Administrator
Registered: 2010-08-23
Posts: 7,326
Website

Re: Mobile photo

Yes, google likes the redirect i do in the mobile module, because its one of the recommended methods to serve content to both mobile and desktop users. They have this detailed on the google webmasters blog. If they wouldnt like it, you would not get visitors from google to both your mobile and desktop sites.

The safest method would be to have someone re-design the parts that you dont like. So you wont need to redirect, but you can still display the photo module the way you like it.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

#8 2017-03-15 20:34:49

DuttyRock
Member
Registered: 2011-11-05
Posts: 736

Re: Mobile photo

okay, guess the redesign is the best option as i don't think i will upgrade the script for this site.

Offline

#9 2017-03-16 06:58:09

symtab
Administrator
Registered: 2010-08-23
Posts: 7,326
Website

Re: Mobile photo

Yes, i saw you have several modifications done! Maybe you will like 3.x and upgrade at that point.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

Board footer

Powered by FluxBB