News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Add a switch to turn off the "Latest Packages"

Started by NanoSector, April 10, 2012, 10:32:36 AM

Previous topic - Next topic

NanoSector

Okay, this thing is annoying me to the damn hell.
Everytime I open the Package Manager, and specifically the Browse Packages section, that box keeps bugging me. It takes like forever to load up, and I'm not even interested in it. I'm only interested in the packages.

Either move it to the bottom so it loads after the packages or create a switch for it (and other fetching elements in SMF like latest version, news, etc.), but this thing is bugging me like hell as it is.

Thanks
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Matthew K.

I do believe it's cached...you could remove it though if you want :P

NanoSector

Quote from: Labradoodle-360 on April 10, 2012, 10:35:21 AM
I do believe it's cached...you could remove it though if you want :P
Point is that it's not only bugging me. There's lots of users who are waiting impatiently for that box to load without using it.

I think writing a mod for this is useless since something like this should be in the core by default. It's a core feature/bugature after all.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Robert.

I agree and I also think other useless boxes should be removed. Smileys for example. It also has a huge impact on the performance of simplemachines.org, especially because there are so many SMF forums.

Antechinus

YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Totally agree with these suggestions. I mean sure I can hack the template to remove them myself, but a lot of users don't have those skills. Those boxes have been annoying me for ages, cached or not. Usually what happens is that you don't go into admin every day once your site is properly set up, which means that whenever you do visit those pages you're stuck with waiting for that crap to load.

NanoSector

My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Antechinus

Hell, this would be such an easy mod to write. Just replace the silly boxes with basic links to the themes and smileys sections of the Customize Site, including a pre-configured search option so it links to themes and smiley packs that are compatible with that version of SMF. So you'd use something like: Get yer 2.0.2 smileys here!

Hmm. Ok, who gets there first? ;D

IchBin™

IchBin™        TinyPortal

kat

Quote from: Yoshi2889 on April 10, 2012, 10:32:36 AM
Okay, this thing is annoying me to the damn hell.
Everytime I open the Package Manager, and specifically the Browse Packages section, that box keeps bugging me. It takes like forever to load up, and I'm not even interested in it. I'm only interested in the packages.

Either move it to the bottom so it loads after the packages or create a switch for it (and other fetching elements in SMF like latest version, news, etc.), but this thing is bugging me like hell as it is.


Matthew K.

If it was written as a modification...the question is, would it actually be used? If so, heck, I'd write it.

Antechinus

Well I was thinking I'd use it myself. :D Those pages have been annoying me for ages, but I don't visit them enough for me to have bothered doing anything about it so far. It's so easy to write though.

Also, I just checked those images that SMF is serving on those two pages. That's bonkers. They should be in the default theme's images folder. It'd cut a lot of requests to the smf.org servers. I just downloaded the two png's and ran them through PNGGauntlet to see if I could get better compression. Check the screenshot results for the Smileys image. :D

I'll write the thing if you like.

Matthew K.


kat

I sure would, Lab.

I'd need it for v1.1.6 as well, though. ;)

Matthew K.

Looks like Antechinus is going to write it, which is completely fine with me. Let me know if you decide not to though, Ant, then I can squeeze it in my schedule and throw it out :P

NanoSector

Yeah, while I don't mind you guys writing a mod, I'd rather see this as a core switch in a next version.

You see, not only the users that know much about mods have issues with this box. There's lots of websites that don't even use mods, or don't want to use them.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Antechinus

Why have a switch? Why not just link to the smileys and themes section of our site? They have to come here anyway if they want to install anything.

NanoSector

Quote from: Antechinus on April 11, 2012, 08:53:56 AM
Why have a switch? Why not just link to the smileys and themes section of our site? They have to come here anyway if they want to install anything.
Why not have a switch to have links or the fetching?

Really, I couldn't care less how you do it, just create a switch or something. I'm not interested in anything other then the packages when I click "Browse Packages".
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

kat

Yep.

Just replace the whole thing with a link to the mod site, perhaps?

NanoSector

Quote from: K@ on April 11, 2012, 09:26:51 AM
Yep.

Just replace the whole thing with a link to the mod site, perhaps?
Or remove it altogether, move it to a different section (Latest Packages, perhaps?), ...
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

