News:

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

Main Menu

Randomized Newsfader

Started by ccbtimewiz, May 18, 2008, 02:12:06 AM

Previous topic - Next topic

ccbtimewiz

Link to Modification

Package Information

Latest Version: 1.1
Created by: ccbtimewiz
Built for: SMF 2.0 BETA, SMF 1.1.6 and below
Package: Randomized Newsfader


What is this?

This modification will make it so the newsfader (which can be enabled in Admin > Current Theme > tick the box "Newsfader") to show random items instead of showing the order you put them in.

So, if you had: News 1, News 2, News 3, and News 4 set up, instead of:


News 1, News 2, News 3, News 4, Repeat


With the modification, you'd get:


News 3, News 1, News 4, News 2, (random)



Alteration Log

[!] Released on May 16, 2008.
[!] Ported to SMF 2.0 BETA on May 19, 2008
[!] Fixed install bug on 1.1.6 and SMF BETA 4 versions.


Need Help?

If you need help with this modification, please don't hesitate to post in the support thread. Note that this mod should work on all themes as it only edits one source file.

jossanaijr


ccbtimewiz

The modification works for SMF 2.0 from this point on.

No redownloads are needed. It was already working. XD

Thanks to SunKing for telling me.

Apllicmz




d-shade

This is great I have been looking for something like this!!!

Great Job

ccbtimewiz

I've updated this mod as well. Just the instructions though.

runway27r

I am running 1.1.6 and when I try to install Mod, SMF declares it has errors.
What seems to be the problem here?

THX
Paul

ccbtimewiz

Strange, what other mods do you have installed?

nodent

#8
I have the same problem I have the folowing mods

Mod Name Version 
1. Enhanced Calendar 1.1
2. SMF Gallery Lite 1.9

and I get error

"Error in Package Installation

At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF. "

1. Execute Modification ./Sources/Subs.php Test failed

Nodent


sloter

Quote from: nodent on September 29, 2008, 03:30:17 PM
I have the same problem I have the folowing mods

Mod Name Version 
1. Enhanced Calendar 1.1
2. SMF Gallery Lite 1.9

and I get error

"Error in Package Installation

At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF. "

1. Execute Modification ./Sources/Subs.php Test failed

Nodent


I also get that too.

zeldAIS

hmm it also gave me the same error mentioned when installing at 1.1.6 - but i installed it anyway.

seems that it didn't work but when i did install it manually, the randomizer worked.
"the fansubs/scanlations community must be helping and understanding each other"
"quality fansubs/scanlations takes quality time"
"lazy and nagging leechers makes fansubbers/scanlators assholes"

ccbtimewiz

Huh that's strange. It may be the version number in the package. I'll take a look at it.

ccbtimewiz

Yeah that was the problem. I never put in notation so it would install on later versions. My mistake. ^^;

Well Randomized Newsfader was my first mod after all.

Gp.

Hi,
Seems to work, but look at how the links look when I put them in the newsfader with my current theme....

http://www.the512project.com

How can I fix this?

Morrell

Thanks... Installed this and love it. Just trying to figure out how to get the news thing off the info section now.

Morrell

Ok... I figured out how to remove the default "news" from the info section. Does anyone know how I could add "Who's Online" to this area. I would like to have "Who's Online" at the top of the forum.

Steve

Apllicmz

Update man 1.1.10 and 2.0rc1-2



Eclipse16V

Nice Mod

Here for 2.0 RC2

<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>ccbtimewiz:RandomNewsfader</id>
<version>1.1</version>

<file name="$sourcedir/Subs.php">
<operation>
<search position="replace"><![CDATA[$context['random_news_line'] = $context['news_lines'][mt_rand(0, count($context['news_lines']) - 1)];
]]></search>
<add><![CDATA[ $context['random_news_line'] = $context['news_lines'][mt_rand(0, count($context['news_lines']) - 1)];

// Randomized Newsfader (ccbtimewiz) ---
shuffle($context['fader_news_lines']);
// --------------
]]></add>
</operation>

</file>
</modification>
I worked with:
SMF 2 in German

Shop:
SID Giessen

trebul

Works great thank you for the mod!

      Love talking about pets?
      Visit a friendly pet forum!

      Looking for tips to running a forum?
      Trebul's community guide


         

steve51184

hey i'm on rc2 and have used the fix above but it's not randomizing my news?

Advertisement: