2
#1
AutoMOD for phpBB 3.1
Posted October 31st 2014, 9:22pm
I promised something interesting after phpBB 3.1 was released, and here it is:

automod-3.1.2.zip
AutoMOD for phpBB 3.1 v3.1.2
54 previous downloads
235.38 KiB  |  Downloaded 2665 times

This is the same AutoMOD package for phpBB 3.0.12, modified to work with phpBB 3.1, and with a couple bugs in AutoMOD fixed in the process. Installation is exactly as in phpBB 3.0.12. Follow the official instructions:

https://www.phpbb.com/customise/db/offi ... od/faq/786

and you will have your very own version of AutoMOD installed on phpBB 3.1!

I have only done cursory checking, but about 1/3 of the "unofficial" MODs (the best ones, IMO) could be installed into phpBB 3.1. The others can (and usually do) result in a crashed site. Keep in mind the words of Voltaire (and Peter Parker's Uncle Ben): with great power comes great responsibility.

Enjoy! :D



New version (3.1.2) uploaded that stops brain-dead MODs from overwriting AutoMOD files. See post #9 for more details.
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
AutoMOD for phpBB 3.1
Posted November 14th 2014, 10:06pm
Wait, but why would there be a need for AutoMod for 3.1? Extensions are much easier to install not to mention there is an extension called "Upload Extensions" that make installing even easier.

Oh, unless you use Automod for installing the mods that work on 3.1...? Never mind then.
φ
Posts: 103
Joined: July 19th 2012, 8:17pm
Location: Pennsylvania
Likes Given: 9
Likes Received: 8
AutoMOD for phpBB 3.1
Posted November 15th 2014, 1:27am
There is a need for AutoMOD because the core hook system in phpBB 3.1 will make it impossible to create the entry points needed for many 3.0.x MODs. A good example would be the registration process; try to find 3.1 extensions that have the same functions/capabilities as 3.0.x registration MODs.

It boils down to this: If a MOD altered code in 3.0.x, chances are slim that it can be converted to a 3.1 extension. That could change if the core hook system was rewritten, but some folks would need to set their egos aside to allow that to be done. Will it happen? Time will tell.

You are the first person I've encountered that felt 3.1 extensions were easier to install than 3.0.x MODs.
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
AutoMOD for phpBB 3.1
Posted November 16th 2014, 7:10pm
Well, they are easier to install. All you do is upload them via FTP, right? With MODs, they usually require edits to the core even if Automod makes it easier. However, there are a lot more MODs than extensions, and I still prefer MODs because of that (there are a ton of MODs which still have yet to be converted into an extension. I am in no rush to update my board to 3.1). Not to mention you can easily customize MODs to fit your own needs, and when updating you can ensure no changes you made are lost. With extensions that's not the case, since when you update you delete the files then upload the new ones.

Just my two cents
φ
Posts: 103
Joined: July 19th 2012, 8:17pm
Location: Pennsylvania
Likes Given: 9
Likes Received: 8
1
#5
AutoMOD for phpBB 3.1
Posted November 18th 2014, 1:20pm
You know when they say a picture is worth more than a 1000 words?

Hint: look at the number 4 and 603. That would be phpBB 3.1 and phpBB 3.0.12

Image
φ
Posts: 1
Joined: November 18th 2014, 12:53pm
Likes Given: 3
Likes Received: 1
1
#6
AutoMOD for phpBB 3.1
Posted November 18th 2014, 3:06pm
One could also note the large disparity in styles and language packs, but I'm sure 3.1 will start to catch up to 3.0. It's extremely unlikely, though, that 3.1 will come close to equaling the numbers of 3.0.

There is another issue which has yet to be discussed -- extensions being dependent on styles which implement the correct template events. This will inevitably lead to extensions not working correctly. Why? Because we have the issue that styles cannot be automatically updated; they must be done manually since auto-updates would destroy changes made to the templates. So you are going to have large numbers of 3.1 sites not properly supporting extensions -- even with the base Prosilver theme. This is going to lead to serious problems in the future -- problems much more serious than MODs have with styles, and ones that I'm sure weren't even considered.

Time will tell all. And who knows...maybe there will be an alternative to phpBB 3.1 available in the near future. ;)
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
AutoMOD for phpBB 3.1
Posted December 10th 2014, 1:16pm
Automod installs ok but some mods that require you to run a installer just kicks up an error