emanuele

Quote from: Yoshi2889 on April 11, 2012, 09:06:22 AM
Why not have a switch to have links or the fetching?
It *is* fetched daily with a scheduled task.
Do you want to get rid of it?
Open {db_prefix}admin_info_files and delete the row latest-packages.js. Gone and it will never return.
In the page you'll the "fetching" message and that's all.

Quote from: Yoshi2889 on April 11, 2012, 08:51:39 AM
You see, not only the users that know much about mods have issues with this box. There's lots of websites that don't even use mods, or don't want to use them.
Then why are they going in the package manager? :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

NanoSector

Quote from: emanuele on April 11, 2012, 10:52:12 AM
Quote from: Yoshi2889 on April 11, 2012, 09:06:22 AM
Why not have a switch to have links or the fetching?
It *is* fetched daily with a scheduled task.
Do you want to get rid of it?
Open {db_prefix}admin_info_files and delete the row latest-packages.js. Gone and it will never return.
In the page you'll the "fetching" message and that's all.
Why is is so much trouble to just understand people want to get rid of it after all, without hacking into SMF?

Quote
Quote from: Yoshi2889 on April 11, 2012, 08:51:39 AM
You see, not only the users that know much about mods have issues with this box. There's lots of websites that don't even use mods, or don't want to use them.
Then why are they going in the package manager? :P
Yeah you have a point lol. But still we're not the only ones.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

emanuele

Quote from: Yoshi2889 on April 11, 2012, 10:53:59 AM
Why is is so much trouble to just understand people want to get rid of it after all, without hacking into SMF?
I'm giving you a simple way to get rid of it now without even touch the template.
If you don't want it I can delete my post.

It's the second time I've seen such request (first was from Ant... :P), so I have no idea if it is really a popular request or just the request of two people. ;)

For example I'm not annoyed by it because I open the package manager once every...oh heck I don't even remember the last time I opened the package manager of my on-line forum...oh yes, for the last patch, right...and BTW I have (almost) always javascript disabled so it I don't even see it! :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Matthew K.

Haha emanuele, very nice point about Package Manager. That was hilarious.

NanoSector

Quote from: emanuele on April 11, 2012, 11:11:17 AM
Quote from: Yoshi2889 on April 11, 2012, 10:53:59 AM
Why is is so much trouble to just understand people want to get rid of it after all, without hacking into SMF?
I'm giving you a simple way to get rid of it now without even touch the template.
If you don't want it I can delete my post.
I'm not saying it's stupid information, but this is not what the topic is about.

Quote
It's the second time I've seen such request (first was from Ant... :P), so I have no idea if it is really a popular request or just the request of two people. ;)
Seems it's popular, then. It's totally driving me crazy, that boxes. Today I opened my Admin Panel and Moderation Center and I had to wait 15 whopping seconds for each bloody News box to load before I could finally do something!

Quote
For example I'm not annoyed by it because I open the package manager once every...oh heck I don't even remember the last time I opened the package manager of my on-line forum...oh yes, for the last patch, right...and BTW I have (almost) always javascript disabled so it I don't even see it! :P
That's not the point. The point is that WHEN you open it you get annoyed by that stupid box. And it's not only me where it succeeds to drive someone crazy, there's probably a ton of more users around there that's staring at the screen waiting hopelessly for those boxes to load.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Robert.

What about adding the setting but disable it by default? This would still allow people to have their news boxes etc, but it also decreases the bandwith of this site. :)

Matthew K.

It wouldn't decrease bandwidth....although it would for SimpleMachines itself.

NanoSector

Quote from: Labradoodle-360 on April 11, 2012, 11:45:00 AM
It wouldn't decrease bandwidth....although it would for SimpleMachines itself.
That's what he's saying :P
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Matthew K.

Meh I was on my phone and just skimmed it :P MY bad

Antechinus

Quote from: Yoshi2889 on April 11, 2012, 11:22:37 AM
Seems it's popular, then. It's totally driving me crazy, that boxes. Today I opened my Admin Panel and Moderation Center and I had to wait 15 whopping seconds for each bloody News box to load before I could finally do something!

Ed Zachary. :D The news is handy when there is a patch released. That notification should always be there, but anything else could be set to on-call-by-user IMO.

Matthew K.


Antechinus

Basically you could just echo the js on click, if you want to retrieve things the way they're done now, or alternatively just provide a link here.

emanuele

BTW removing the file from the database fills a bit of errors in the log... :P


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

NanoSector

Quote from: emanuele on April 12, 2012, 11:47:55 AM
BTW removing the file from the database fills a bit of errors in the log... :P
Meh who cares about the errors *whistles*

Though really, get rid of the news box, or at least have users turn it off. There's a "Lastest Version" thing anyway.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Antechinus

On second thought I can't be bothered writing and supporting a mod for this. Got too many other things to do. I'll just hack my template one day when I feel like it. If anyone else wants to write the mod, go for it.

Matthew K.

* Labradoodle-360 runs not me :P Already took up another project.

NanoSector

Not for me either...with the same reason lol.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

emanuele

ohhh...

<?php
updatesettings
(array('disable_smf_js' => 1));

mod done.

Unfortunately it removes *all* the scripts from SMF, updates included.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

NanoSector

Quote from: emanuele on April 18, 2012, 05:19:07 AM
Unfortunately it removes *all* the scripts from SMF, updates included.
That's why it ain't that easy ::)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Antechinus

Oh bugger this. I'll sort the code changes for a simple version today. Someone else can package it and answer questions about the thing. :D

Matthew K.

Shoot me a PM when you have the write ups...I might do it. We'll see.

Antechinus

K dudes and dudesses, here are the code edits for a simple disable/cleanup. It could get fancier, but this does the job. :)

Let's start with 1.1.x.

1.1.x Admin.template.php:

FIND:

echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-top: 1.5ex;"><tr>';

// Display the "live news" from simplemachines.org.
echo '
<td valign="top">
<table width="100%" cellpadding="5" cellspacing="1" border="0" class="bordercolor">
<tr>
<td class="catbg">
<a href="', $scripturl, '?action=helpadmin;help=live_news" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="top" /></a> ', $txt['smf217'], '
</td>
</tr><tr>
<td class="windowbg2" valign="top" style="height: 18ex; padding: 0;">
<div id="smfAnnouncements" style="height: 18ex; overflow: auto; padding-right: 1ex;"><div style="margin: 4px; font-size: 0.85em;">', $txt['lfyi'], '</div></div>
</td>
</tr>
</table>
</td>
<td style="width: 1ex;">&nbsp;</td>';

// Show the user version information from their server.
echo '
<td valign="top" style="width: 40%;">
<table width="100%" cellpadding="5" cellspacing="1" border="0" class="bordercolor" id="supportVersionsTable">
<tr>
<td class="catbg"><a href="', $scripturl, '?action=admin;credits">', $txt['support_title'], '</a></td>
</tr><tr>
<td class="windowbg2" valign="top" style="height: 18ex;">
<b>', $txt['support_versions'], ':</b><br />
', $txt['support_versions_forum'], ':
<i id="yourVersion" style="white-space: nowrap;">', $context['forum_version'], '</i><br />
', $txt['support_versions_current'], ':
<i id="smfVersion" style="white-space: nowrap;">??</i><br />
', $context['can_admin'] ? '<a href="' . $scripturl . '?action=detailedversion">' . $txt['dvc_more'] . '</a>' : '', '<br />';

// Have they paid to remove copyright?
if (!empty($context['copyright_expires']))
{
echo '
<br />', sprintf($txt['copyright_ends_in'], $context['copyright_expires']);

if ($context['copyright_expires'] < 30)
echo '
<div style="color: red;">', sprintf($txt['copyright_click_renew'], $context['copyright_key']), '</div>';

echo '<br />';
}

// Display all the members who can administrate the forum.
echo '
<br />
<b>', $txt[684], ':</b>
', implode(', ', $context['administrators']);
// If we have lots of admins... don't show them all.
if (!empty($context['more_admins_link']))
echo '
(', $context['more_admins_link'], ')';
echo '
</td>
</tr>
</table>
</td>
</tr></table>';



REPLACE:

