|
|
| Author |
Message |
MsMoni
New User
Joined: 03 Jul 2007
Posts: 2
|
Posted: July 3rd 2007, 5:08 pm Post subject: Need Help with ezPortal Admin for phpBB2 |
|
|
I'm not sure if it is the tutorial I need help with or the portal.php itself. I have been getting a string error any time I tried to change the text of welcome message on the portal page before the ezPortal Admin mod.
I thought I could do it it easily after installing the ezPortal admin. Everything works right except for the Welcome message. I am stuck with this code, I try to change it but it goes back to this code.
| Code:
|
|
<input type="text" maxlength="9999" size="40" name="welcome_text" value=" name="board_msg" rows="10" cols="45">Welcome to <b>My Community</b><br /><br />Thanks for using ezPortal,<br /><br />Have a good time! ^_^<br><br>
|
I've tried to change all of it, part of it, erase it. Still comes back to the above code and won't change AT all.
Please help.
Moni |
|
| Back to top |
|
 |
Ricky_Racer
Support Team

Joined: 19 Jul 2003
Posts: 1425
Location: Middle of Nowhere, USA
|
Posted: July 4th 2007, 8:33 am Post subject: |
|
|
Hopefully this will be of some assistance to you, mine has been tweaked a bit over the years I have been using it.
I my ./admin/admin_portal.php file I have
| Code:
|
'L_WELCOME_TEXT' => $lang['Welcome_Text'],
'L_WELCOME_TEXT_EXPLAIN' => $lang['Welcome_Text_explain'],
|
then a little farther down in the file I have
| Code:
|
|
'WELCOME_TEXT' => $new['welcome_text'],
|
Then in my file ./language/lang_english/lang_admin.php I have
| Code:
|
$lang['Welcome_Text'] = 'Welcome Message';
$lang['Welcome_Text_explain'] = 'Welcome Text: note there is a 9999 character limit';
|
And in /templates/all_named_templates/portal_config_body.tpl I have
| Code:
|
<tr>
<td class="row1" width="38%"><b>{L_WELCOME_TEXT}</b><br /><br /><span class="gensmall">{L_WELCOME_TEXT_EXPLAIN}</span></td>
<td class="row2" width="62%"><textarea input type="text" class="post" maxlength="9999" size="60" name="welcome_text" rows="10" cols="60">{WELCOME_TEXT}</textarea></td>
</tr>
|
Also, when I started using phpBB, there was no such thing as a db_update.php file, only phpMyAdmin, so the sql command I use
| Code:
|
CREATE TABLE phpbb_portal (
portal_name VARCHAR( 255 ) NOT NULL ,
portal_value TEXT NOT NULL ,
PRIMARY KEY ( portal_name )
)TYPE=MyISAM;
INSERT INTO phpbb_portal ( portal_name , portal_value ) VALUES ('welcome_text', 'Welcome to <b>My Community</b><br /><br />Thanks for using ezPortal,<br /><br />Have a good time! ^_^');
INSERT INTO phpbb_portal ( portal_name , portal_value ) VALUES ('number_of_news', '5');
INSERT INTO phpbb_portal ( portal_name , portal_value ) VALUES ('news_length', '200');
INSERT INTO phpbb_portal ( portal_name , portal_value ) VALUES ('news_forum', '1');
INSERT INTO phpbb_portal ( portal_name , portal_value ) VALUES ('poll_forum', '1');
INSERT INTO phpbb_portal ( portal_name , portal_value ) VALUES ('number_recent_topics', '10');
INSERT INTO phpbb_portal ( portal_name , portal_value ) VALUES ('last_seen', '5');
|
Like I said earlier I hope there is something in there you can use to help you track down your problem. |
|
| Back to top |
|
 |
MsMoni
New User
Joined: 03 Jul 2007
Posts: 2
|
Posted: July 4th 2007, 11:36 pm Post subject: |
|
|
Thanks for your help.
Can you tell me what it says on your portal.php? My has this for the configuration..
| Code:
|
//
// 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'] = '10';
// Length of news
// $CFG['news_length'] = '1000';
// 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'] = '5,6,7,8,9';
// Number of Recent Topics (not Forum ID)
// $CFG['number_recent_topics'] = '12';
// Excluding forums for Recent Topics, eg. '1,2,3' (note: my Recent Topics script has its own permission checking, so you can leave this variable blank)
// $CFG['exceptional_forums'] = '';
//
// END configuration
// --------------------------------------------------------
|
I copied what you had down to the /templates/all_named_templates/portal_config_body.tpl but then it left an open edit space on the portal itself. I still couldn't change it using the admin portal hak.
I'm specifically having trouble with this line...
| Code:
|
// 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! ^_^';
|
|
|
| Back to top |
|
 |
Ricky_Racer
Support Team

Joined: 19 Jul 2003
Posts: 1425
Location: Middle of Nowhere, USA
|
Posted: July 5th 2007, 10:53 am Post subject: |
|
|
Oh my, on mine, I moved it to ./includes/page_header.php, so in portal.php I just left myself a note
| Code:
|
// -------------------------------------------------------------------------
// Set configuration for ezPortal
//
// ezPortal configuration is now handled in the phpBB Administration Control Panel.
// Any new Blocks you may add in the future need to be added after page_header.php has been loaded.
//
// 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';
// Random Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
// $CFG['rand_poll_forum'] = '1';
//
// End configuration
// -------------------------------------------------------------------------
//
|
and then in ./includes/page_header.php I have
| Code:
|
define('HEADER_INC', TRUE);
//-- add mod : ezPortal v.2.1.8e w/ezPortal admin -----------------------------
// 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 ezPortal config information", "", __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$CFG[$row['portal_name']] = $row['portal_value'];
}
$portal_config = $CFG;
//
//-- end mod : ezPortal v.2.1.8e w/ezPortal admin -----------------------------
//
|
|
|
| Back to top |
|
 |
|