This section contains detailed articles elaborating on some of the common issues phpBB users encounter while using the product. Articles submitted by members of the community are checked for accuracy by the relevant phpBB Team. If you do not find the answer to your question here, we recommend looking through the Support Section as well as using the Site Wide Search.

Creating custom autoupdate packages

Description: This article generally covers two issues: 1) How to automatically update custom localization packages. 2) How to automatically update custom styles.

In Categories:

Link to this article: Select All
[url=https://www.phpbb.com/support/docs/en/3.0/kb/article/creating-custom-autoupdate-packages/]Knowledge Base - Creating custom autoupdate packages[/url]

Automatic update package structure
First of all, let's take a look at the automatic update package structure.

  • docs - documentation directory, it is not used for update process.
  • install - general update scripts directory:
    • update - special update scripts directory. Includes list of files to be updated as well as files packages to perform update:
      • new - directory which includes files from the version you're updating to in according to the files list to be updated.
      • old - directory which includes files from the version you're updating from in according to the files list to be updated (old and new files lists are similar).
      • index.php - list of files to be updated.
    • database_update.php - database update script.
    • index.php, install_main.php, install_update.php, phpinfo.php - scripts to perform update procedures.

List of files to be updated
As it was mentioned above, we have a list of files to be updated. It's different for every particular autoupdate package and depends on which files were changed from version the package updates from, to version the package updates to. Let's take phpBB-3.0.7-PL1_to_3.0.8 as an example.
So, you have downloaded automatic update package you need (phpBB-3.0.7-PL1_to_3.0.8 for example) from the download page.
After you extract the archive you'll find files and folders inside as described above.
Within the extracted autoupdate package, change directory to /install/update and find the file index.php. It contains complete list of files to be updated. Please make sure you didn't confuse it with index.php which is in /install directory ;)
To view and edit the list, open /install/update/index.php with any applicable text editor and take a look at its content (3.0.7PL1 to 3.0.8 as an example):

Code: Select all

// Set update info with file structure to update
$update_info = array(
    
'version'    => array('from' => '3.0.7-PL1''to' => '3.0.8'),
'files'        => array('adm/index.php',
    
'adm/style/acp_ban.html',
    
'adm/style/acp_forums.html',
    
'adm/style/acp_update.html',
    
'adm/style/acp_users_overview.html',
    
'adm/style/acp_users_signature.html',
    
'adm/style/admin.css',
    
'adm/style/captcha_recaptcha.html',
    
'adm/style/editor.js',
    
'adm/style/install_update.html',
    
'adm/style/permission_mask.html',
    
'common.php',
    
'download/file.php',
    
'feed.php',
    
'includes/acm/acm_file.php',
    
'includes/acm/acm_memcache.php',
    
'includes/acm/acm_memory.php',
    
'includes/acp/acp_attachments.php',
    
'includes/acp/acp_ban.php',
    
'includes/acp/acp_board.php',
    
'includes/acp/acp_captcha.php',
    
'includes/acp/acp_database.php',
    
'includes/acp/acp_forums.php',
    
'includes/acp/acp_groups.php',
    
'includes/acp/acp_language.php',
    
'includes/acp/acp_php_info.php',
    
'includes/acp/acp_profile.php',
    
'includes/acp/acp_prune.php',
    
'includes/acp/acp_reasons.php',
    
'includes/acp/acp_styles.php',
    
'includes/acp/acp_update.php',
    
'includes/acp/acp_users.php',
    
'includes/acp/info/acp_board.php',
    
'includes/auth/auth_db.php',
    
'includes/auth/auth_ldap.php',
    
'includes/cache.php',
    
'includes/captcha/plugins/captcha_abstract.php',
    
'includes/captcha/plugins/phpbb_recaptcha_plugin.php',
    
'includes/constants.php',
    
'includes/db/db_tools.php',
    
'includes/db/firebird.php',
    
'includes/db/mssqlnative.php',
    
'includes/db/mssql_odbc.php',
    
'includes/db/mssql.php',
    
'includes/db/mysqli.php',
    
'includes/db/mysql.php',
    
'includes/db/oracle.php',
    
'includes/db/postgres.php',
    
'includes/db/sqlite.php',
    
'includes/functions_admin.php',
    
'includes/functions_compress.php',
    
'includes/functions_convert.php',
    
'includes/functions_display.php',
    
'includes/functions_install.php',
    
'includes/functions_messenger.php',
    
'includes/functions.php',
    
'includes/functions_posting.php',
    
'includes/functions_privmsgs.php',
    
'includes/functions_profile_fields.php',
    
'includes/functions_upload.php',
    
'includes/functions_user.php',
    
'includes/.htaccess',
    
'includes/mcp/mcp_main.php',
    
'includes/mcp/mcp_post.php',
    
'includes/mcp/mcp_queue.php',
    
'includes/mcp/mcp_reports.php',
    
'includes/mcp/mcp_topic.php',
    
'includes/message_parser.php',
    
'includes/search/fulltext_mysql.php',
    
'includes/search/fulltext_native.php',
    
'includes/session.php',
    
'includes/ucp/info/ucp_profile.php',
    
'includes/ucp/ucp_groups.php',
    
'includes/ucp/ucp_main.php',
    
'includes/ucp/ucp_pm_compose.php',
    
'includes/ucp/ucp_pm_viewfolder.php',
    
'includes/ucp/ucp_pm_viewmessage.php',
    
'includes/ucp/ucp_profile.php',
    
'includes/ucp/ucp_register.php',
    
'includes/ucp/ucp_remind.php',
    
'index.php',
    
'language/en/acp/attachments.php',
    
'language/en/acp/board.php',
    
'language/en/acp/common.php',
    
'language/en/acp/search.php',
    
'language/en/acp/styles.php',
    
'language/en/acp/users.php',
    
'language/en/captcha_qa.php',
    
'language/en/captcha_recaptcha.php',
    
'language/en/common.php',
    
'language/en/email/admin_welcome_inactive.txt',
    
'language/en/help_faq.php',
    
'language/en/install.php',
    
'language/en/search.php',
    
'language/en/search_synonyms.php',
    
'language/en/viewforum.php',
    
'memberlist.php',
    
'posting.php',
    
'search.php',
    
'style.php',
    
'styles/prosilver/imageset/imageset.cfg',
    
'styles/prosilver/style.cfg',
    
'styles/prosilver/template/captcha_recaptcha.html',
    
'styles/prosilver/template/editor.js',
    
'styles/prosilver/template/forum_fn.js',
    
'styles/prosilver/template/index_body.html',
    
'styles/prosilver/template/login_body.html',
    
'styles/prosilver/template/mcp_post.html',
    
'styles/prosilver/template/mcp_reports.html',
    
'styles/prosilver/template/overall_header.html',
    
'styles/prosilver/template/posting_buttons.html',
    
'styles/prosilver/template/posting_editor.html',
    
'styles/prosilver/template/posting_topic_review.html',
    
'styles/prosilver/template/quickreply_editor.html',
    
'styles/prosilver/template/search_body.html',
    
'styles/prosilver/template/template.cfg',
    
'styles/prosilver/template/ucp_pm_history.html',
    
'styles/prosilver/template/ucp_pm_viewfolder.html',
    
'styles/prosilver/template/ucp_profile_signature.html',
    
'styles/prosilver/template/viewforum_body.html',
    
'styles/prosilver/theme/bidi.css',
    
'styles/prosilver/theme/content.css',
    
'styles/prosilver/theme/forms.css',
    
'styles/prosilver/theme/print.css',
    
'styles/prosilver/theme/theme.cfg',
    
'styles/subsilver2/imageset/imageset.cfg',
    
'styles/subsilver2/style.cfg',
    
'styles/subsilver2/template/attachment.html',
    
'styles/subsilver2/template/captcha_default.html',
    
'styles/subsilver2/template/captcha_recaptcha.html',
    
'styles/subsilver2/template/editor.js',
    
'styles/subsilver2/template/index_body.html',
    
'styles/subsilver2/template/login_body.html',
    
'styles/subsilver2/template/overall_header.html',
    
'styles/subsilver2/template/posting_body.html',
    
'styles/subsilver2/template/posting_buttons.html',
    
'styles/subsilver2/template/posting_topic_review.html',
    
'styles/subsilver2/template/search_body.html',
    
'styles/subsilver2/template/template.cfg',
    
'styles/subsilver2/template/ucp_pm_history.html',
    
'styles/subsilver2/template/ucp_pm_message_footer.html',
    
'styles/subsilver2/template/ucp_pm_viewfolder.html',
    
'styles/subsilver2/template/ucp_profile_signature.html',
    
'styles/subsilver2/template/viewforum_body.html',
    
'styles/subsilver2/template/viewtopic_body.html',
    
'styles/subsilver2/theme/theme.cfg',
    
'ucp.php',
    
'viewforum.php',
    
'viewtopic.php',
    
'web.config'), 


Adjusting update files list (for custom language)
In the files list, find the part which corresponds to the language files:

Code: Select all

    'language/en/acp/attachments.php',
    
'language/en/acp/board.php',
    
'language/en/acp/common.php',
    
'language/en/acp/search.php',
    
'language/en/acp/styles.php',
    
'language/en/acp/users.php',
    
'language/en/captcha_qa.php',
    
'language/en/captcha_recaptcha.php',
    
'language/en/common.php',
    
'language/en/email/admin_welcome_inactive.txt',
    
'language/en/help_faq.php',
    
'language/en/install.php',
    
'language/en/search.php',
    
'language/en/search_synonyms.php',
    
'language/en/viewforum.php'

Generally, the list of changed files for custom language is similar. Let's presume it is ;)
Now we need to add our custom language files to the list.
Copy the list above to a blank document page in your text editor and (auto)replace /en/ part with your language iso name, for example /de/.
Then append it to the index.php list:

Code: Select all

    'language/en/acp/attachments.php',
    
'language/en/acp/board.php',
    
'language/en/acp/common.php',
    
'language/en/acp/search.php',
    
'language/en/acp/styles.php',
    
'language/en/acp/users.php',
    
'language/en/captcha_qa.php',
    
'language/en/captcha_recaptcha.php',
    
'language/en/common.php',
    
'language/en/email/admin_welcome_inactive.txt',
    
'language/en/help_faq.php',
    
'language/en/install.php',
    
'language/en/search.php',
    
'language/en/search_synonyms.php',
    
'language/en/viewforum.php',
    
'language/de/acp/attachments.php',
    
'language/de/acp/board.php',
    
'language/de/acp/common.php',
    
'language/de/acp/search.php',
    
'language/de/acp/styles.php',
    
'language/de/acp/users.php',
    
'language/de/captcha_qa.php',
    
'language/de/captcha_recaptcha.php',
    
'language/de/common.php',
    
'language/de/email/admin_welcome_inactive.txt',
    
'language/de/help_faq.php',
    
'language/de/install.php',
    
'language/de/search.php',
    
'language/de/search_synonyms.php',
    
'language/de/viewforum.php'

Then save and close the file.
Now you need to provide files for update process. Within autoupdate package enter directory /install/update/new/language/. You can see a folder inside named en. It contains files for English language in according to the list we changed before. Now we have to create a similar folder for our custom (for example, German) language. Create a folder named de in /install/update/new/language/ directory and copy files from original German language pack for phpBB 3.0.8 into it in according to the list of updated files (language pack structure has to be preserved, i.e. if there're files in /de/acp/ folder, then you need to put them into /install/update/new/language/de/acp/ as well).
The same steps are to be applied for the /install/update/old/language/ with the important exception that you have to copy files from original language pack for the version you're updating from (here: 3.0.7PL1).
If you have more custom language packs installed on your board, you can do the steps above for them as well.

Adjusting update files list (for custom styles)
The common idea of preparing update for custom styles is similar to the custom language packs updating.
For styles which are based on subsilver2, you should get the part of the update files list and change it in according to your needs, for example:

Code: Select all

    'styles/subsilver2/imageset/imageset.cfg',
    
'styles/subsilver2/style.cfg',
    
'styles/subsilver2/template/attachment.html',
    
'styles/subsilver2/template/captcha_default.html',
    
'styles/subsilver2/template/captcha_recaptcha.html',
    
'styles/subsilver2/template/editor.js',
    
'styles/subsilver2/template/index_body.html',
    
'styles/subsilver2/template/login_body.html',
    
'styles/subsilver2/template/overall_header.html',
    
'styles/subsilver2/template/posting_body.html',
    
'styles/subsilver2/template/posting_buttons.html',
    
'styles/subsilver2/template/posting_topic_review.html',
    
'styles/subsilver2/template/search_body.html',
    
'styles/subsilver2/template/template.cfg',
    
'styles/subsilver2/template/ucp_pm_history.html',
    
'styles/subsilver2/template/ucp_pm_message_footer.html',
    
'styles/subsilver2/template/ucp_pm_viewfolder.html',
    
'styles/subsilver2/template/ucp_profile_signature.html',
    
'styles/subsilver2/template/viewforum_body.html',
    
'styles/subsilver2/template/viewtopic_body.html',
    
'styles/subsilver2/theme/theme.cfg',
    
'styles/your_subsilver2_based_custom_style/imageset/imageset.cfg',
    
'styles/your_subsilver2_based_custom_style/style.cfg',
    
'styles/your_subsilver2_based_custom_style/template/attachment.html',
    
'styles/your_subsilver2_based_custom_style/template/captcha_default.html',
    
'styles/your_subsilver2_based_custom_style/template/captcha_recaptcha.html',
    
'styles/your_subsilver2_based_custom_style/template/editor.js',
    
'styles/your_subsilver2_based_custom_style/template/index_body.html',
    
'styles/your_subsilver2_based_custom_style/template/login_body.html',
    
'styles/your_subsilver2_based_custom_style/template/overall_header.html',
    
'styles/your_subsilver2_based_custom_style/template/posting_body.html',
    
'styles/your_subsilver2_based_custom_style/template/posting_buttons.html',
    
'styles/your_subsilver2_based_custom_style/template/posting_topic_review.html',
    
'styles/your_subsilver2_based_custom_style/template/search_body.html',
    
'styles/your_subsilver2_based_custom_style/template/template.cfg',
    
'styles/your_subsilver2_based_custom_style/template/ucp_pm_history.html',
    
'styles/your_subsilver2_based_custom_style/template/ucp_pm_message_footer.html',
    
'styles/your_subsilver2_based_custom_style/template/ucp_pm_viewfolder.html',
    
'styles/your_subsilver2_based_custom_style/template/ucp_profile_signature.html',
    
'styles/your_subsilver2_based_custom_style/template/viewforum_body.html',
    
'styles/your_subsilver2_based_custom_style/template/viewtopic_body.html',
    
'styles/your_subsilver2_based_custom_style/theme/theme.cfg'


Same goes to prosilver:

Code: Select all

    'styles/your_prosilver_based_custom_style/imageset/imageset.cfg',
    
'styles/your_prosilver_based_custom_style/style.cfg',
    
'styles/your_prosilver_based_custom_style/template/captcha_recaptcha.html',
    
'styles/your_prosilver_based_custom_style/template/editor.js',
    
'styles/your_prosilver_based_custom_style/template/forum_fn.js',
    
'styles/your_prosilver_based_custom_style/template/index_body.html',
    
'styles/your_prosilver_based_custom_style/template/login_body.html',
    
'styles/your_prosilver_based_custom_style/template/mcp_post.html',
    
'styles/your_prosilver_based_custom_style/template/mcp_reports.html',
    
'styles/your_prosilver_based_custom_style/template/overall_header.html',
    
'styles/your_prosilver_based_custom_style/template/posting_buttons.html',
    
'styles/your_prosilver_based_custom_style/template/posting_editor.html',
    
'styles/your_prosilver_based_custom_style/template/posting_topic_review.html',
    
'styles/your_prosilver_based_custom_style/template/quickreply_editor.html',
    
'styles/your_prosilver_based_custom_style/template/search_body.html',
    
'styles/your_prosilver_based_custom_style/template/template.cfg',
    
'styles/your_prosilver_based_custom_style/template/ucp_pm_history.html',
    
'styles/your_prosilver_based_custom_style/template/ucp_pm_viewfolder.html',
    
'styles/your_prosilver_based_custom_style/template/ucp_profile_signature.html',
    
'styles/your_prosilver_based_custom_style/template/viewforum_body.html',
    
'styles/your_prosilver_based_custom_style/theme/bidi.css',
    
'styles/your_prosilver_based_custom_style/theme/content.css',
    
'styles/your_prosilver_based_custom_style/theme/forms.css',
    
'styles/your_prosilver_based_custom_style/theme/print.css',
    
'styles/your_prosilver_based_custom_style/theme/theme.cfg'

Then do the files copying into /install/update/new/styles/ (from the original custom style package for the version you're updating to) and /install/update/old/styles/ (from the original custom style package for the version you're updating from) directories in according to the list of files to be updated.

Final steps
After you have completed files list adjustment and files copying in according to it, your custom autoupdate package is ready.
Upload it to your server, follow general autoupdate instructions and enjoy the result :)
Don't forget to prepare full scripts and database backup first, as usually.