Differences

This shows you the differences between the selected revision and the current version of the page.

punbb13:faq 2009/02/17 04:26 punbb13:faq 2020/02/06 11:04 current
Line 1: Line 1:
-====== PunBB 1.3 Frequently Asked Questions ====== +Moved to 
-If you don't find the answer to your question here (or it doesn't work for you) and [[http://punbb.informer.com/forums/search/|PunBB Forums search]] results nothing, then you should [[http://punbb.informer.com/forums/new/topic/64/|create new topic]] in [[http://punbb.informer.com/forums/forum/64/punbb-13-troubleshooting/|PunBB 1.3 troubleshooting forum]]. +  * [[punbb13:Installation]] 
- +  * [[punbb13:Integration]]
- +
-===== Installation ===== +
-==== Requirements ==== +
-  * A webserver (preferably [[http://apache.org/|Apache]]). +
-  * [[http://php.net/|PHP]] 4.3.0 or later (PHP 5 included). +
-  * A database where forum data is to be stored: [[http://mysql.com/|MySQL]] 4.1.2 or later, [[http://postgresql.org/|PostgreSQL]] 7.0 or later or [[http://sqlite.org/|SQLite]] 2 (SQLite 3 is not supported). +
- +
-==== Steps to install PunBB 1.3 ==== +
-  - [[:downloads|Download]] the latest revision of [[start|PunBB 1.3]]. +
-  - Copy/upload all contents of the archive into the directory served by your web server (e.g. ''/home/user/example.com/punbb/''). +
-  - Open forum index (e.g. ''http://example.com/forum/index.php'' in your browser) and follow the instructions. +
- +
-See also: [[http://punbb.informer.com/forums/post/119289/#p119289|Steps to getting PunBB 1.3 to work on SourceForge.net]]. +
-===== Extension installation ===== +
-  - Download an extension archive from [[http://punbb.informer.com/extensions/|the PunBB extensions repository]] or other place. Extract it into your forum’s extensions directory. E.g. your forum root is ''/home/user/example.com/punbb/'' and you download ''pun_bbcode'' extension. To install the extension the file ''/home/user/example.com/punbb/extensions/pun_bbcode/manifest.xml'' should exist. +
-  - Log into the forum and go to Administration => Extensions (''http://example.com/punbb/admin/extensions.php?section=install''). The downloaded extension should be listed there. +
-  - Click the ''Install extension'' and follow instructions. +
- +
-| NOTE: You may use the [[pun_admin_repository|pun_admin_repository extension]] to download and install extension with one click. | +
- +
-===== Differences from PunBB 1.2 ===== +
-FIXME To be done. +
- +
-===== Migration from PunBB 1.2 ===== +
-Follow these instructions to migrate from your current PunBB 1.2.* installation to 1.3. +
- +
-| **NOTE**: Make a backup of your current forum directory before proceeding. Also, don't forget to make a backup of your forum database. Use the tool ''mysqldump'' for MySQL and ''pg_dump'' if you are using PostgreSQL. If you're using SQLite, just make a backup copy of the SQLite database file. You can also make database backups via most administration tools such as [[http://mysql.com/products/tools/administrator/|MySQL Administrator]], [[http://phpmyadmin.net/|phpMyAdmin]] and [[http://phppgadmin.sourceforge.net/|phpPgAdmin]]. | +
- +
-  - [[downloads|Download PunBB 1.3]] and extract the archive on your hard disk. +
-  - Replace your old 1.2 directory with the contents of the 1.3 archive. Keep old ''config.php'' and ''img/avatars'' dir. E.g. if you have 1.2 installed into ''www/punbb/'' and forum URL is ''http://example.com/punbb/''. You may use the next steps: +
-    - Rename old ''www/punbb/'' to ''www/punbb_old/'' +
-    - Create new directory ''www/punbb/'' and put PunBB 1.3 there. +
-    - Copy ''/www/punbb_old/config.php'' to new ''www/punbb/'' and  ''/www/punbb_old/img/avatars'' to ''/www/punbb/img/avatars''. +
-  - Open forum index and follow instructions. +
- +
-===== Integration ===== +
-FIXME What should be said right here? +
- +
-See [[integration|PunBB 1.3 integration]] for details. +
- +
-===== URL schemes ===== +
-PunBB 1.3 natively supports URL rewriting, including SEF URLs. +
- +
-==== How to enable URL rewriting ==== +
-  - Rename file ''.htaccess.dist'' in the root of your forum to ''.htaccess''. +
-  - Go to Administration => Settings (''/admin/settings.php?section=setup''), find ''URL Scheme'' section there. +
-  - Choose the URL scheme you like and save changes. +
- +
-===== Database helpers ===== +
-On ''include/common.php'' inclusion, the proper implementation of [[database layer]] class is being also included according to forum configuration. +
-An instance of this database layer named ''$forum_db'' is being created in global scope to provide [[database helpers]]. +
- +
-==== How to perform a query ==== +
-  * Direct query. You can simply write an SQL-statement and execute it. +
-<code php> $result = $forum_db->query('SELECT * FROM topics WHERE id = 10');</code> +
-Be sure, that your SQL code is cross-compatible with all database engines supported by PunBB. +
-  * Using [[query builder]]. You may transparently build database queries. All the specific of database engines and database structure will automatically be taken in account. Example of usage (FIXME make it more informative): +
-<code php>$query = array( +
-  'SELECT'  => '*', +
-  'FROM'    => 'topics', +
-  'WHERE'  => 'id = 10' +
-); +
-$result = $forum_db->query_build($query); +
-</code> +
-See [[query builder]] page for details. +
-==== How to work with query results ==== +
-For example, we have this query: +
-<code php> +
-  $query = array( +
-    'SELECT' => 't.id, t.poster, t.subject, t.posted', +
-    'FROM'  => 'topics AS t', +
-    'WHERE'  => 't.forum_id = 1' +
-  ); +
-  $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); +
-</code> +
-  * To know how many rows this query returns, use this: +
-<code php> +
-  $forum_db->num_rows($result); +
-</code> +
-  * To fetch the current row to associative array: +
-<code php> +
-  $data = $forum_db->fetch_assoc($result); +
-  //An example of getting topic_id +
-  $topic_id = $data['id']; +
-</code> +
-  * To fetch the current row to numeric array: +
-<code php> +
-  $data = $forum_db->fetch_row($result); +
-  //An example of getting topic_id +
-  $topic_id = $data[0]; +
-</code> +
-  * To fetch only some values from the current row: +
-<code php> +
-  //This code will fetch only the topic id and the topic subject +
-  list($id,, $subject,) = $forum_db->fetch_row($result); +
-</code> +
-  * To process all rows in a set you can use this code: +
-<code php> +
-  while ($cur_row = $forum_db->fetch_assoc($result)) +
-  { +
-    //Actions with $cur_row +
-  } +
-</code> +
- +
-===== Template customization ===== +
-==== How to include my file into *.tpl? ==== +
-Use the ''forum_include "file.ext"'' substitute to include the file ''<FORUM_ROOT>/include/user/file.ext'': +
-<code php><!-- forum_include "file.ext" --></code>+

Personal Tools