News:

Wondering if this will always be free?  See why free is better.

Main Menu

Template changes from SMF 1.1 RC2 to 1.1 RC3

Started by forsakenlad, August 06, 2006, 01:32:44 PM

Previous topic - Next topic

forsakenlad

Here are the changes that have been made in the most widely used templates in SMF. This doc will be useful for both the theme authors or for the ones that have a custom theme. If you don't have some of the files in your theme's directory, don't worry, the file from the default theme will be used instead:

Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

forsakenlad

style.css

Code (Find) Select
.mirrortab_first, .mirrortab_back, .mirrortab_last
Code (Replace) Select
.mirrortab_first, .mirrortab_back, .mirrortab_last, .mirrortab_active_first, .mirrortab_active_back, .mirrortab_active_last

Code (Find) Select
.mirrortab_back
Code (Replace) Select
.mirrortab_back, .mirrortab_active_back

Code (Find) Select
.mirrortab_last
{
background-image: url(images/mirrortab_last.gif);
background-repeat: no-repeat;
width: 6px;
}

Code (Add After) Select
.mirrortab_active_first
{
background-image: url(images/mirrortab_active_first.gif);
background-repeat: no-repeat;
width: 6px;
}
.mirrortab_active_back
{
background-image: url(images/mirrortab_active_back.gif);
background-repeat: repeat-x;
}
.mirrortab_active_last
{
background-image: url(images/mirrortab_active_last.gif);
background-repeat: no-repeat;
width: 8px;
}


Code (Find) Select
.mirrortab_back a:link , .mirrortab_back a:visited
Code (Replace) Select
.mirrortab_back a:link , .mirrortab_back a:visited, .mirrortab_active_back a:link , .mirrortab_active_back a:visited

Code (Find) Select
.mirrortab_back a:hover
Code (Replace) Select
.mirrortab_back a:hover, .mirrortab_active_back a:hover

Code (Add Anywhere) Select
/* The AJAX notifier */
#ajax_in_progress
{
background: #32CD32;
color: white;
text-align: center;
font-weight: bold;
font-size: 18pt;
padding: 3px;
width: 100%;
position: fixed;
top: 0;
left: 0;
}
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

forsakenlad

index template

Code (Find) Select
// Version: 1.1 RC2; index
Code (Replace) Select
// Version: 1.1 RC3; index

Code (Find) Select
$settings['theme_version'] = '1.1 RC2';
Code (Replace) Select
$settings['theme_version'] = '1.1 RC3';

Code (Find) Select
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc2p"></script>
Code (Replace) Select
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc3"></script>


Code (Find) Select
// The ?rc2 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?rc2" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" media="print" />';

Code (Replace) Select
// The ?rc3 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?rc3" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc3" media="print" />';


Code (Find) Select
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '

Code (Replace) Select
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>


Code (Find) Select
<form action="', $scripturl, '?action=login2" method="post" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
Code (Replace) Select
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>

Code (Find) Select
<option value="302400">', $txt['smf49'], '</option>

Code (Replace) Select
<option value="43200">', $txt['smf49'], '</option>


Code (Find) Select
<form action="', $scripturl, '?action=search2" method="post" style="margin: 0;">
Code (Replace) Select
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">


Code (Find) Select
</div>
</body></html>';

Code (Replace) Select
</div>';

// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
</body></html>';
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

forsakenlad

BoardIndex template

Code (Find) Select
// Version: 1.1 RC2; BoardIndex
Code (Replace) Select
// Version: 1.1 RC3; BoardIndex

Code (Find) Select
<td class="middletext" valign="top" nowrap="nowrap"><b>', $post['link'], '</b> ', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</td>
Code (Replace) Select
<td class="middletext" valign="top"><b>', $post['link'], '</b> ', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</td>

Code (Find) Select
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
Code (Replace) Select
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">

MessageIndex template

Code (Find) Select
// Version: 1.1 RC2; MessageIndex
Code (Replace) Select
// Version: 1.1 RC3; MessageIndex

Code (Find) Select
<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" name="quickModForm" id="quickModForm" style="margin: 0;">';
Code (Replace) Select
<form action="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">';