echo '
<table width="100%" cellpadding="5" cellspacing="1" border="0" id="supportVersionsTable" class="bordercolor" style="margin-top: 1.5ex;">
<tr>
<td class="catbg"><a href="', $scripturl, '?action=admin;credits">', $txt['support_title'], '</a></td>
</tr><tr>
<td class="windowbg2" valign="top" style="height: 18ex;">
<b>', $txt['support_versions'], ':</b><br />
', $txt['support_versions_forum'], ':
<i id="yourVersion" style="white-space: nowrap;">', $context['forum_version'], '</i><br />
', $txt['support_versions_current'], ':
<i id="smfVersion" style="white-space: nowrap;">??</i><br />
', $context['can_admin'] ? '<a href="' . $scripturl . '?action=detailedversion">' . $txt['dvc_more'] . '</a>' : '', '<br />';

// Have they paid to remove copyright?
if (!empty($context['copyright_expires']))
{
echo '
<br />', sprintf($txt['copyright_ends_in'], $context['copyright_expires']);

if ($context['copyright_expires'] < 30)
echo '
<div style="color: red;">', sprintf($txt['copyright_click_renew'], $context['copyright_key']), '</div>';

echo ' <br />';
}

// Display all the members who can administrate the forum.
echo '
<br />
<b>', $txt[684], ':</b>
', implode(', ', $context['administrators']);
// If we have lots of admins... don't show them all.
if (!empty($context['more_admins_link']))
echo '
(', $context['more_admins_link'], ')';
echo '

</td>
</tr>
</table>';



1.1.x Packages.template.php

FIND AND REMOVE:

if (empty($modSettings['disable_smf_js']))
echo '
<script language="JavaScript" type="text/javascript" src="http://www.simplemachines.org/smf/latest-packages.js?language=', $context['user']['language'], '"></script>';

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

function smfSetLatestPackages()
{
if (typeof(window.smfLatestPackages) != "undefined")
setInnerHTML(document.getElementById("packagesLatest"), window.smfLatestPackages);

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

// Gotta love IE4, and its hatefulness...
if ($context['browser']['is_ie4'])
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
tempOldOnload = window.onload;
window.onload = smfSetLatestPackages;
// ]]></script>';
else
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
smfSetLatestPackages();
// ]]></script>';



1.1.x default/Packages.english.php

FIND:

$txt['packages_latest_fetch'] = 'Attempting to fetch the most popular and recent packages from www.simplemachines.org...';



REPLACE:

$txt['packages_latest_fetch'] = 'Popular and recent packages from Simple Machines Forum are available <a href="http://custom.simplemachines.org/mods/">on this link</a>.';

====================

End 1.1.x stuff. Now for the 2.0.x stuff.

====================

2.0.x Admin.template.php:

FIND:

// Display the "live news" from simplemachines.org.
echo '
<div id="live_news" class="floatleft">
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><a href="', $scripturl, '?action=helpadmin;help=live_news" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" class="icon" alt="', $txt['help'], '" /></a> ', $txt['live'], '</span>
</h3>
</div>
<div class="windowbg nopadding">
<span class="topslice"><span></span></span>
<div class="content">
<div id="smfAnnouncements">', $txt['lfyi'], '</div>
</div>
<span class="botslice"><span></span></span>
</div>
</div>';

// Show the user version information from their server.
echo '
<div id="supportVersionsTable" class="floatright">



REPLACE:

// Show the user version information from their server.
echo '
<div id="supportVersionsTable">



2.0.x css/admin.css:

FIND AND REMOVE:

#supportVersionsTable
{
width: 34%;
}



2.0.x Packages.template.php

FIND AND REMOVE:

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

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

function smfSetLatestPackages()
{
if (typeof(window.smfLatestPackages) != "undefined")
setInnerHTML(document.getElementById("packagesLatest"), window.smfLatestPackages);

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

echo '
<script type="text/javascript"><!-- // --><![CDATA[
smfSetLatestPackages();
// ]]></script>';



2.0.x default/Packages.english.php

FIND:

$txt['packages_latest_fetch'] = 'Attempting to fetch the most popular and recent packages from www.simplemachines.org...';


REPLACE:

$txt['packages_latest_fetch'] = 'Popular and recent packages from Simple Machines Forum are available <a href="http://custom.simplemachines.org/mods/">on this link</a>.';


That's all, folks. :)

Adish - (F.L.A.M.E.R)

Ant, you might want to submit this as a mod? It may be nicer that way. :)

Matthew K.

He just wrote the code, he wanted someone else to package and submit it.

Antechinus

Actually I should do the themes one too. Forgot about that the other day. I'll look at it tonight.

kat

1.1.x default/Packages.english.php

Should, of course, be:

1.1.x default/languages/Packages.english.php

Works like a charm with v1.1.6, Ant!



Gonna go for the v2, now.

kat



kat

My point being that, if I can do the edits, almost anyone can! :)

