News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1

Started by [Unknown], September 22, 2005, 02:39:06 AM

Previous topic - Next topic

[Unknown]

If you have a custom theme with customized templates, and you wish to upgrade from 1.1 Beta 3 Public to 1.1 RC1, you may be worried about changes to template that may effect your theme after the upgrade.  Below is a list of all of the changes made between those releases to the most commonly modified templates:


index template

Code (Find) Select
// Version: 1.1 Beta 3 Public; index
Code (Replace) Select
// Version: 1.1 RC1; index

Code (Find) Select
$settings['theme_version'] = '1.1 Beta 3 Public';
Code (Replace) Select
$settings['theme_version'] = '1.1 RC1';

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

Code (Find) Select
// The ?beta3 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?beta3" />';

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


Code (Find and remove) Select
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function hashPassword(doForm)
{
if (typeof(hex_sha1) == "undefined")
return;
// Are they using an email address?
if (doForm.user.value.indexOf("@") != -1)
return;

doForm.hash_passwrd.value = hex_sha1(hex_sha1(doForm.user.value.toLowerCase() + doForm.passwrd.value) + "', $context['session_id'], '");
doForm.passwrd.value = doForm.passwrd.value.replace(/./g, "*");
}
// ]]></script>



Display.template.php

Code (Find) Select
// Version: 1.1 Beta 3 Public; Display
Code (Replace) Select
// Version: 1.1 RC1; Display

Code (Find) Select
', $option['vote_button'], ' ', $option['option'], '<br />';
Code (Replace) Select
<label for="', $option['id'], '">', $option['vote_button'], ' ', $option['option'], '</label><br />';

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

Code (Find) Select
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markunread.gif" alt="' . $txt['mark_unread'] . '" border="0" />' : $txt['mark_unread']) . '</a>';
Code (Replace) Select
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markunread.gif" alt="' . $txt['mark_unread'] . '" border="0" />' : $txt['mark_unread']) . '</a>';
Find and replace the above again.

Code (Find) Select
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" name="quickModForm" style="margin: 0;">';

Code (Replace) Select
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
echo '
<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" name="quickModForm" id="quickModForm" style="margin: 0;">';


Code (Find) Select
// Otherwise, show the guest's email.
else

Code (Replace) Select
// Otherwise, show the guest's email.
elseif (empty($message['member']['hide_email']))


Code (Find) Select
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markunread.gif" alt="' . $txt['mark_unread'] . '" border="0" />' : $txt['mark_unread']) . '</a>';
Code (Replace) Select
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=topic;t=' . $context['mark_unread_time'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markunread.gif" alt="' . $txt['mark_unread'] . '" border="0" />' : $txt['mark_unread']) . '</a>';

Code (Find) Select
replaceText(text, document.postmodify.message);
Code (Replace) Select
replaceText(text, document.forms.postmodify.message);

Code (Find) Select
<div align="', !$context['right_to_left'] ? 'right' : 'left', '" style="margin-bottom: 1ex;">
<form action="', $scripturl, '" method="get" name="jumptoForm">;
<span class="smalltext">' . $txt[160] . ':</span>
<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 ? 0 : 1);">

Code (Replace) Select
<form action="', $scripturl, '" method="get">;
<span class="smalltext">' . $txt[160] . ':</span>
<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">


Code (Find) Select
<input type="button" value="', $txt[161], '" onclick="if (document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value;" />
Code (Replace) Select
<input type="button" value="', $txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />

Code (Find) Select
<form action="', $scripturl, '?action=post2" method="post" name="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
Code (Replace) Select
<form action="', $scripturl, '?action=post2" method="post" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">

Code (Find) Select
$moderationButtons[] = $settings['use_image_buttons'] ? '<input type="image" name="submit" id="quickmodSubmit" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete_selected.gif" alt="' . $txt['quickmod_delete_selected'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" />' : '<a href="javascript:document.quickModForm.submit();" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" id="quickmodSubmit">' . $txt['quickmod_delete_selected'] . '</a>';
Code (Replace) Select
$moderationButtons[] = $settings['use_image_buttons'] ? '<input type="image" name="submit" id="quickmodSubmit" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete_selected.gif" alt="' . $txt['quickmod_delete_selected'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" />' : '<a href="javascript:document.forms.quickModForm.submit();" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" id="quickmodSubmit">' . $txt['quickmod_delete_selected'] . '</a>';

-[Unknown]

[Unknown]

MessageIndex template

Code (Find) Select
// Version: 1.1 Beta 3 Public; MessageIndex
Code (Replace) Select
// Version: 1.1 RC1; MessageIndex

Code (Find) Select
<select name="qaction"', $context['can_move'] ? ' onchange="document.topicForm.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>
Code (Replace) Select
<select name="qaction"', $context['can_move'] ? ' onchange="this.form.moveItTo.disabled = (this.options[this.selectedIndex].value != \'move\');"' : '', '>

Code (Find) Select
<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return document.topicForm.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" />
Code (Replace) Select
<input type="submit" value="', $txt['quick_mod_go'], '" onclick="return this.form.qaction.value != \'\' &amp;&amp; confirm(\'', $txt['quickmod_confirm'], '\');" />

Code (Find) Select
<form action="', $scripturl, '" method="get" name="jumptoForm">;
<label for="jumpto">' . $txt[160] . '</label>:
<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 ? 0 : 1);">

Code (Replace) Select
<form action="', $scripturl, '" method="get">;
<label for="jumpto">' . $txt[160] . '</label>:
<select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">


Code (Find) Select
<input type="button" value="', $txt[161], '" onclick="if (document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value;" />
Code (Replace) Select
<input type="button" value="', $txt[161], '" onclick="if (this.form.jumpto.options[this.form.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + this.form.jumpto.options[this.form.jumpto.selectedIndex].value;" />

Code (Find) Select
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markread.gif" alt="' . $txt[300] . '" border="0" />' : $txt[300]) . '</a>';
Code (Replace) Select
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markread.gif" alt="' . $txt[300] . '" border="0" />' : $txt[300]) . '</a>';


BoardIndex template

Code (Find) Select
// Version: 1.1 Beta 3; BoardIndex
Code (Replace) Select
// Version: 1.1 RC1; BoardIndex

Code (Find) Select
<a href="', $scripturl, '?action=markasread;sa=all">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markread.gif" alt="' . $txt[452] . '" border="0" />' : $txt[452]), '</a>';
Code (Replace) Select
<a href="', $scripturl, '?action=markasread;sa=all;sesc=' . $context['session_id'] . '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markread.gif" alt="' . $txt[452] . '" border="0" />' : $txt[452]), '</a>';

-[Unknown]

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

nokonium

Are there any changes from 1.1.4 beta, or is 1.1.4 beta the same as RC1?



TarantinoArchives

great guide, but...

i saw you edited your first post, now i am wondering what did you update in your post, because it seems like i updated my templates before you edited your post

[Unknown]

Quote from: nokonium on September 22, 2005, 12:55:21 PM
Are there any changes from 1.1.4 beta, or is 1.1.4 beta the same as RC1?

There were a few changes.  If you can't find something above, it was already changed in 1.1 Beta 4..... but you're not a Charter Member?

Quote from: TarantinoArchives on September 22, 2005, 03:11:13 PM
i saw you edited your first post, now i am wondering what did you update in your post, because it seems like i updated my templates before you edited your post

I edited the first post to add the links at the top to the anchors.

-[Unknown]

fugiFox

@Unknown
Stupid question:
U wrote these changes for the theme authors or for the ones who use them?
In other words shall we wait for the update changes from the authors or should wwe give it a try?
thnx

nokonium

Quote from: [Unknown] on September 22, 2005, 04:39:01 PM
.. but you're not a Charter Member?

-[Unknown]

But one of the Admin team is and I check out mods and updates, then report.



weber

Thank you [Unknown], this information are very profitable. :)

† ÐëepÇuT¹ †




Personal Website
x3Generation - gaming
graphics and anime.
 

Favorite Forums
> SimpleMachines Forum
> GamerzPlanet Forums


trenchteam

Is the changes from 1.05 to 1.1 RC1 more difficult than this?  Can you post the changes to 1.05 to 1.1 Beta Public to 1.1RC1....  I would love to use some of the 1.05 themes, but have no clue where the changes are. This really helps me alot! ;D

fugiFox

Quote from: trenchteam on September 27, 2005, 07:51:11 AM
Is the changes from 1.05 to 1.1 RC1 more difficult than this?  Can you post the changes to 1.05 to 1.1 Beta Public to 1.1RC1....  I would love to use some of the 1.05 themes, but have no clue where the changes are. This really helps me alot! ;D
That's correct cos many were still using 1.0.5 waiting for an RC release.

1MileCrash

i really need one of these changelogs for 1.0.5 - 1.1.

i have like 4 themes i want updated.
The only thing php can't do is tell you how much milk is left in the fridge.



ghostfreak


http://www.xfilesforum.net - Dare To Believe?
http://www.idealforum.co.uk - The Green Blitz!

Zenigata

Yes, I'd like to knwow what I have to change in my theme to be compatible with 1.1RC1.

Thanks

ps. Unfortunately Unknown isn't here.  :-[

Owdy

There are huge changes between 1.0.x to 1.1.  Not only in theme files, there are couple of new entries in style.css as well.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Zenigata

Quote from: Owdy on September 28, 2005, 02:06:15 PM
There are huge changes between 1.0.x to 1.1.  Not only in theme files, there are couple of new entries in style.css as well.

...so our themes for 1.0 will never works? Does we have to put them in the trash if we upgrade to 1.1?  ;)

Owdy

They wont work if you dont fix them. Some features wont work and your error log will be full. You have to compare and look for changes. Most themes have only modifyed index.template and style.css, so it isnt huge job.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Skoen

Thanks for this guide. Worked like a charm on my community.
Alf Otto 'Skoen' Fagermo
Retired Norwegian translator


3guk

I went from 1.0.5 or whatever it was to 1.1 and that worked like a charm. No doubt I am missing bits of functionality but its not something I have time to do.

Could an update package not be made ?

That would be super useful.

Advertisement: