This board is the new home for david63's extensions.

All of the extensions hosted here will need to be treated as a new install as there is no migration from the original ones to these, and furthermore, no support will be given to migrating to any of these extensions from previous versions.


Due to the selfishness of certain board members it has become necessary to apply a limit of how many downloads each member can make before making a donation. Once a donation has been made then you will have unlimited downloads.

[3.3.0] Log Searches

Fully working extensions
User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

[3.3.0] Log Searches

#1

Post by devspace »

Log Searches:

This extension will add a log of search enquires made.

Compatibility:

Image Image

Image

Notes:

If you are using any other version of this extension then it must be Disabled /Delete data and the original files deleted before installing this version - you will loose all settings.

Features:
  • All searches or only "failed" searches can be logged.
  • The search log can be pruned via a cron job.
Language(s):
  • en
Version:
  • 3.3.0
Installation:
  • Download the latest release and unzip it.
  • Upload the unzipped files to [board root]/ext/devspace/logsearches and enable it in the ACP
Configuration:
  • ACP
  • Extensions
  • Search log
  • Search log options
Useage:
  • ACP
  • Maintenance
  • Forum logs
  • Search log
Extension Download:

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Log Searches

#2

Post by devspace »

Announcements:

Siava
Member
Member
Posts: 3
Joined: January 2023

Re: [3.3.0] Log Searches

#3

Post by Siava »

Thanks for this extension.

phpbb 3.3.9
php 8.0.27
using sphinx search mechanism

Search log page in ACP:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/devspace/logsearches/controller/admin_controller.php on line 287: foreach() argument must be of type array|object, string given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/devspace/logsearches/controller/admin_controller.php on line 287: foreach() argument must be of type array|object, string given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/devspace/logsearches/controller/admin_controller.php on line 287: foreach() argument must be of type array|object, string given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/devspace/logsearches/controller/admin_controller.php on line 287: foreach() argument must be of type array|object, string given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/devspace/logsearches/controller/admin_controller.php on line 287: foreach() argument must be of type array|object, string given
I fixed it (may be not pretty good, but works for me):

find

Code: Select all

	public function get_lang_var($lang_array, $lang_key)
	{
		foreach ($this->language->lang_raw($lang_array) as $key => $data)
		{
			if ($key == $lang_key)
			{
				return $data;
			}
		}
	}
replace with

Code: Select all

	public function get_lang_var($lang_array, $lang_key)
	{
		$langs_var = $this->language->lang_raw($lang_array);
		if (is_array($langs_var))
		{
			foreach ($langs_var as $key => $data)
			{
				if ($key == $lang_key)
				{
					return $data;
				}
			}
		}
	}

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Log Searches

#4

Post by devspace »

Siava wrote: 17 Jan 2023, 13:07
php 8.0.27
I would make guess that it is an issue with PHP 8.0.27 (not tested with that version) which is an unsupported version and only has security releases.

Siava
Member
Member
Posts: 3
Joined: January 2023

Re: [3.3.0] Log Searches

#5

Post by Siava »

With php 8.1.14 the same warning.

User avatar
devspace
Owner
Owner
Posts: 280
Joined: October 2022

Re: [3.3.0] Log Searches

#6

Post by devspace »

Siava wrote: 17 Jan 2023, 14:13
With php 8.1.14 the same warning.
What are you doing when the warning appears?

Are you using the "en" language for this extension or have you translated it?

Siava
Member
Member
Posts: 3
Joined: January 2023

Re: [3.3.0] Log Searches

#7

Post by Siava »

Both using only "en" language and after translate.
I think it is incompatibility with another ext because on clean phpbb I have not seen this warning. If I find it, I'll let you know.

User avatar
Zajsoft
Member
Member
Posts: 4
Joined: October 2022
Location: Czech Republic

Re: [3.3.0] Log Searches

#8

Post by Zajsoft »

Hello,
two little fixes.

ext/devspace/logsearches/config/services.yml

from:
$ext_images_path: '%core.root_path%ext/devspace/download/adm/style/images'

to:
$ext_images_path: '%core.root_path%ext/devspace/logsearches/adm/style/images'


ext/devspace/logsearches/adm/style/logsearches.html

from:
{% include 'overall_footer.html' %}}

to:
{% include 'overall_footer.html' %}