Antechinus

ROFL. Well anyone can if they take care to do them exactly as quoted. I've been a bit busy, but will get on to the themes page over the weekend.

Antechinus

1.1.x Themes.template.php:

Find:
</form>';

// And lastly, link to simplemachines.org for latest themes and info!
echo '
<table width="80%" cellpadding="4" cellspacing="0" border="0" align="center" class="tborder" style="margin-bottom: 2ex; margin-top: 2ex;">
<tr class="titlebg">
<td><a href="', $scripturl, '?action=helpadmin;help=latest_themes" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="top" /></a> ', $txt['theme_latest'], '</td>
</tr>
<tr>
<td class="windowbg2" id="themeLatest">', $txt['theme_latest_fetch'], '</td>
</tr>
</table>';



Replace:
</form><br />';


Find:
echo '
<tr class="windowbg2">
<td align="right"><input type="submit" name="submit" value="', $txt['theme_install_go'], '" /></td>



Replace:
echo '
<tr class="windowbg2">
<td align="right"><input type="submit" name="submit" value="', $txt['theme_install_go'], '" />
<hr /><span style="float: left;">', $txt['theme_latest_fetch'], '</span></td>



Find and remove:
if (empty($modSettings['disable_smf_js']))
echo '
<script language="JavaScript" type="text/javascript" src="http://www.simplemachines.org/smf/latest-themes.js?language=', $context['user']['language'], '"></script>';
echo '
<script language="JavaScript" 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 language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
tempOldOnload = window.onload;
window.onload = smfSetLatestThemes;
// ]]></script>';
else
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
smfSetLatestThemes();
// ]]></script>';



languages/Themes.english.php:

Find:
$txt['theme_latest_fetch'] = 'Fetching latest themes from www.simplemachines.org...';


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

Matthew K.

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:
</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 />';


Replace:
</form><br />';

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


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


Find and remove:
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>';


languages/Themes.english.php:

Find:
$txt['theme_latest_fetch'] = 'Fetching latest themes from www.simplemachines.org...';

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




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

Arantor

I've removed the latest packages list thus far - but it's tricky because that also handles displaying a warning to users about an out of date version which needed some reworking, but that's done.

I'll tackle the others in due course.
Holder of controversial views, all of which my own.


Oldiesmann

Since we're still including latest-news.js there we can probably transfer the stuff from latest-packages to latest-news instead. I'll take a look at it soon and see what I can come up with.
Michael Eshom
Christian Metal Fans

Arantor

I'd prefer not to do that. I'd prefer to leave it as is and not include the list of packages.

I just looked on one of my forums.

QuoteNew Packages:
(package)
Final Fantasy IX Avatars 1
Prevent Topic View Increase by Author 1.0
Word Censor List 1.0

Package of the Moment:
Word Count Limits 1.3b

The 'package of the moment' is a 4 year old mod for 2.0 RC1.2, the other three would fail the version check for that particular forum, as that particular forum is a 2.0 RC5 forum with a lot of modifications (it's been patched for all the security issues but I didn't go through and fix all the version numbers or anything, so it would definitely fail)

It's not even bothering to verify the version number being supplied, which makes it less and less useful as time goes on.
Holder of controversial views, all of which my own.


Oldiesmann

I meant the stuff relating to warning about upgrades, not the stuff related to displaying the latest packages.
Michael Eshom
Christian Metal Fans

Arantor

That's the entire reason I included latest-news there so it could actually display if there was an upgrade... (I even tested to check it worked properly)
Holder of controversial views, all of which my own.


Advertisement: