Static Pages Help

iGimp

Paragon
Joined
Apr 28, 2010
Messages
1,060
Reaction score
0
FP$
6
I am trying to install the Static Pages help, i dont know what to do with this
Its SQL
Code:
CREATE TABLE phpbb_pages (
  page_id int(11) unsigned NOT NULL auto_increment,
  page_title varchar(255) character set utf8 collate utf8_unicode_ci NOT NULL,
  page_desc mediumtext character set utf8 collate utf8_bin NOT NULL,
  page_content mediumtext character set utf8 collate utf8_bin NOT NULL,
  page_url varchar(255) character set utf8 collate utf8_bin NOT NULL,
  bbcode_uid varchar(8) character set utf8 collate utf8_bin NOT NULL,
  bbcode_bitfield varchar(255) character set utf8 collate utf8_bin NOT NULL default '',
  page_time int(11) unsigned NOT NULL default '0',
  page_order int(11) unsigned NOT NULL default '0',
  page_display tinyint(1) unsigned NOT NULL default '0',
  page_display_guests tinyint(1) unsigned NOT NULL default '0',
  page_author mediumint(8) unsigned NOT NULL,
  PRIMARY KEY  (page_id)
);

and it says do this to your .htaccess file, where do i find that?
Code:
If you want to use URL rewrites, open your .htaccess file and add this at the end:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9\-\+]+)$ ./page.php?p=$1 [L]

Your pages will be then accessible as yourboard.com/pagename
 
Part 1

You need to run it in phpmyadmin

cPanel ----> phpmyadmin ---> click forum database on the left ----> Click SQL n the top bar ---> In the white box paste the sql stuff in there and click go. Make sure you make a backup of the db before running anything that alters the database

Part 2

Enter file manager. When you click the icon you should get a popup. Select the "show hidden files" option and then in your forums directory you should see an .htaccess file. Edit that and put in the code above into that file.
 
Thanks! Very Helpful!

Edit: I get this error

General Error
SQL ERROR [ mysqli ]

Table 'postfact_ppdb.phpbb_pages' doesn't exist [1146]

SQL

SELECT p.page_id, p.page_title, p.page_desc, p.page_author, p.page_display, p.page_url, u.username, u.user_colour FROM phpbb_pages p, phpbb_users u WHERE u.user_id = p.page_author ORDER BY p.page_order ASC, p.page_id ASC

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/acp/acp_pages.php
LINE: 318
CALL: dbal_mysqli->sql_query()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_pages->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
 
What is the table prefix of your forum tables?

In this line change phpbb_ to the prefix of your forum tables.

Code:
CREATE TABLE phpbb_pages
 
When viewing the database in phpmyadmin you should see all the table names with a prefix like this:
phpbb_acl_groups

phpbb_ is the prefix in this example.
 
Fowler said:
When viewing the database in phpmyadmin you should see all the table names with a prefix like this:
phpbb_acl_groups

phpbb_ is the prefix in this example.

so i create a new table?

with phpbb_pages?

how many fields?
 
No, what is your table prefix? Find it out using the method i mention in the last post.

Once you have found out the table prefix, you can then edit the CREATE TABLE phpbb_pages line of the sql query with the table prefix of your tables.
 
Did you get any errors when you ran the sql query?

If your table prefix is correct and it was successfully ran then it should work.

EDIT: To see if the query ran properly, look in phpmyadmin and see if their is a table called phpbb_pages
 
Back
Top Bottom