Simple Machines Community Forum

SMF Development => Feature Requests => Topic started by: NanoSector on April 10, 2012, 10:32:36 AM

Title: Add a switch to turn off the "Latest Packages"
Post by: NanoSector 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.

Thanks
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 10, 2012, 10:35:21 AM
I do believe it's cached...you could remove it though if you want :P
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 10, 2012, 10:40:19 AM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Robert. on April 10, 2012, 10:54:38 AM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 10, 2012, 03:31:55 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 10, 2012, 04:18:56 PM
Lol, yeah, that's exactly what I mean.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 10, 2012, 04:29:16 PM
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! (http://custom.simplemachines.org/mods/index.php?action=search;type=12;approved=1;smf_versions=68)

Hmm. Ok, who gets there first? ;D
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: IchBin™ on April 10, 2012, 04:35:52 PM
1, 2 ,3 not it!!
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: kat on April 10, 2012, 04:38:20 PM
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.

Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 10, 2012, 04:41:21 PM
If it was written as a modification...the question is, would it actually be used? If so, heck, I'd write it.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 10, 2012, 04:49:01 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 10, 2012, 04:50:51 PM
Go for it then :)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: kat on April 10, 2012, 04:51:20 PM
I sure would, Lab.

I'd need it for v1.1.6 as well, though. ;)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 10, 2012, 04:52:38 PM
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
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 11, 2012, 08:51:39 AM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: 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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 11, 2012, 09:06:22 AM
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".
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: kat on April 11, 2012, 09:26:51 AM
Yep.

Just replace the whole thing with a link to the mod site, perhaps?
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 11, 2012, 09:34:21 AM
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?), ...
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: 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.

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
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 11, 2012, 10:53:59 AM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: 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.

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
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 11, 2012, 11:21:21 AM
Haha emanuele, very nice point about Package Manager. That was hilarious.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 11, 2012, 11:22:37 AM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Robert. on April 11, 2012, 11:31:12 AM
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. :)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 11, 2012, 11:45:00 AM
It wouldn't decrease bandwidth....although it would for SimpleMachines itself.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 11, 2012, 11:46:00 AM
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
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 11, 2012, 12:25:45 PM
Meh I was on my phone and just skimmed it :P MY bad
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 11, 2012, 05:59:05 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 11, 2012, 05:59:59 PM
@Ant - I agree :)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 11, 2012, 08:42:31 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: 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
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 12, 2012, 11:53:13 AM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 17, 2012, 06:45:53 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 17, 2012, 07:00:14 PM
/me runs not me :P Already took up another project.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 18, 2012, 01:19:41 AM
Not for me either...with the same reason lol.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: emanuele on April 18, 2012, 05:19:07 AM
ohhh...

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

mod done.

Unfortunately it removes *all* the scripts from SMF, updates included.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: NanoSector on April 18, 2012, 09:41:14 AM
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 ::)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 18, 2012, 05:51:00 PM
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
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 19, 2012, 12:31:00 PM
Shoot me a PM when you have the write ups...I might do it. We'll see.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 22, 2012, 05:48:38 PM
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. :)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Adish - (F.L.A.M.E.R) on April 25, 2012, 02:17:47 PM
Ant, you might want to submit this as a mod? It may be nicer that way. :)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 25, 2012, 04:12:24 PM
He just wrote the code, he wanted someone else to package and submit it.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 25, 2012, 07:38:19 PM
Actually I should do the themes one too. Forgot about that the other day. I'll look at it tonight.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: kat on April 26, 2012, 06:29:40 AM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: kat on April 26, 2012, 06:55:43 AM
Yay!

Works, there, too!

Nice one, Squirrel! :)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 26, 2012, 05:13:33 PM
Yes, I know it works. :P
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: kat on April 27, 2012, 06:49:44 AM
My point being that, if I can do the edits, almost anyone can! :)
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 27, 2012, 06:29:31 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 28, 2012, 05:37:33 PM
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>.';
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Matthew K. on April 28, 2012, 05:40:58 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Antechinus on April 28, 2012, 05:46:17 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Arantor on November 10, 2013, 08:19:53 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Oldiesmann on November 16, 2013, 04:47:37 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Arantor on November 16, 2013, 04:55:59 PM
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.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Oldiesmann on November 17, 2013, 01:16:37 PM
I meant the stuff relating to warning about upgrades, not the stuff related to displaying the latest packages.
Title: Re: Add a switch to turn off the "Latest Packages"
Post by: Arantor on November 17, 2013, 01:18:15 PM
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)