Code (Find) Select
<td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" ', (!empty($topic['quick_mod']['remove']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : ''), '>';
Code (Replace) Select
<td class="windowbg' , !empty($settings['seperate_sticky_lock']) && $topic['is_sticky'] ? '3' : '' , '" valign="middle" ', (!empty($topic['quick_mod']['remove']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : ''), '>';

Code (Find) Select
<form action="', $scripturl, '" method="get" name="jumptoForm">

Code (Replace) Select
<form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '" name="jumptoForm">
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

forsakenlad

#4
Display template

Code (Find) Select
// Version: 1.1 RC2; Display
Code (Replace) Select
// Version: 1.1 RC3; Display

Code (Find) Select
<form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" style="margin: 0px;">
Code (Replace) Select
<form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" accept-charset="', $context['character_set'], '" style="margin: 0px;">


Code (Find) Select
<b>', $event['title'] , '</b> ' , ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" >[' . $txt['calendar_shortedit'] . ']</a> ' : '') , ': ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '
Code (Replace) Select
', ($event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: red;">*</a> ' : ''), '<b>', $event['title'], '</b>: ', $event['start_date'], ($event['start_date'] != $event['end_date'] ? ' - ' . $event['end_date'] : ''), '

Code (Find) Select
<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return in_edit_mode == 1 ? modify_save(\'' . $context['session_id'] . '\') : confirm(\'' . $txt['quickmod_confirm'] . '\');">';
Code (Replace) Select
<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;" onsubmit="return in_edit_mode == 1 ? modify_save(\'' . $context['session_id'] . '\') : confirm(\'' . $txt['quickmod_confirm'] . '\');">';

Code (Find) Select
<input type="checkbox" name="msgs[]" value="', $message['id'], '" class="check" onclick="document.getElementById(\'quickmodSubmit\').style.display = \'\';" />';
Code (Replace) Select
<input type="checkbox" name="msgs[]" value="', $message['id'], '" class="check" ', empty($settings['use_tabs']) ? 'onclick="document.getElementById(\'quickmodSubmit\').style.display = \'\';"' : '', ' />';

Code (Find) Select
if ($context['user']['is_logged'] && $settings['show_mark_read'])
$normal_buttons['custom'] = array('text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
elseif ($context['can_add_poll'])
$normal_buttons['custom'] = array('text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);

Code (Replace) Select
if ($context['can_add_poll'])
$normal_buttons['custom'] = array('text' => 'add_poll', 'image' => 'add_poll.gif', 'lang' => true, 'url' => $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);
elseif ($context['user']['is_logged'] && $settings['show_mark_read'])
$normal_buttons['custom'] = array('text' => 'mark_unread', 'image' => 'markunread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']);


Code (Find) Select
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_locked']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),

Code (Replace) Select
'sticky' => array('test' => 'can_sticky', 'text' => empty($context['is_sticky']) ? 'smf277' : 'smf278', 'image' => 'admin_sticky.gif', 'lang' => true, 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),


Code (Find) Select
<input type="hidden" name="sc" value="', $context['session_id'], '" />
Code (Replace) Select
<input type="hidden" name="sc" value="', $context['session_id'], '" />';

if (empty($settings['use_tabs']))
echo '


Code (Find) Select
<form action="', $scripturl, '" method="get" style="padding:0; margin: 0;">
Code (Replace) Select
<form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '" style="padding:0; margin: 0;">

Code (Find) Select
<form action="', $scripturl, '?action=post2" method="post" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $txt['response_prefix'] . $context['subject'] . '" />

Code (Replace) Select
<form action="', $scripturl, '?action=post2" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $context['response_prefix'] . $context['subject'] . '" />


Code (Find) Select
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" />';
Code (Replace) Select
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="5"/>';


Code (Find) Select
<form name="spell_form" id="spell_form" method="post" target="spellWindow" action="', $scripturl, '?action=spellcheck"><input type="hidden" name="spellstring" value="" /></form>';
Code (Replace) Select
<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>';
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member


forsakenlad

Well only a few themes modify the Register.template.php, which theme are you using?
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

charlottezweb

Quote from: forsakenlad on August 13, 2006, 11:32:39 AM
Well only a few themes modify the Register.template.php, which theme are you using?

Hi::Ha is an example.

Not sure what (if anything) was altered but it includes that file in the Theme download.

forsakenlad

Well I'll compare it and let you know, the register template does include a lot of changes due to captcha being added in RC3.
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

charlottezweb

No need really.  I just dropped the rc3 version in and all is well.

-Jason

forsakenlad

Allright, I'd advise you check your forum error log because the theme is not compatible you might get errors on some places, especially the forms.
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

m3talc0re

#11
You see? This is why I said smf's theme system needed to be changed and this is exactly why I said the php should not be mixed with the html for the templates.
The real hell is your life gone wrong.

forsakenlad

Well there are reasons for php themes to exist, this has been discussed a lot of time before on the forum, please search and read through the benefits stated before.
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

m3talc0re

Uh huh... So if you're wanting to keep the php and html in the templates mixed (which has no real advantages, take a que from phpbb), why not just make it so that mods, upgrades, etc.. can search for and make the needed changes in all templates or user selectable templates instead of just the default template.
The real hell is your life gone wrong.

forsakenlad

Well php templates are one of the reasons that I made the switch from phpbb to smf so ermm they do have advantages (of course this varies heavily at the amount of customizations you want to make), anyway I am not going to argue about this here as it is out of the context of the topic. If you believe we would be better off with html templates please make a post in the Feature Requests board stating the advantages HTML templates would have.
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

Revo1

I'm waiting for some dope themes to get upgraded to RC3 before I make the change, and a lot of the dope themes for SMF are m3talc0re. phpBB is dope, but they've been building phpBB3 for years now. I'll be sure to search for the thread that discusses the benefits of having php based themes. Peace.

desistyle

how can i set the default theme width to 100%

StormLrd

Quote from: forsakenlad on August 06, 2006, 01:32:44 PM
Here are the changes that have been made in the most widely used templates in SMF. This doc will be useful for both the theme authors or for the ones that have a custom theme. If you don't have some of the files in your theme's directory, don't worry, the file from the default theme will be used instead:


All I can say is thankyou for taking the time to breakdown these modifications. I'll have to check the other templates as well as many of my themes rely on heavy php customization in conjunction with TP.

I think Im gonna wait until Bloc's next beta release and convert them all to RC3 and TPv9+. Again thanks for this, I'll be bookmarking this thread, and if you note other template changes or I do I'll also let you know.

~Storm

SleePy

Quote from: StormLrd on August 25, 2006, 01:31:50 PM
All I can say is thankyou for taking the time to breakdown these modifications. I'll have to check the other templates as well as many of my themes rely on heavy php customization in conjunction with TP.

I think Im gonna wait until Bloc's next beta release and convert them all to RC3 and TPv9+. Again thanks for this, I'll be bookmarking this thread, and if you note other template changes or I do I'll also let you know.

~Storm

Blocs Theme might just update for you.
I use Alienation and I was able to put the changes said here that I wanted (ignored the ones that did allowcharset because we are english only forum)..
I would just try to upgrade... makes more sense...
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

forsakenlad

Quote from: StormLrd on August 25, 2006, 01:31:50 PM
Quote from: forsakenlad on August 06, 2006, 01:32:44 PM
Here are the changes that have been made in the most widely used templates in SMF. This doc will be useful for both the theme authors or for the ones that have a custom theme. If you don't have some of the files in your theme's directory, don't worry, the file from the default theme will be used instead:


All I can say is thankyou for taking the time to breakdown these modifications. I'll have to check the other templates as well as many of my themes rely on heavy php customization in conjunction with TP.

I think Im gonna wait until Bloc's next beta release and convert them all to RC3 and TPv9+. Again thanks for this, I'll be bookmarking this thread, and if you note other template changes or I do I'll also let you know.

~Storm

Well I would be glad if you had comitted and published some other template files. Thanks.
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

Advertisement: