My forum can be accessed by 2 ways :
It changes the site's homeurl depends whether my board is accessed by domain or IP address.
Now i want to use guest full cache, and i made this modification to
Before :
After :
Am i on the correct road?
If so, maybe it should be put on the next vb optimise update?
I think it will help user that has a board that can be accessed from several ways (maybe such as on my situation which is domain & ip address), or just a board that can be accessed from several domains.
Thanks.
- Domain name (e.g. example.com).
- The IP address of that domain name.. (e.g. IP address of example.com which is 1.2.3.4)
It changes the site's homeurl depends whether my board is accessed by domain or IP address.
- If accessed by domain >> homeurl is domain.
- If accessed by IP address >> homeurl is IP address.
Now i want to use guest full cache, and i made this modification to
Code:
/upload/dbtech/vboptimise/includes/class_vboptimise.php
Before :
PHP:
private static function key_guestcache()
{
global $vbulletin, $style;
static $key;
if (!$key)
{
$key = md5(implode('', @array_merge(array(
THIS_SCRIPT,
$_COOKIE[COOKIE_PREFIX . 'userstyleid'],
$_COOKIE[COOKIE_PREFIX . 'languageid'],
$vbulletin->options['styleid'],
((is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8) AND !is_browser('ie', 9) AND !is_browser('ie', 10)) ? 'ie6' : 'other'),
(($vbulletin->mobile_browser OR $vbulletin->mobile_browser_advanced) ? 'mobile' : 'desktop'),
), $_REQUEST)));
}
return $key;
}
After :
PHP:
private static function key_guestcache()
{
global $vbulletin, $style;
static $key;
if (!$key)
{
$key = md5(implode('', @array_merge(array(
$_SERVER['HTTP_HOST'],/* ------------ i added this ------------ */
$_SERVER['SERVER_NAME'],/* ------------ i added this ------------ */
THIS_SCRIPT,
$_COOKIE[COOKIE_PREFIX . 'userstyleid'],
$_COOKIE[COOKIE_PREFIX . 'languageid'],
$vbulletin->options['styleid'],
((is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8) AND !is_browser('ie', 9) AND !is_browser('ie', 10)) ? 'ie6' : 'other'),
(($vbulletin->mobile_browser OR $vbulletin->mobile_browser_advanced) ? 'mobile' : 'desktop'),
), $_REQUEST)));
}
return $key;
}
Am i on the correct road?
If so, maybe it should be put on the next vb optimise update?
I think it will help user that has a board that can be accessed from several ways (maybe such as on my situation which is domain & ip address), or just a board that can be accessed from several domains.
Thanks.
Last edited:
Upvote
0