phpBBHacks.com - Is there something missing in this section of code?
DeveloperCube, a community for webmasters and web developers
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?    
Is there something missing in this section of code?
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 Portal Support and Discussion
 See a User Guidelines violation? Please contact us.
Author Message

IowaDrift
New User

Joined: 07 Jan 2008
Posts: 6

PostPosted: January 7th 2008, 9:26 pm    Post subject: Is there something missing in this section of code? Reply with quote

I am new to phpBB and was playing around with changing some text. While I was modifying "Welcome to My Community....." I think I may have deleted more than needed. This is our home page to our forums ( http://www.iowadrift.com ) Before we could click on the home link on the forums page and it would link you to our "home" page (portal.php) Now it just directs you back to the iowadrift.com forum main page.

If anyone could guide me as to what I did wrong that would be greatly appreciated.

Code:
/***************************************************************************
*
* Some code in this file I borrowed from the original index.php, Welcome
* Avatar MOD and others...
*
***************************************************************************/

//
// Set configuration for ezPortal
//

// Welcome Text: note that we are in PHP file, so use \' instead of ' and use \\ instead of \ (HTML enabled)
$CFG['welcome_text'] = 'Welcome to <b>My Community</b><br />';

// Number of news on portal
$CFG['number_of_news'] = '5';

// Length of news
$CFG['news_length'] = '200';

// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'
$CFG['news_forum'] = '1';

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
$CFG['poll_forum'] = '1';

//
// END configuration
// --------------------------------------------------------

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'fetchposts.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
Back to top
View user's profile Send private message

Katarina
Well Known User

Joined: 07 Nov 2007
Posts: 125

PostPosted: January 8th 2008, 10:51 am    Post subject: Reply with quote

This is what I have after that:

Code:
//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
   $l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
   $l_total_post_s = $lang['Posted_article_total'];
}
else
{
   $l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
   $l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
   $l_total_user_s = $lang['Registered_user_total'];
}
else
{
   $l_total_user_s = $lang['Registered_users_total'];
}

// Read Portal Configuration from DB
define('PORTAL_TABLE', $table_prefix.'portal');

$CFG = array();
$sql = "SELECT * FROM " . PORTAL_TABLE;

if( !($result = $db->sql_query($sql)) )
{
   message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
   $CFG[$row['portal_name']] = $row['portal_value'];
}


if( $userdata['session_logged_in'] )
{
   $sql = "SELECT COUNT(post_id) as total
         FROM " . POSTS_TABLE . "
         WHERE post_time >= " . $userdata['user_lastvisit'];
   $result = $db->sql_query($sql);
   if( $result )
   {
      $row = $db->sql_fetchrow($result);
      $lang['Search_new'] = $lang['Search_new'] . "&nbsp;(" . $row['total'] . ")";
   }
}

//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Home'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
   'body' => 'portal_body.tpl')
);

//
// Avatar On Index MOD
//
$avatar_img = '';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
   switch( $userdata['user_avatar_type'] )
   {
      case USER_AVATAR_UPLOAD:
         $avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
         break;
      case USER_AVATAR_REMOTE:
         $avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
         break;
      case USER_AVATAR_GALLERY:
         $avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
         break;
   }
}
// Check For Anonymous User
if ($userdata['user_id'] != '-1')
{
   $name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile") . '">' . $userdata['username'] . '</a>';
}
else
{
   $name_link = $lang['Guest'];
}
//
// END: Avatar On Index MOD
//