Fatal error: Call to undefined method phpbb\template\twig\twig::set_custom_template() in /opt/lampp/htdocs/xxx/umil/umil_frontend.php on line 72

line
$template->set_custom_template($phpbb_root_path . 'umil/style', 'umil');
φ
Posts: 15
Joined: August 4th 2012, 3:52am
Likes Given: 2
Likes Received: 1
AutoMOD for phpBB 3.1
Posted December 11th 2014, 7:37pm
Sorry for the delay in responding.

The problem is being caused by brain-dead MODs that include UMIL in their package, and an equally-brain-dead AutoMOD that blindly overwrites its own files. My guess is that you've installed such a brain-dead MOD, and it overwrote the UMIL files that I provided.

I know I fixed a couple bugs in AutoMOD. It looks like I need to fix another one. :roll: I'll try to get a fix uploaded this coming weekend.
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
1
#9
AutoMOD for phpBB 3.1
Posted December 14th 2014, 3:54pm
AutoMOD 3.1 has been revised to stop brain-dead MODs from installing their own versions of UMIL. (This is something the "official" version of AutoMOD should do as well...perhaps someone can look at my changes and add them to AutoMOD 1.0.2. :D )
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
AutoMOD for phpBB 3.1
Posted December 15th 2014, 11:38pm
This is pretty sweet idea and crazy to have automod work with 3.1. :)

There isn't much in 3.1 though to convince me to update. Most everything it has as far as features is already possible with 3.0.12. I'll probably just stick to 3.0. for a few more years.
φ
Posts: 22
Joined: February 9th 2013, 6:43pm
Likes Given: 7
Likes Received: 4
AutoMOD for phpBB 3.1
Posted December 16th 2014, 12:37am
Wait about a month, and I'll give you a good reason to never migrate to 3.1. :)

You know, in less than two months, phpBB 3.1 had more security updates than phpBB 3.0 had in seven years. One wonders if the current problems on phpbb.com were caused by yet another security issue in 3.1. Actually I suspect not, unless you consider 3.1 being much easier to DDoS than 3.0 a security issue...
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
AutoMOD for phpBB 3.1
Posted December 17th 2014, 5:28pm
:lol:

hey sounds good, looking forward to see what you have in mind for 3.0.x Been hacking phpbb since 2003 and It's really difficult to get out of wanting full control of customizing VS being told it should be avoided :crazy:

I don't mind Automod but I do like to see how things work, plus doing my own edits can feel rewarding especially since I couldn't write a MOD if my life depended on it!
φ
Posts: 22
Joined: February 9th 2013, 6:43pm
Likes Given: 7
Likes Received: 4
AutoMOD for phpBB 3.1
Posted November 16th 2015, 11:10am
Don't know if I've understand correctly.

Are you saying that with this AutoMOD for 3.1 I can install 3.0.x MODs on a 3.1 installation?

Other question, if this has many bugs fixed from 1.0.2 oficial version, will this Automod work for 3.0.x version as well?

Best Regards
φ
Posts: 14
Joined: November 16th 2015, 9:18am
Likes Given: 5
1
#14
AutoMOD for phpBB 3.1
Posted November 16th 2015, 7:31pm
Yes, the version of AutoMOD available in this topic will let you install 3.0.x MODs in 3.1. Many/most will not work due to the large number of changes between 3.0 and 3.1, but quite a few will work -- or at least they worked for the versions of phpBB 3.1.x I tested. I no longer care enough to test this with new versions, so I have no idea whether the phpBB devs added code to intentionally break it.

The 3.1 version will not work with phpBB 3.0.x...sorry. I could probably document the fixes, though, if someone wanted to do it themselves.
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
AutoMOD for phpBB 3.1
Posted November 19th 2015, 6:34pm
Thanks, I'll test it out. It would be nice to know the few mods that worked with you.
φ
Posts: 14
Joined: November 16th 2015, 9:18am
Likes Given: 5
1
#16
AutoMOD for phpBB 3.1
Posted November 20th 2015, 10:38am
I didn't keep a list because, well, I consider phpBB 3.1 to be a step backwards and don't support backward steps. :)

