i started a new topic (as suggested) for this subject... it references this post:
ELIMINATE PANELS ON SEARCH TEMPLATE (http://www.tinyportal.net/index.php?topic=13031)...
this is from that post:
Quotehi guys...
first the overview: i have my forum set to a maximum width of 990pix... i loaded the 'hoteditor' wysiwyg editor on my smf 1.1.4 / tp 0.9.8 installation...
when i test out posting, the wysiwyg editor loads fine, but it's too large and it stretches out the forum (which is unwanted)...
searching for a solution, i figured i could make it so that the rightside blocks do not show during the custom action of 'post' - thus fixing the stretching problem...
i tried the suggestions listed here (i replaced every instance of the action 'search' with action 'post'), and got the radio buttons to show up in the TP admin panel section, but nothing worked...
is it possible to get the rightside blocks to hide during the action 'post' (meaning, can i get the rightside blocks to hide while in the posting and replying screens)Huh
i like hoteditor - for now... support with them has been difficult with no solutions... i thought i could shrink the hoteditor window so that it wouldn't stretch out the forum, but we couldn't find a solution...
so until SMF 2.0 and TP 1.0 are ready, i would like to use hoteditor (but not if i can't get it to stop stretching out the forum)...
thanks in advance for any help...
***************************
IchBin responded with:In your index.template.php file you should be able to add this code to the template_main_above function to hide the right bar in the post screen.Code:
if (isset($_GET['post']))
tp_hidebars('right');Although your issue is related, its not on the original topic. Next time, can you make your own topic and reference the topic that is similar? Thank you.***************************
ok, i put the code you gave me in my index.template.php, but the panels did not disappear when posting... here's the code from my index.template.php file (you'll see the code you gave me about two-thirds of the way down):
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "', $context['character_set'], '";
// ]]></script>
<title>', $context['page_title'], '</title>';
// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" target="_blank" />
<link rel="search" href="' . $scripturl . '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';
// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
// IF POSTING, HIDE RIGHT TP PANEL
if (isset($_GET['post']))
tp_hidebars('right');
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';
function shrinkHeaderLeftbar(mode)
{';
// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("leftbarHeader").style.display = mode ? "none" : "";
current_leftbar = mode;
}
// ]]></script>i'm assuming i didn't add the code where i should have... but i'm not sure - please advise...
thanks for the help!
Try putting the code in the template_init() function area.
that didn't work either (code below):
// Initialize the template... mainly little settings.
function template_init()
{
global $context, $settings, $options, $txt;
/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';
// IF POSTING, HIDE RIGHT TP PANEL
if (isset($_GET['post']))
tp_hidebars('right');
/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';
/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
}
oops. Didn't realize I was checking post wrong. Sorry about that. Try this.
if (isset($_GET['action']) && $_GET['action'] == 'post')
tp_hidebars('right');
i'll tell yah, it now looks better than my mother-in-law!
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.debbieschlussel.com%2Farchives%2Frodneydangerfield2.jpg&hash=2dce91ca9d7cb13dff0641b3272e094fe61ecb78)
thanks IchBin! it works splendidly...
and just to note: i had to put the new code you gave me in the template_main_above() function...
hello,
i've been restricting tp blocks from showing up during specific actions (as has been outlined in this thread) such as 'post', 'arcade', 'chess' (to name a few), but i need help with another part of it...
a chat block that i have (it's a cbox) takes control of the cursor during login... for example, when a user starts typing in their username on the login screen, typing freezes once the cbox block loads... the user then has to click out of the username field then back into it to re-activate typing...
now, i added the action 'post' to the 'tp_hidebars' code modification in my index_template.php file and it works fine EXCEPT when a user session expires or if a user accidentally types in the wrong password, the resulting login screen loads with none of the blocks hidden (resulting in the cbox block loading and the typing freeze)...
is there anything i can do to achieve the blocks being hidden during this 're-login action' (for lack of a better term)?
thanks...
***** EDIT *****
this question has been posted as a new topic here: http://www.tinyportal.net/index.php?topic=25980
New question needs new topic please.