$template->assign_vars(array(
   'WELCOME_TEXT' => $CFG['welcome_text'],
   'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
   'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
   'TOTAL_TOPICS' => sprintf($lang['total_topics'], $total_topics),
   'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
   'L_FORUM' => $lang['Forum'],
   'L_BOARD_NAVIGATION' => $lang['Board_navigation'],
   'L_STATISTICS' => $lang['Statistics'],
   'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
   'L_POSTED' => $lang['Posted'],
   'L_COMMENTS' => $lang['Comments'],
   'L_VIEW_COMMENTS' => $lang['View_comments'],
   'L_POST_COMMENT' => $lang['Post_your_comment'],
   'L_SEND_PASSWORD' => $lang['Forgotten_password'],
   'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
   'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid("profile.$phpEx?mode=register") . '">', '</a>'),
   'L_REMEMBER_ME' => $lang['Remember_me'],
   'L_VIEW_COMPLETE_LIST' => $lang['View_complete_list'],
   'L_POLL' => $lang['Poll'],
   'L_VOTE_BUTTON' => $lang['Vote'],

   // Welcome Avatar
   'L_NAME_WELCOME' => $lang['Welcome'],
   'L_NAME_WELCOME2' => $lang['Welcome2'],
   'U_NAME_LINK' => $name_link,
   'AVATAR_IMG' => $avatar_img)
);

//
// Fetch Posts from Announcements Forum
//
if(!isset($HTTP_GET_VARS['article']))
{
   $template->assign_block_vars('welcome_text', array());

   $fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], $CFG['news_length']);

   for ($i = 0; $i < count($fetchposts); $i++)
   {
      if( $fetchposts[$i]['striped'] == 1 )
      {
         $open_bracket = '[ ';
         $close_bracket = ' ]';
         $read_full = $lang['Read_Full'];
      }
      else
      {
         $open_bracket = '';
         $close_bracket = '';
         $read_full = '';
      }

      $template->assign_block_vars('fetchpost_row', array(
         'TITLE' => $fetchposts[$i]['topic_title'],
         'POSTER' => $fetchposts[$i]['username'],
         'TIME' => $fetchposts[$i]['topic_time'],
         'TEXT' => $fetchposts[$i]['post_text'],
         'REPLIES' => $fetchposts[$i]['topic_replies'],
         'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
         'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&amp;t=' . $fetchposts[$i]['topic_id']),
         'U_READ_FULL' => append_sid('portal.' . $phpEx . '?article=' . $i),
         'L_READ_FULL' => $read_full,
         'OPEN' => $open_bracket,
         'CLOSE' => $close_bracket)
      );
   }
}
else
{
   $fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], 0);

   $i = intval($HTTP_GET_VARS['article']);

   $template->assign_block_vars('fetchpost_row', array(
      'TITLE' => $fetchposts[$i]['topic_title'],
      'POSTER' => $fetchposts[$i]['username'],
      'TIME' => $fetchposts[$i]['topic_time'],
      'TEXT' => $fetchposts[$i]['post_text'],
      'REPLIES' => $fetchposts[$i]['topic_replies'],
      'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
      'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&amp;t=' . $fetchposts[$i]['topic_id'])
      )
   );
}
//
// END: Fetch Announcements
//

//
// Fetch Poll
//
$fetchpoll = phpbb_fetch_poll($CFG['poll_forum']);

if (!empty($fetchpoll))
{
   $template->assign_vars(array(   
      'S_POLL_QUESTION' => $fetchpoll['vote_text'],
      'S_POLL_ACTION' => append_sid('posting.'.$phpEx.'?'.POST_TOPIC_URL.'='.$fetchpoll['topic_id']),
      'S_TOPIC_ID' => $fetchpoll['topic_id'],
      'L_SUBMIT_VOTE' => $lang['Submit_vote'],
      'L_LOGIN_TO_VOTE' => $lang['Login_to_vote']     
      )
   );

   for ($i = 0; $i < count($fetchpoll['options']); $i++)
   {
      $template->assign_block_vars('poll_option_row', array(
         'OPTION_ID' => $fetchpoll['options'][$i]['vote_option_id'],
         'OPTION_TEXT' => $fetchpoll['options'][$i]['vote_option_text'],
         'VOTE_RESULT' => $fetchpoll['options'][$i]['vote_result'],
         )
      );
   } 
}
else
{
   $template->assign_vars(array(   
      'S_POLL_QUESTION' => $lang['No_poll'],
      'DISABLED' => 'disabled="disabled"'
      )
   );
}

//
// Generate the page
//
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>

_________________
My Mommy Site
Back to top
View user's profile Send private message Visit poster's website

