1

(15 replies, posted in Supported extensions)

Sorry to bump this thread but I'd rather use the easy option way than dive deep into the code...

2

(15 replies, posted in Supported extensions)

Hi,

Version: 1.1.3

I only want the registered users to access the news. Guests must not be able to view it. Is there somewhere an option for that?

3

(0 replies, posted in Discussions)

Hi,

How can I add a "Show your post" link next to the "New posts - Active topics - Unanswered topics" links?

Thanks elbeko, as you anticipated, it works fine as long as you don't update the admin options.

To avoid this, all values of $pun_config['o_base_url'] have to be changed as well. I noticed that they are stored in the cache/cache_config.php file which, in turn, is generated by the include/cache.php script.

I came up with this little work around that works fine so far:

In include/cache.php, the function generate_config_cache() generates the code that defines the config array $pun_config that is apparently used across all scripts.

// When accessed from the extranet on the external IP 123.123.123.123
$insertBaseUrl='
if (preg_match(\'#123\.123\.123\.123#\', $_SERVER[\'HTTP_REFERER\'])) {
    $pun_config[\'o_base_url\'] = "http://123.123.123.123/forum" ;
}
';

fwrite($fh, '<?php'."\n\n".'define(\'PUN_CONFIG_LOADED\', 1);'."\n\n".'$pun_config = '.var_export($output, true).';'."\n\n$insertBaseUrl\n\n".'?>');

I'll see if it works in all cases.  Thanks for your input anyway.

elbekko wrote:

You could also look into setting up multiple base URLs.

And how and where can I define this?

I just installed PunBB on a intranet. From inside that intranet the forum is accessed with the internal host name. Base URL is that internal host name.

No problem so far, at least locally. But...

As it is an intranet only forum, access is restricted in a .htaccess to the locale IP's (192.168.10.0/8) and to my own external IP.

I can access the forum with it's external IP (no host name, just a fixed IP) but, as soon that I want to do some changes I get the infamous "Bad HTTP_REFERER." message. And I can't use the fixed (external) IP as the access is restricted to the local IP's.

Any work around without removing the base URL protection?