Difference between revisions of "User:TerryE/phpBB3.0.4 Migration/Detailed Implementation Notes"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Standard NL configuration)
Line 46: Line 46:
 
   includes -> ../../phpBB-common/includes
 
   includes -> ../../phpBB-common/includes
 
   index.php -> ../../phpBB-common/index.php
 
   index.php -> ../../phpBB-common/index.php
   install
+
   install -> ../../phpBB-common/install  (*) only set up for database conversion.
 
   language -> ../../phpBB-common/language
 
   language -> ../../phpBB-common/language
 
   mcp.php -> ../../phpBB-common/mcp.php
 
   mcp.php -> ../../phpBB-common/mcp.php

Revision as of 00:27, 5 May 2009

Detailed Implementation Notes

usOOo server scripts

This script is used to unload the current database

# Dump language schema to TGZ tarball. 
#
# We only have postgres utils v8.1 on the server so wildcards in the pg_dump -t option don't work.
# I will add a case selection to limit the table list for the incremental delta dumps
#
 dump_lang() {
  psql="psql -U ooo_oucv_admin $2"
  tables="`echo \"\d\" | $psql | perl -ne \"/(\w+_${1}_\w+)\s+\| table/ && print \\\$1.' ';\"`"
  for t in $tables; do
    pg_dump -i -U ooo_oucv_admin -x -t $t  -a $2 2> /dev/null
  done
}
# Note that for security reasons these tarballs are deleted after transfer 
backDir=/opt/coolstack/apache2/htdocs/backups
for co in en es fr hu ja vi ; do 
  dump_lang $co en | gzip -c > $backDir/$co.sql.tgz
done
dump_lang zh zh | gzip -c > $backDir/zh.sql.tgz

Standard NL configuration

All instances have the same content and essentially symlink everything but the avatars-load, cache and files directories. This means that all image sets and code changes are common to all versions. This includes the specific changes to the French forum that Bidouille requires (and in fact these are enabled by the existence of a specific match parameter that they use.) This all works because all of the forum configuration (such as the selection of the forum's main logo) is maintained in the forum database, and this database is private to each NL forum. In the same way, the individual styles are cached in the database so the Vietnamese forum can tweak its CSS to remove the underlines from links in the database (this is needed because accents in Vietnamese also lie under the letters and an underline can obscure these changing the meaning of the text).

Hence each forum instance has exactly the same structure, excepting the three content directories:

forum:
  adm
  avatars-upload
  cache
  common.php -> ../../phpBB-common/common.php
  config.php -> ../../phpBB-common/config.php
  cron.php -> ../../phpBB-common/cron.php
  docs -> ../../phpBB-common/docs
  download
  faq.php -> ../../phpBB-common/faq.php
  files
  images -> ../../phpBB-common/images
  includes -> ../../phpBB-common/includes
  index.php -> ../../phpBB-common/index.php
  install -> ../../phpBB-common/install   (*) only set up for database conversion.
  language -> ../../phpBB-common/language
  mcp.php -> ../../phpBB-common/mcp.php
  memberlist.php -> ../../phpBB-common/memberlist.php
  posting.php -> ../../phpBB-common/posting.php
  report.php -> ../../phpBB-common/report.php
  search.php -> ../../phpBB-common/search.php
  store
  style.php -> ../../phpBB-common/style.php
  styles -> ../../phpBB-common/styles
  ucp.php -> ../../phpBB-common/ucp.php
  viewforum.php -> ../../phpBB-common/viewforum.php
  viewonline.php -> ../../phpBB-common/viewonline.php
  viewtopic.php -> ../../phpBB-common/viewtopic.php

forum/adm:
  images -> ../../../phpBB-common/adm/images
  index.php -> ../../../phpBB-common/adm/index.php
  style -> ../../../phpBB-common/adm/style
  swatch.php -> ../../../phpBB-common/adm/swatch.php

forum/avatars-upload:
  <instance specific uploaded avatars go here>

forum/cache:
  index.htm -> ../../../phpBB-common/cache/index.htm
    <instance specific generate cache files go here>

forum/download:
  file.php -> ../../../phpBB-common/download/file.php
  index.htm -> ../../../phpBB-common/download/index.htm

forum/files:
  index.htm -> ../../../phpBB-common/files/index.htm
  <instance specific uploaded attachment files go here>

Even through the databases are private to each forum, I would like to standardise these configurations where possible (for example the list of languages, BBcode extensions, etc.).

Other Notes

Personal tools