But in general, MODs that add external programs and do very little code modifying are the ones which have the best chance of working with 3.1. Also, if you come across a MOD that fails due to not being able to edit the Prosilver theme, you can force the install and then manually make the edits in your theme.

Do not force a MOD install if it fails because a core .php file cannot be edited.
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
AutoMOD for phpBB 3.1
Posted February 21st 2016, 6:32pm
Great! This is exactly what phpBB 3.1 needs to be considered complete!
φ
Posts: 280
Joined: October 2nd 2011, 11:00pm
Likes Given: 27
Likes Received: 4
AutoMOD for phpBB 3.1
Posted January 19th 2017, 3:14pm
I tried now to install on a 3.2 version. But I needed to do this change

I've change this line on umil.php:
include($phpbb_root_path . 'phpbb/db/tools.' . $phpEx);
$this->db_tools = new phpbb\db\tools($this->db);


to:
include($phpbb_root_path . 'phpbb/db/tools/tools.' . $phpEx);
$this->db_tools = new phpbb\db\tools\tools($this->db);


The strange is that on the installation its says "Mod Version: 3.1.0" but I've download the 3.1.2.
I guess Dion forgot to edit ./forum/install/install_versions.php
and change the '3.1.0' => array(), to '3.1.2' => array(), :P

Let see if this will in fact work or not xD

EDIT: Ups, it didnt worked:

Fatal error: Call to undefined method acp_modules::update_module_data() in /forum/umil/umil.php on line 1275

Can't solved this one :(
φ
Posts: 14
Joined: November 16th 2015, 9:18am
Likes Given: 5
1
#19
AutoMOD for phpBB 3.1
Posted January 19th 2017, 4:16pm
I believe if you change the following in umil.php:

		if (!class_exists('acp_modules'))
{
include($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);
$user->add_lang('acp/modules');
}
$acp_modules = new acp_modules();

$module_data = array(
'module_enabled' => (isset($data['module_enabled'])) ? $data['module_enabled'] : 1,
'module_display' => (isset($data['module_display'])) ? $data['module_display'] : 1,
'module_basename' => (isset($data['module_basename'])) ? $data['module_basename'] : '',
'module_class' => $class,
'parent_id' => (int) $parent,
'module_langname' => (isset($data['module_langname'])) ? $data['module_langname'] : '',
'module_mode' => (isset($data['module_mode'])) ? $data['module_mode'] : '',
'module_auth' => (isset($data['module_auth'])) ? $data['module_auth'] : '',
);
$result = $acp_modules->update_module_data($module_data, true);

to this:

		global $phpbb_container;
$module_manager = $phpbb_container->get('module.manager');

$module_data = array(
'module_enabled' => (isset($data['module_enabled'])) ? $data['module_enabled'] : 1,
'module_display' => (isset($data['module_display'])) ? $data['module_display'] : 1,
'module_basename' => (isset($data['module_basename'])) ? $data['module_basename'] : '',
'module_class' => $class,
'parent_id' => (int) $parent,
'module_langname' => (isset($data['module_langname'])) ? $data['module_langname'] : '',
'module_mode' => (isset($data['module_mode'])) ? $data['module_mode'] : '',
'module_auth' => (isset($data['module_auth'])) ? $data['module_auth'] : '',
);
$result = $module_manager->update_module_data($module_data, true);

the error will go away.
φ
Posts: 1599
Joined: March 12th 2009, 11:00pm
Location: Uncertain due to momentum
Likes Given: 26
Likes Received: 357
AutoMOD for phpBB 3.1
Posted January 19th 2017, 4:41pm
Yup, but new error ^^' the functions_install doesn't exist no more:

[phpBB Debug] PHP Warning: in file [ROOT]/umil/umil.php on line 2145: include(../includes/functions_install.php): failed to open stream: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/umil/umil.php on line 2145: include(../includes/functions_install.php): failed to open stream: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/umil/umil.php on line 2145: include(): Failed opening '../includes/functions_install.php' for inclusion (include_path='.:/usr/local/php5.6/lib/php')

Fatal error: Call to undefined function get_available_dbms() in /forum/umil/umil.php on line 2159
φ
Posts: 14
Joined: November 16th 2015, 9:18am
Likes Given: 5

Who is online

Users browsing this forum: No registered users and 0 guests