Ishimaru-Design > Home > Tutorials > phpBB3 > [General] Edit a style - Good habits

[phpBB3] [General] Edit a style - Good habits

  • Author : Ishimaru Chiaki
  • Posted on : 2013-10-24 04:51:00
  • Updated on : 2013-10-24 04:51:00
  • Comments : 0
  • Type : Tip
  • Level : Newbie

We often see new phpBB users trying to modify a style then they lose their modifications when they refresh it.  This issue is caused by common bad habit.  This tutorial will show you how to edit your styles properly.


  1. How to edit your styles properly

How to edit your styles properly

You downloaded one of my styles and you'd like to modify it ?  No problem, as long as you keep the copyright line containing my name.  However, you can add an extra line stating that you modified it.

Whatever it's on phpBB-fr, on, here or by email, I regularly notice cases of modification issues caused by bad habits.

A common issue

Since one part of the phpBB3 users come from free forum services such as ForuMotion or FreeForums where we could edit our styles only via the ACP, we regularly see cases where users tried to modify their styles with the ACP's theme editor and then, they refreshed their styles and lost their modifications.

The solution

Even if it means that you have to refresh the style everytime you modify it, I always recommend to do all modifications directly in the files with a text editor such as Notepad++ (Win) or gedit/kate (Linux) !

This way, you won't have these issues in the future.

A bonus tip

Even if you modify the files directly, it is possible to not need to refresh the theme, by using a function in the ACP.

For this, you go to the General tab, then in Load settings in the Server configuration menu, then you set Recompile stale style components to Yes.

This is very practical for CSS modification. smile

What can I do if I already modified via the ACP ?

For those who did a lot of modifications in the ACP, it isn't so evident to transfer the modifications, particularly if phpBB3 updates or MOD installation were done in the meantime.  So I give you this tip to ensure a safe transfer to files,  without modification loss.

For this, copy all codes of each equivalent of your files (colours.css, content.css, common.css, ...) to backup files that you'll have created with your text-editor, then give each of them a name that correspond to each file.  For example, colours-bak.css that'll correspond to colours.css

Then, if it isn't already done, install WinMerge if you're on Windows, so you can compare files.  Then use this tool in order to view changes between the backups and the files.  This way, you'll ensure to not do a mistake while transferring the modifications.

For Linux users, you can use the diff command or install a graphical utility such as tkdiff or meld (they're both available in your distro's package manager) in order to compare your files. Personally, I recommend Meld, for it can compare folders, and it even allow triple comparison.

In phpBB's future versions

Take knowledge that from the 3.1 Ascraeus branch, the database storage of style infos and so, the theme editor in the ACP will be removed.  So, it's one more reason to edit directly your files with a text editor !