There are some settings in ACP->Extensionsnoth wrote:I hope that would be selectable in ACP, I for one am quite happy with it as it is![]()
There are some settings in ACP->Extensionsnoth wrote:I hope that would be selectable in ACP, I for one am quite happy with it as it is![]()
ext/board3/portal/modules/news.php
Code: Select all
public function get_template_center($module_id)
{
Code: Select all
//limit for guest start
$user_id = $this->user->data['user_id'];
$max = $this->config['lfg_maxtopics'];
$read = $cookie=$this->request->variable($this->config['cookie_name'] . '_cookie_lfg', '', true, \phpbb\request\request_interface::COOKIE);
$cookie = $this->config['lfg_cookie'];
$error_limit_for_guest = $guest = false;
if($cookie==1)
{
$time = strtotime('+1 year');
$guest = $this->user->lang['MAX_GUEST_YEAR'];
}
if($cookie==0)
{
$time = strtotime('+1 day');
$guest = $this->user->lang['MAX_GUEST_DAY'];
}
if($user_id==1)
{
if($read>=$max and $max!=0) //topic finiti
{
$error_limit_for_guest = $guest;
}
}
//limit for guest end
Code: Select all
$folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($fetch_news[$i]['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
Code: Select all
//limit for guest
if($error_limit_for_guest)
{
$fetch_news[$i]['post_text'] = $error_limit_for_guest;
}
I don't understandbennybernaer wrote: But you have so the option: only the first post in a topic that customers can't read. But actually wants it just the other way around.
Guests may only read the first post in a topic. And the other posts in a topic have to be shielded. But apparently this is not possible? Or am I overlooking something?
Yes, but, in my opinion, 80% of web users don't know the mean of cookie and I don't think that they know how to cancel them.bennybernaer wrote: Also called too bad you can bypass it easily with your cookies.
Volksdevil wrote:I think he means (And it does seem to make more sense to me) that the option should be to 'Only show the first post, and hide the rest'.
you're my hero nowBruninoit wrote:Ah yes, good idea. I'll add it in next version.
Can you put it into an extra file for the next releases, please? Because it will be overwritten with every coming update of Board3 portal, if you screw on base code (or you have to do this changes again and again).Bruninoit wrote:Compatibility with Board 3 Portal Extension -> module "last news".
Open fileext/board3/portal/modules/news.php
FindAdd after in new lineCode: Select all
public function get_template_center($module_id) {
Code: Select all
//limit for guest start $user_id = $this->user->data['user_id']; $max = $this->config['lfg_maxtopics']; $read = $cookie=$this->request->variable($this->config['cookie_name'] . '_cookie_lfg', '', true, \phpbb\request\request_interface::COOKIE); $cookie = $this->config['lfg_cookie']; $error_limit_for_guest = $guest = false; if($cookie==1) { $time = strtotime('+1 year'); $guest = $this->user->lang['MAX_GUEST_YEAR']; } if($cookie==0) { $time = strtotime('+1 day'); $guest = $this->user->lang['MAX_GUEST_DAY']; } if($user_id==1) { if($read>=$max and $max!=0) //topic finiti { $error_limit_for_guest = $guest; } } //limit for guest end
SearchAdd after in new lineCode: Select all
$folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($fetch_news[$i]['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
Code: Select all
//limit for guest if($error_limit_for_guest) { $fetch_news[$i]['post_text'] = $error_limit_for_guest; }
New version RC3 with this feature.bennybernaer wrote:Volksdevil wrote:I think he means (And it does seem to make more sense to me) that the option should be to 'Only show the first post, and hide the rest'.
Exactly!
If this is not possible?
Something like this: https://www.phpbb.com/customise/db/mod/ ... _to_guest/