Topic: footer issue [php + css]
Hello
Due working with my extensions I had problem with footer.
This is current footer align:
Firefox:
IE7:
Creation order is:
1. (pre_quickjump_hook)
2. quickjump [1] (float: left)
3. (pre_copyright_hook)
4. copyright [2] (float: right)
5. (footer_end_hook)
default float for all text's (<p>) is left
The problem is when you want to add some elements using hooks. Even "Currently used extensions" element (footer_end_hook) is displayed in different way depends of browser (btw. there is another margin issue).
Strange things start happens when you will try to add another element to footer (footer_end_hook). It will be displayed in A. If you will use (pre_copyright_hook) then in FF it will appear in B, in IE7 3 and A will switch the places.
I think that it should be displayed in this way:
-copyright is always on top right
-if you're using quickjump, it should be displayed on top left and it should keep empty space on it's right side
-everything else should appear under quickjump
I was trying to play with CSS without success. I changed default text's float to none. Then text's starts appear one under one, but in FF 3 moved to B (in IE7 it stayed in place). It wasn't looking nice.
Finaly I change php creation order to:
1. (pre_copyright_hook)
2. copyright [2] (float: right)
3. (pre_quickjump_hook)
4. quickjump [1] (float: NONE)
5. (footer_end_hook)
and default text's float to NONE as well
Now it's working fine for me.
(same in FF and IE7)
Changes description:
footer.php (line: 15)
// START SUBST - <!-- forum_about -->
ob_start();
($hook = get_hook('ft_about_output_start')) ? eval($hook) : null;
($hook = get_hook('ft_about_pre_quickjump')) ? eval($hook) : null;
// Display the "Jump to" drop list
if ($forum_user['g_read_board'] == '1' && $forum_config['o_quickjump'] == '1')
{
// Load cached quickjump
if (file_exists(FORUM_CACHE_DIR.'cache_quickjump_'.$forum_user['g_id'].'.php'))
include FORUM_CACHE_DIR.'cache_quickjump_'.$forum_user['g_id'].'.php';
if (!defined('FORUM_QJ_LOADED'))
{
if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
require FORUM_ROOT.'include/cache.php';
generate_quickjump_cache($forum_user['g_id']);
require FORUM_CACHE_DIR.'cache_quickjump_'.$forum_user['g_id'].'.php';
}
}
($hook = get_hook('ft_about_pre_copyright')) ? eval($hook) : null;
// End the transaction
$forum_db->end_transaction();
?>
<p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/">PunBB</a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')); ?></p>
<?php
($hook = get_hook('ft_about_end')) ? eval($hook) : null;
changed to:
// START SUBST - <!-- forum_about -->
ob_start();
($hook = get_hook('ft_about_output_start')) ? eval($hook) : null;
($hook = get_hook('ft_about_pre_copyright')) ? eval($hook) : null;
?>
<p id="copyright"><?php echo sprintf($lang_common['Powered by'], '<a href="http://punbb.informer.com/">PunBB</a>'.($forum_config['o_show_version'] == '1' ? ' '.$forum_config['o_cur_version'] : '')); ?></p>
<?php
($hook = get_hook('ft_about_pre_quickjump')) ? eval($hook) : null;
// Display the "Jump to" drop list
if ($forum_user['g_read_board'] == '1' && $forum_config['o_quickjump'] == '1')
{
// Load cached quickjump
if (file_exists(FORUM_CACHE_DIR.'cache_quickjump_'.$forum_user['g_id'].'.php'))
include FORUM_CACHE_DIR.'cache_quickjump_'.$forum_user['g_id'].'.php';
if (!defined('FORUM_QJ_LOADED'))
{
if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
require FORUM_ROOT.'include/cache.php';
generate_quickjump_cache($forum_user['g_id']);
require FORUM_CACHE_DIR.'cache_quickjump_'.$forum_user['g_id'].'.php';
}
}
// End the transaction
$forum_db->end_transaction();
($hook = get_hook('ft_about_end')) ? eval($hook) : null;
Oxygen.css (line: 702)
/* Footer
-------------------------------------------------------------*/
#brd-about p {
float: left;
margin: 0 1em;
}
#brd-about #qjump {
float: left;
padding: 0.5em 0;
}
#brd-about #qjump div, #qjump label {
padding: 0;
border: none;
}
#brd-about #copyright {
text-align: right;
float: right;
margin: 0;
}
#brd-about #querytime {
text-align: center;
font-size: 0.9em;
}
changed to:
/* Footer
-------------------------------------------------------------*/
#brd-about #qjump {
padding: 0.5em 0;
margin-right: 1em;
}
#brd-about #qjump div, #qjump label {
padding: 0;
border: none;
}
#brd-about #copyright {
text-align: right;
float: right;
margin-left: 1em;
}
#querytime {
text-align: center;
font-size: 0.9em;
}
(css is fixing querytime centered display issue too)
Do you think this is a bug?
Away. I will be back soon.