Relating to the site
User avatar
By teal_dx
#336122 That damn period near the top of the portal page:
http://civic-eg.com/portal.php
between the header and the body.

:x
I'm not sure exactly when/how it showed up but I got used to it. Then Dirk said something about it when he was over a few weeks ago and it has bugged me ever since.
I spent a couple hrs trying to figure out where it is coming from and I give up.

I'll send some Civic-EG goodies to anyone who can figure out how to get rid of it.

The period is not coming from the individual overallheader.tpl or the portal.tpl file.
It's showing up in between them on the page.
User avatar
By Leppy
#336124 <br />.<table width="100%" cellspacing="0" cellpadding="5" border="0" align="center">

should be

<br /><table width="100%" cellspacing="0" cellpadding="5" border="0" align="center">

See the period?

it's line 302 if you copy portal source and open in notepad ++
User avatar
By AutoXRacer
#336128 damn you and posting a reply!, haha I just saw this and was going to show him the exact same thing!. =(

I want EG goodies. haha

But Teal that is exactly it, that small period in between the two Less-Than and Greater-Than signs.
User avatar
By Leppy
#336129
AutoXRacer wrote:damn you and posting a reply!, haha I just saw this and was going to show him the exact same thing!. =(

I want EG goodies. haha

But Teal that is exactly it, that small period in between the two Less-Than and Greater-Than signs.


LOL

Took me about 5 minutes to find.
User avatar
By teal_dx
#336131 That's the problem. I can see where it is in the browser's portal page source code, but the actual portal.php file I have to edit is this:
<?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'] = '<div align="center">

<p><img src="http://civic-eg.com/mys/header_2009.gif" alt="" border="0"></p>

</div>

Welcome to <b>Civic-EG.com</b><br /><br />An online community dedicated specifically to the 92-95 Honda Civic EG chassis (EJ too!).<br /><br />This site was created to house technical articles for our cars, without having to sort through unwanted information about other vehicles. September 30, 2006 was our first day live.';


// Number of news on portal


$CFG['number_of_news'] = '1';


// Length of news


$CFG['news_length'] = '660';


// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'


$CFG['news_forum'] = '0';


// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'


$CFG['poll_forum'] = '18';

// Number of Recent Topics (not Forum ID)

$CFG['number_recent_topics'] = '10';


// Excluding forums for Recent Topics, eg. '2,4,10' (note: my Recent Topics script has its own permission checking, so you can leave this variable blank)

$CFG['exceptional_forums'] = '';

//

// 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'];


}


//

// Recent Topics

//

$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";

if (!$result = $db->sql_query($sql))

{

message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);

}

$forum_data = array();


while( $row = $db->sql_fetchrow($result) )

{

$forum_data[] = $row;

}


$is_auth_ary = array();

$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);


if( $CFG['exceptional_forums'] == '' )

{

$except_forum_id = '\'start\'';


}


else


{

$except_forum_id = $CFG['exceptional_forums'];

}


for ($i = 0; $i < count($forum_data); $i++)


{

if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))


{


if ($except_forum_id == '\'start\'')


{


$except_forum_id = $forum_data[$i]['forum_id'];


}


else


{


$except_forum_id .= ',' . $forum_data[$i]['forum_id'];



}

}

}

$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username


FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u


WHERE t.forum_id NOT IN (" . $except_forum_id . ")


AND t.topic_status <> 2


AND p.post_id = t.topic_last_post_id


AND p.poster_id = u.user_id

ORDER BY p.post_id DESC

LIMIT " . $CFG['number_recent_topics'];


if (!$result = $db->sql_query($sql))


{

message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);

}

$number_recent_topics = $db->sql_numrows($result);


$recent_topic_row = array();

while ($row = $db->sql_fetchrow($result))


{

$recent_topic_row[] = $row;

}


for ($i = 0; $i < $number_recent_topics; $i++)

{

$template->assign_block_vars('recent_topic_row', array(

'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],


'L_TITLE' => $recent_topic_row[$i]['topic_title'],


'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),


'S_POSTER' => $recent_topic_row[$i]['username'],


'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])

)

);


}


//
// END - Recent Topics
//

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&amp;" . $userdata['user_id']) . '">' . $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'],

// Recent Topics

'L_RECENT_TOPICS' => $lang['Recent_topics'],

// 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'm no .php expert... or even novice, but it looks like the area of the code where that period would fall is in here from the above
//

// 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')


);


Between the header and the body but there's no extra period laying around in there. :?
User avatar
By Leppy
#336134 Looking through it now
User avatar
By Leppy
#336135 I see what it's doing, but without access I can't tell WHY it's doing it.

The Portal is the ONLY page that doesn't have anything in between the banner/menu and the body. All the other pages have the "Civic EG Forum Index" link at the top in one way shape or fashion. Since the portal page doesn't have anything, somehow it's defaulting to a period.

Whatever script auto-generates the links above the body on each pages seems to put a period instead of a blank when there's nothing to link to.
User avatar
By Leppy
#336137 For example to see what i'm talking about. if you view the source of THIS page, you'll see between lines 389 and 403 that the links are generated between the </br> and the <table width="[...] > lines of code.

Instead of spitting that out, it just places a single period in the portal page.
User avatar
By teal_dx
#336171 I was feeling determined tonight...
I dug up an archive of the site from 6 years ago, when we first added the portal page and compared the portal.php and portal_body.tpl files with the current versions. Didn't see anything different that stood out, so I put the early versions up on the live site and the period was gone! So then I put the current versions back up, refreshed and the period stayed gone :woot:
User avatar
By Leppy
#336179
teal_dx wrote:I was feeling determined tonight...
I dug up an archive of the site from 6 years ago, when we first added the portal page and compared the portal.php and portal_body.tpl files with the current versions. Didn't see anything different that stood out, so I put the early versions up on the live site and the period was gone! So then I put the current versions back up, refreshed and the period stayed gone :woot:



Awesome! Must have been something cached or just a weird typo that got stuck in it.

Can I still get goodies for helping? lol
User avatar
By TrailerTrash
#336187 give em to him!
User avatar
By teal_dx
#336190 You stepped up, that's worth a couple bumper stickers. Pm me your mailing address. Now I know you're a php guy... I may bug you the next time the forum crashes :hehe:
It's been like 5 years since that happened... Knock on wood!
User avatar
By Leppy
#336191
teal_dx wrote:You stepped up, that's worth a couple bumper stickers. Pm me your mailing address. Now I know you're a php guy... I may bug you the next time the forum crashes :hehe:
It's been like 5 years since that happened... Knock on wood!


I'm in college for my computer science degree and going through my 3rd networking class lol. As much as this forum has helped me, I'm glad to help it in return. PM being sent shortly.
User avatar
By ohDirka
#336277 Lol finally fixed it! :thumb: It was bothering me too (as Brian knows). So glad it is finally gone :woot:
By rustyrex
#336295 I'm glad I picked electrical engineering. I'd rather design PCB boards for nuclear propulsion systems than deal with this programming stuff. I understand some of it but mainly you guys sound like Charlie Brown's parents lol