Advertisement:

Author Topic: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1  (Read 41465 times)

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« on: September 22, 2005, 02:39:06 AM »
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]
« Last Edit: September 22, 2005, 02:40:50 AM by [Unknown] »

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #1 on: September 22, 2005, 02:46:42 AM »
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]

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,593
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #2 on: September 22, 2005, 09:12:42 AM »
Thank you making things easyer :)
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

Offline nokonium

  • Full Member
  • ***
  • Posts: 680
  • Gender: Male
  • TinyPortal Support Team
    • Our-Local
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #3 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?



Offline TarantinoArchives

  • Full Member
  • ***
  • Posts: 442
  • Gender: Male
  • Call it, friendo
    • The Quentin Tarantino Archives
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #4 on: September 22, 2005, 03:11:13 PM »
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

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #5 on: September 22, 2005, 04:39:01 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?

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]

Offline fugiFox

  • Jr. Member
  • **
  • Posts: 342
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #6 on: September 23, 2005, 12:25:03 PM »
@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

Offline nokonium

  • Full Member
  • ***
  • Posts: 680
  • Gender: Male
  • TinyPortal Support Team
    • Our-Local
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #7 on: September 23, 2005, 01:18:06 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

  • Guest
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #8 on: September 23, 2005, 09:34:54 PM »
Thank you [Unknown], this information are very profitable. :)

Offline † ÐëepÇuT¹ †

  • Jr. Member
  • **
  • Posts: 353
  • Gender: Male
  • YaBBSe
    • x3Generation
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #9 on: September 23, 2005, 10:24:15 PM »
Thank you man, now I can run any theme sucsesfully.
Personal Website
x3Generation - gaming
graphics and anime.
 
Favorite Forums
> SimpleMachines Forum
> GamerzPlanet Forums


Offline trenchteam

  • Sr. Member
  • ****
  • Posts: 901
  • Gender: Male
    • NO WALLS STANDING
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #10 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

Offline fugiFox

  • Jr. Member
  • **
  • Posts: 342
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #11 on: September 27, 2005, 05:27:52 PM »
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.

Offline 1MileCrash

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,188
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #12 on: September 27, 2005, 06:09:39 PM »
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.



Offline ghostfreak

  • Jr. Member
  • **
  • Posts: 337
  • Gender: Male
    • ghostfreak
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #13 on: September 28, 2005, 07:06:18 AM »
This should be a sticky!

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

Offline Zenigata

  • Jr. Member
  • **
  • Posts: 237
  • Gender: Male
    • Il sito di Zenigata
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #14 on: September 28, 2005, 09:38:51 AM »
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.  :-[

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,593
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #15 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.
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

Offline Zenigata

  • Jr. Member
  • **
  • Posts: 237
  • Gender: Male
    • Il sito di Zenigata
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #16 on: September 28, 2005, 02:34:50 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?  ;)

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,593
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #17 on: September 28, 2005, 04:46:08 PM »
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

Offline Skoen

  • Language Moderator
  • SMF Friend
  • Sr. Member
  • *
  • Posts: 872
  • Gender: Male
  • I'm a shoe, so don't step on me ;)
    • Radio 3 Norge
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #18 on: September 28, 2005, 05:09:45 PM »
Thanks for this guide. Worked like a charm on my community.
Alf Otto 'Skoen' Fagermo
Retired Norwegian translator


Offline 3guk

  • Jr. Member
  • **
  • Posts: 239
Re: Template changes from SMF 1.1 Beta 3 Public to 1.1 RC1
« Reply #19 on: September 30, 2005, 06:44:54 AM »
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.