IowaDrift
New User

Joined: 07 Jan 2008
Posts: 6

PostPosted: January 12th 2008, 5:21 pm    Post subject: Reply with quote

I'm still confused. Perhaps if I input the entire code someone could tell me why the "Home" link on the forums main page won't direct me to my portal.php page.....

Code:
<?php
/***************************************************************************
 *                                portal.php
 *                            -------------------
 *   begin                : Tuesday, August 13, 2002
 *   copyright            : (C) 2002 Smartor
 *   email                : smartor_xp@hotmail.com
 *
 *   $Id: portal.php,v 2.1.7 2003/01/30, 17:05:58 Smartor Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   Some code in this file I borrowed from the original index.php, Welcome
 *   Avatar MOD and others...
 *
 ***************************************************************************/

//
// Set configuration for ezPortal
//

// Welcome Text: note that we are in PHP file, so use \' instead of ' and use \\ instead of \ (HTML enabled)
$CFG['welcome_text'] = 'Welcome to <b>My Community</b><br />';

// Number of news on portal
$CFG['number_of_news'] = '5';

// Length of news
$CFG['news_length'] = '200';

// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'
$CFG['news_forum'] = '1';

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
$CFG['poll_forum'] = '1';

//
// END configuration
// --------------------------------------------------------

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'fetchposts.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
   $l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
   $l_total_post_s = $lang['Posted_article_total'];
}
else
{
   $l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
   $l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
   $l_total_user_s = $lang['Registered_user_total'];
}
else
{
   $l_total_user_s = $lang['Registered_users_total'];
}

if( $userdata['session_logged_in'] )
{
   $sql = "SELECT COUNT(post_id) as total
         FROM " . POSTS_TABLE . "
         WHERE post_time >= " . $userdata['user_lastvisit'];
   $result = $db->sql_query($sql);
   if( $result )
   {
      $row = $db->sql_fetchrow($result);
      $lang['Search_new'] = $lang['Search_new'] . "&nbsp;(" . $row['total'] . ")";
   }
}

//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Home'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
   'body' => 'portal_body.tpl')
);

//
// Avatar On Index MOD
//
$avatar_img = '';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
   switch( $userdata['user_avatar_type'] )
   {
      case USER_AVATAR_UPLOAD:
         $avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
         break;
      case USER_AVATAR_REMOTE:
         $avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
         break;
      case USER_AVATAR_GALLERY:
         $avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
         break;
   }
}
// Check For Anonymous User
if ($userdata['user_id'] != '-1')
{
   $name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile") . '">' . $userdata['username'] . '</a>';
}
else
{
   $name_link = $lang['Guest'];
}
//
// END: Avatar On Index MOD
//


$template->assign_vars(array(
   'WELCOME_TEXT' => $CFG['welcome_text'],
   'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
   'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
   'TOTAL_TOPICS' => sprintf($lang['total_topics'], $total_topics),
   'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
   'L_FORUM' => $lang['Forum'],
   'L_BOARD_NAVIGATION' => $lang['Board_navigation'],
   'L_STATISTICS' => $lang['Statistics'],   
   'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
   'L_POSTED' => $lang['Posted'],
   'L_COMMENTS' => $lang['Comments'],
   'L_VIEW_COMMENTS' => $lang['View_comments'],
   'L_POST_COMMENT' => $lang['Post_your_comment'],
   'L_SEND_PASSWORD' => $lang['Forgotten_password'],
   'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
   'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid("profile.$phpEx?mode=register") . '">', '</a>'),
   'L_REMEMBER_ME' => $lang['Remember_me'],
   'L_VIEW_COMPLETE_LIST' => $lang['View_complete_list'],
   'L_POLL' => $lang['Poll'],
   'L_VOTE_BUTTON' => $lang['Vote'],

   // Welcome Avatar
   'L_NAME_WELCOME' => $lang['Welcome'],
   'U_NAME_LINK' => $name_link,
   'AVATAR_IMG' => $avatar_img)
);

//
// Fetch Posts from Announcements Forum
//
if(!isset($HTTP_GET_VARS['article']))
{
   $template->assign_block_vars('welcome_text', array());

   $fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], $CFG['news_length']);

   for ($i = 0; $i < count($fetchposts); $i++)
   {
      if( $fetchposts[$i]['striped'] == 1 )
      {
         $open_bracket = '[ ';
         $close_bracket = ' ]';
         $read_full = $lang['Read_Full'];
      }
      else
      {
         $open_bracket = '';
         $close_bracket = '';
         $read_full = '';
      }

      $template->assign_block_vars('fetchpost_row', array(
         'TITLE' => $fetchposts[$i]['topic_title'],
         'POSTER' => $fetchposts[$i]['username'],
         'TIME' => $fetchposts[$i]['topic_time'],
         'TEXT' => $fetchposts[$i]['post_text'],
         'REPLIES' => $fetchposts[$i]['topic_replies'],
         'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
         'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&amp;t=' . $fetchposts[$i]['topic_id']),
         'U_READ_FULL' => append_sid('portal.' . $phpEx . '?article=' . $i),
         'L_READ_FULL' => $read_full,
         'OPEN' => $open_bracket,
         'CLOSE' => $close_bracket)
      );
   }
}
else
{
   $fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], 0);

   $i = intval($HTTP_GET_VARS['article']);

   $template->assign_block_vars('fetchpost_row', array(
      'TITLE' => $fetchposts[$i]['topic_title'],
      'POSTER' => $fetchposts[$i]['username'],
      'TIME' => $fetchposts[$i]['topic_time'],
      'TEXT' => $fetchposts[$i]['post_text'],
      'REPLIES' => $fetchposts[$i]['topic_replies'],
      'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
      'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&amp;t=' . $fetchposts[$i]['topic_id'])
      )
   );
}
//
// END: Fetch Announcements
//

//
// Fetch Poll
//
$fetchpoll = phpbb_fetch_poll($CFG['poll_forum']);

if (!empty($fetchpoll))
{
   $template->assign_vars(array(      
      'S_POLL_QUESTION' => $fetchpoll['vote_text'],
      'S_POLL_ACTION' => append_sid('posting.'.$phpEx.'?'.POST_TOPIC_URL.'='.$fetchpoll['topic_id']),
      'S_TOPIC_ID' => $fetchpoll['topic_id'],
      'L_SUBMIT_VOTE' => $lang['Submit_vote'],
      'L_LOGIN_TO_VOTE' => $lang['Login_to_vote']      
      )
   );

   for ($i = 0; $i < count($fetchpoll['options']); $i++)
   {
      $template->assign_block_vars('poll_option_row', array(
         'OPTION_ID' => $fetchpoll['options'][$i]['vote_option_id'],
         'OPTION_TEXT' => $fetchpoll['options'][$i]['vote_option_text'],
         'VOTE_RESULT' => $fetchpoll['options'][$i]['vote_result'],
         )
      );
   }   
}
else
{
   $template->assign_vars(array(      
      'S_POLL_QUESTION' => $lang['No_poll'],
      'DISABLED' => 'disabled="disabled"'
      )
   );
}

//
// Generate the page
//
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>


I figured it out. You can lock this thread now. Thank you.
Back to top
View user's profile Send private message

bobsickle
New User

Joined: 22 Feb 2008
Posts: 20

PostPosted: February 22nd 2008, 4:08 pm    Post subject: Reply with quote

