phpBBHacks.com - phpBB 2 as a Content Management System (CMS)
YanksBlog.com, an unofficial New York Yankees fan blog
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Add Us:     MySpace     Facebook     StumbleUpon
Username:    Password:
Remember Me?    
phpBB 2 as a Content Management System (CMS)
BlinkList
del.icio.us
Furl
linkaGoGo
reddit
Simpy
Mister Wong
Yahoo! My Web

Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Integrating phpBB With Your Website
 See a User Guidelines violation? Please contact us.
Author Message

Coyote
Experienced User

Joined: 08 Dec 2006
Posts: 338

PostPosted: November 10th 2007, 3:43 pm    Post subject: phpBB 2 as a Content Management System (CMS) Reply with quote

This tutorial will show you how to use phpBB 2 as a complete website/content management system (CMS). It will allow you to use IM Portal to add as many pages to your site as you like without having to edit PHP or .tpl files and without needing FTP access. It turns the portal page into the home page and index.php into forums.php. If someone visits your site by typing in the root URL, i.e. http://www.yourdomain.com, it will take them to the home (portal) page without using redirects. Installation will cause EasyMOD to cease to function.

Back up all applicable files before proceeding.

1. Install IM Portal. Skip the file edits for login.php.

Do the following file edits only if you have already installed IM Portal and only if you have already done the file edits for login.php.

Code:
#
#-----[ OPEN ]------------------------------------------
#

login.php

#
#-----[ FIND ]------------------------------------------
#

            redirect(append_sid("portal.$phpEx", true));

#
#-----[ REPLACE WITH ]------------------------------------------
#

            redirect(append_sid("index.$phpEx", true));

#
#-----[ FIND ]------------------------------------------
#

                  $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "portal.$phpEx";

#
#-----[ REPLACE WITH ]------------------------------------------
#

                  $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";

#
#-----[ FIND ]------------------------------------------
#

         redirect(append_sid("portal.$phpEx", true));

#
#-----[ REPLACE WITH ]------------------------------------------
#

         redirect(append_sid("index.$phpEx", true));

#
#-----[ FIND ]------------------------------------------
#

      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "portal.$phpEx";

#
#-----[ REPLACE WITH ]------------------------------------------
#

      $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";

#
#-----[ FIND ]------------------------------------------
#

      redirect(append_sid("portal.$phpEx", true));

#
#-----[ REPLACE WITH ]------------------------------------------
#

      redirect(append_sid("index.$phpEx", true));

#
#-----[ SAVE AND CLOSE ]------------------------------------------
#

2. Change the link to {U_INDEX}.

Code:
#
#-----[ OPEN ]------------------------------------------
#

includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#

   'U_INDEX' => append_sid('index.'.$phpEx),

#
#-----[ REPLACE WITH ]------------------------------------------
#

   'U_INDEX' => append_sid('forums.'.$phpEx),

#
#-----[ SAVE AND CLOSE ]------------------------------------------
#

3. Continue with the file edits below, allowing you to have a separate title for each portal page.

Code:
#
#-----[ OPEN ]------------------------------------------
#

portal.php

#
#-----[ FIND ]------------------------------------------
#

   $sql = "SELECT template, forum_wide, view, groups FROM " . LAYOUT_TABLE . " WHERE lid = '" . $layout . "'";

#
#-----[ INLINE FIND ]------------------------------------------
#

   $sql = "SELECT

#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#make sure there is a space between name, and template,

 name,

#
#-----[ FIND ]------------------------------------------
#

      $sql = "SELECT template, forum_wide FROM " . LAYOUT_TABLE . " WHERE lid = '" . $layout . "'";
 
#
#-----[ INLINE FIND ]------------------------------------------
#

   $sql = "SELECT

#
#-----[ INLINE AFTER, ADD ]------------------------------------------
#make sure there is a space between name, and template,

 name,

#
#-----[ FIND ]------------------------------------------
#

 $page_title = $lang['Home'];

#
#-----[ REPLACE WITH ]------------------------------------------
#

$page_title = !empty($layout_row['name']) ? $layout_row['name'] : $lang['Home'];

#
#-----[ SAVE AND CLOSE ]------------------------------------------
#

4. Rename index.php to forums.php and rename portal.php to index.php.

After you have done so, make these edits to the file:

Code:
After you renamed index.php to forums.php and renamed portal.php to index.php
#
#-----[ OPEN ]------------------------------------------
#

forums.php

#
#-----[ FIND ]------------------------------------------
#

'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))

#
#-----[ REPLACE WITH ]------------------------------------------
#

'U_VIEWCAT' => append_sid("forums.$phpEx?" . POST_CAT_URL . "=$cat_id"))


#
#-----[ SAVE AND CLOSE ]------------------------------------------
#


5. Use the IM Portal manual to learn how to add new portal pages, such as about us, contact, etc. Link to them like so (example):

Code:
<a href="index.php?page=2">About Us</a>

6. Try visiting http://www.yourdomain.com/index.php?page=2.

Optional

7. Install Advanced BBCode Box and Advanced BBCode Box (IM Portal). If you are uncomfortable using HTML, now you can create entire web pages with BBCode!

Note that the title for your home page should now be "IM Portal Default" and will remain that way until you change the page title in Page Management in the ACP.

If you install hacks in the future that require you to edit index.php, remember it is now called forums.php!

Credit for part 3 of the tutorial goes to dcz.
_________________
Free Code Editor | phpBB2 as CMS | My Hacks
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Integrating phpBB With Your Website All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB.it - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl

Network: iFroggy Network Blog - iFroggy Hosting - SportsForums.net - KarateForums.com - YanksBlog.com - DeveloperCube - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - PhotoshopForums.com - MicrosoftBlog.com - DrGregHouse.com - Bad Boy Blog - BadBoyForums.com - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Staff - User Guidelines >

Copyright © 2001-2008. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. Hosted by 100MegsWebHosting. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.