SMF Development > Feature Requests

Add a switch to turn off the "Latest Packages"

<< < (11/11)

Labradoodle-360:
I wish I had about 3 days per one day then I could do a lot more. I have wayy too much on my schedule :( I'd love to do it though if I could.

Antechinus:
2.0.x Themes.template.php:

Find:

--- Code: --- </form>';

// Link to simplemachines.org for latest themes and info!
echo '
<br />
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><a href="', $scripturl, '?action=helpadmin;help=latest_themes" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" class="icon" alt="', $txt['help'], '" /></a> ', $txt['theme_latest'], '</span>
</h3>
</div>
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="content">
<div id="themeLatest">
', $txt['theme_latest_fetch'], '
</div>
</div>
<span class="botslice"><span></span></span>
</div>
<br />';
--- End code ---

Replace:

--- Code: --- </form><br />';
--- End code ---

Find:

--- Code: --- <div class="righttext">
<input type="submit" name="submit" value="', $txt['theme_install_go'], '" class="button_submit" />
</div>
--- End code ---

Replace:

--- Code: --- <div class="righttext">
<input type="submit" name="submit" value="', $txt['theme_install_go'], '" class="button_submit" />
</div>
<hr />', $txt['theme_latest_fetch'], '
--- End code ---

Find and remove:

--- Code: --- if (empty($modSettings['disable_smf_js']))
echo '
<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=latest-themes.js"></script>';

echo '
<script type="text/javascript"><!-- // --><![CDATA[
var tempOldOnload;

function smfSetLatestThemes()
{
if (typeof(window.smfLatestThemes) != "undefined")
setInnerHTML(document.getElementById("themeLatest"), window.smfLatestThemes);

if (tempOldOnload)
tempOldOnload();
}
// ]]></script>';

// Gotta love IE4, and its hatefulness...
if ($context['browser']['is_ie4'])
echo '
<script type="text/javascript"><!-- // --><![CDATA[
addLoadEvent(smfSetLatestThemes);
// ]]></script>';
else
echo '
<script type="text/javascript"><!-- // --><![CDATA[
smfSetLatestThemes();
// ]]></script>';
--- End code ---

languages/Themes.english.php:

Find:

--- Code: ---$txt['theme_latest_fetch'] = 'Fetching latest themes from www.simplemachines.org...';
--- End code ---

Replace:

--- Code: ---$txt['theme_latest_fetch'] = 'More themes from Simple Machines Forum are available <a href="http://custom.simplemachines.org/themes/">on this link</a>.';
--- End code ---


It really is much cleaner like this. I'd be inclined to make it default, or at least include it in custom themes.

Navigation

[0] Message Index

[*] Previous page

Go to full version