This is the documentation with ezPortal, it should tell you what you need to do, and haven't.
Code:
##############################################################
## MOD Title: ezPortal for phpBB 2.0.x
## MOD Author: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
## MOD Description: This Mod explains you how to create a portal for phpBB2 as simple as possible. This MOD is not exactly a full functional portal system (content management system) but it looks like a portal. You should customize/modify/improve it to fit your fantasy ;). It is very EASY to install and very HANDY to modify.
## MOD Version: 2.1.8e
##
## Installation Level: Easy
## Installation Time: 10 minutes
## Files To Edit: login.php
##                includes/page_header.php
##                templates/subSilver/overall_header.tpl
##                language/lang_english/lang_main.php
## Included Files: phpbb_root/portal.php
##                 phpbb_root/fetchposts.php
##                 phpbb_root/templates/subSilver/portal_body.tpl
##                 phpbb_root/images/smartorsite_logo.gif
##
## Generator: MOD Studio [ ModTemplateTools 1.0.2108.38030 ]
##############################################################
## Author Notes:
##
##   Copyright © Smartor, 2002-2004
##
##   For any concerns please contact me or Minc at http://smartor.is-root.com
##
##############################################################
## This MOD is released under the GPL License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## MOD History:
##
## v2.1.8e
##   - Name-Link in the welcome-block resulted in a "hacking-attempt"-message.
##      Code-change see: http://smartor.is-root.com/viewtopic.php?p=77191#77191
##
## v2.1.8d
##   - URL could sometimes not get stripped propperly on the portal, updated fetchposts.php
## v2.1.8c
##   - fixed another typo in portal_body.tpl
##   - made install-file easymod-compatible
## v2.1.8b
##   - fixed my mistakes in portal_body.tpl :(
## v2.1.8a
##   - updated instructions for phpBB 2.0.10
##   - fixed some HTML code (small changes)
## v2.1.8
##   - fixed a bug: disappear 'Read Full'
## v2.1.7
##   - removed 'Read Full' link on short announcements
##   - added a new option 'Exceptional Forums' for Recent Topics Block
##   - added poster name and posted time for Recent Topics Block
##   - added scrolling effect for Recent Topics Block
##   - changed the link on Recent Topics Block to the last post
## v2.1.6
##   - solved some small issues: log in/out, stats, date/time, etc.
##   - made phpBB 2.0.4 compatibled
## v2.1.5
##   - improved some HTML code :P
##   - fixed a serious security bug in Change Style Block
## v2.1.4
##   - fixed Shadow Topic bug (for both News and Recent Topics)
##   - added Search Block: it's very cool, included both phpBB Search and Google
## v2.1.3
##   - just update ChatBox Block instruction file
## v2.1.2
##   - due to some users are not familiar with HTML coding, i provide a new bordered template -looks much better in subSilver- for portal (only HTML thing, no new PHP code)
## v2.1.1
##   - added a missing language entry for Recent Topics Block
## v2.1
##   - added some blocks: Moreover.com Newsfeed, Recent Topics
##   - removed some un-needed HTML codes
##   - fixed some bugs
##   - added "I forgot my password" link
##   - fixed some language hardcode
## v2.0.2
##   - fixed some template problems
## v2.0.1
##   - added a lost language entry
## v2.0.0
##   - completed News Feature
## v1.0.4a
##   - fixed a JavaScript problem in this file
## v1.0.4
##   - updated some blocks
## v1.0.3
##   - Fixed some typos
## v1.0.0
##   - Initial Release
##
##############################################################
##
## Demo/Discussion Forum:        http://smartor.is-root.com
##
## ezPortal FAQ:      http://smartor.is-root.com/viewtopic.php?t=14355
##
## Guides on...
## - How ezPortal works
## - How to move a block
## - How to place a block into the center column ("read-full-style")
## are available at http://www.smartor.oftheweek.de/dload.php?action=category&cat_id=6
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ COPY ]------------------------------------------
#
# copy portal_body.tpl to all installed templates
copy phpbb_root/portal.php to portal.php
copy phpbb_root/fetchposts.php to fetchposts.php
copy phpbb_root/templates/subSilver/portal_body.tpl to templates/subSilver/portal_body.tpl
copy phpbb_root/images/smartorsite_logo.gif to images/smartorsite_logo.gif
#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]------------------------------------------
#
redirect(append_sid("index.$phpEx", true));
#
#-----[ REPLACE WITH ]------------------------------------------
#
redirect(append_sid("portal.$phpEx", true));
#
#-----[ FIND ]------------------------------------------
#
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
#
#-----[ REPLACE WITH ]------------------------------------------
#
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "portal.$phpEx";
#
#-----[ FIND ]------------------------------------------
#
redirect(append_sid("index.$phpEx", true));
#
#-----[ REPLACE WITH ]------------------------------------------
#
redirect(append_sid("portal.$phpEx", true));
#
#-----[ FIND ]------------------------------------------
#
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
#
#-----[ REPLACE WITH ]------------------------------------------
#
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "portal.$phpEx";
#
#-----[ FIND ]------------------------------------------
#
redirect(append_sid("index.$phpEx", true));
#
#-----[ REPLACE WITH ]------------------------------------------
#
redirect(append_sid("portal.$phpEx", true));
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
   // ezPortal
   'U_PORTAL' => append_sid('portal.'.$phpEx),
   'L_HOME' => $lang['Home'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
#
#-----[ REPLACE WITH ]------------------------------------------
#
<td><a href="{U_PORTAL}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
#
#-----[ FIND ]------------------------------------------
#
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;
#
#-----[ IN-LINE FIND ]------------------------------------------
#
&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
 &nbsp;<a href="{U_PORTAL}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{L_HOME}" hspace="3" />{L_HOME}</a>&nbsp;
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#

//
// That's all, Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Smartor's ezPortal
//
$lang['Home'] = 'Home';
$lang['Board_navigation'] = 'Board Navigation';
$lang['Statistics'] = 'Statistics';
$lang['total_topics'] = " within <b>%s</b> topics"; // added in v2.1.6
$lang['Comments'] = 'Comments';
$lang['Read_Full'] = 'Read Full';
$lang['View_comments'] = 'View Comments';
$lang['Post_your_comment'] = 'Post your comment';
$lang['Welcome'] = 'Welcome';
$lang['Register_new_account'] = 'Don\'t have an account yet?<br />You can %sregister%s for FREE';
$lang['Remember_me'] = 'Remember me';
$lang['View_complete_list'] = 'View complete list';
$lang['Poll'] = 'Poll';
$lang['Login_to_vote'] = 'You must login to vote';
$lang['Vote'] = 'Vote';
$lang['No_poll'] = 'No poll at the moment';
#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
HOW TO MAKE YOUR WEBSITE OPEN TO FILE portal.php INSTEAD OF index.php ?
 You can use one of the following methods! Lots of luck!


 o Method 1: (for Apache server)
   create/modify file .htaccess in phpBB root directory
   add/edit this line:

   DirectoryIndex index.html index.htm portal.php index.php


 o Method 2: {use META tag - if you cannot apply the 1st method)
   create file index.html in phpBB root directory (without #)

   <html>
   <head>
   <title>Redirecting...</title>
   <meta http-equiv="refresh" content="0;url=portal.php">
   </head>
   <body>
   </body>
   </html>

   if your phpBB was placed in a subdirectory to the
   webroot, like: http://something.com/forum
   you could create index.html in the webroot and modify the
   line 4 to <meta http-equiv="refresh" content="0;url=forum/portal.php">


 o Method 3: I think maybe you can find out method 3 yourself ;) like JavaScript, etc.

#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
# CONFIGURATION FOR ezPortal
#
# OPEN: portal.php
#
# FIND:
//
// Set configuration for ezPortal
//

// Welcome Text: note that we are in PHP file, so use \' instead of ' and use \\ instead of \ (HTML enabled)
$CFG['welcome_text'] = 'Welcome to <b>My Community</b><br /><br />Thanks for using ezPortal,<br /><br />Have a good time! ^_^';

// Number of news on portal
$CFG['number_of_news'] = '5';

// Length of news
$CFG['news_length'] = '200';

// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'
$CFG['news_forum'] = '1';

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
$CFG['poll_forum'] = '1';

//
// END configuration
// --------------------------------------------------------
#
# Adjust the above values in portal.php
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Well, for anyone else... damn my eyesight...
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Portal Support and Discussion 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 - phpBB Brasil

Network: iFroggy Network Blog - iFroggy Hosting - SportsForums.net - KarateForums.com - YanksBlog.com - PhotoshopForums.com - DeveloperCube - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.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.