Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Kays on October 02, 2009, 06:06:51 PM

Title: Change Amount Displayed For Wireless & RSS
Post by: Kays on October 02, 2009, 06:06:51 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2162)

This mod adds the option in the Admin Control Panel to set the number of items displayed in either a RSS feed or for wireless devices.This will not affect a limit passed in a url for RSS.


For wireless devices: Posts and Topics > Topic Settings
For RSS: News and Newsletters > Settings

Languages included are:
English
Engish-utf8
English_british
English_british-utf8
Dutch
Dutch-utf8

Translations are welcome

$txt['xmlnews_maxshow'] = 'Number of items to be shown';
$txt['wirelessMaxMessages'] = 'Number of posts per page for wireless display.';
$txt['wirelessMaxTopics'] = 'Number of topics per page for wireless display.';
$txt['wirelessMaxMessagesDefault'] = 'Default 5, maximum 25';
$txt['wirelessMaxTopicsDefault'] = 'Default 9, maximum 50';


Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Sabre™ on October 02, 2009, 09:52:27 PM
Nice! :)
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Kays on October 03, 2009, 09:43:12 AM
Thanks. :)

It's something I've seen requested more than a few times.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: tanshin on January 13, 2010, 06:59:31 PM
Hi there, this is incredibly useful (it just saved me quite a bit of work for something I was planning).

I'm not sure if this is something that can be done with this mod, or if this would have to be requested but, is there any way to customize what data is placed in the feed? I'd like to have only the post title (linked) and avatar (at 30x30), however I'm not sure if this is possible with a change to this mod, or if I'd need something new all together.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Kays on January 13, 2010, 07:14:28 PM
Thanks. :)

This only affects the number of items displayed. To do what you want will require modifying how the feed is put together. And it might not be easy since the avatar is not pulled as part of the data.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: tanshin on January 13, 2010, 07:28:16 PM
Makes sense. I'll see what I can find in some of the files and such!
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Kays on January 13, 2010, 07:56:59 PM
Look in Sources/News.php.

If you have any problems or questions on this please post them in the SMF Coding Discussion (http://www.simplemachines.org/community/index.php?board=60.0) board.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: tanshin on January 13, 2010, 08:34:53 PM
Sounds good, thanks! I'm not too good with PHP but I'll see what I can get from that file.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Ivan23 on May 04, 2010, 06:07:25 PM
Good mod, but, how can I remove the content of message? I only want to get the link and the name of the message, not the content.

Thanks
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Kays on May 04, 2010, 10:25:35 PM
Hi, thanks. For that you'd be best to post the question in the SMF Coding Discussion (http://www.simplemachines.org/community/index.php?board=60.0) board.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: david090366 on January 28, 2011, 10:06:43 PM
I know this is an old topic, but I have a question. Is this supposed to work for phones, in particular the newer smart phones? ( iphone, blackberry, etc.)
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Kays on January 29, 2011, 05:02:22 PM
This only works with any of the wireless templates. Wap, wap2 & imode. This will have no effect if the phone displays the standard theme templates.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: david090366 on January 31, 2011, 03:47:40 AM
Thanks for the reply, I kind of figured it out by myself after doing a little research into how iphones etc work.  :-[ I'm using 1.1.x currently and knew that version used the wap wireless template. So I got to looking into iphones and found out they are capable of reading html and figured the forum might " think " they are a regular browser and not direct them to the wap template. I run a play by post site and have several people who check into the forum every now and then with this type of phone. We have several categories of role play and multiple boards in each category, it's kind ponderous to view on a phone. Thought this would be a great mod for the site because of this.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Kays on January 31, 2011, 09:06:46 AM
The main reason I wrote this mod is that these values are hard coded in and there were a number of requests to change those values.

Even if a phone does display the regular html page. It can be forced to display a wireless template if the user adds ?wap2 to the url to your forums.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Rain Forest on March 15, 2011, 07:04:21 PM
Dutch
$txt['xmlnews_maxshow'] = 'Aantal items dat getoond wordt';
$txt['wirelessMaxMessages'] = 'Aantal berichten per pagina voor draadloos gebruik.';
$txt['wirelessMaxTopics'] = 'Aantal topics per pagina voor draadloos gebruik.';
$txt['wirelessMaxMessagesDefault'] = 'Standaard 5, maximaal 25';
$txt['wirelessMaxTopicsDefault'] = 'Standaard 9, maximaal 50';
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: Kays on March 19, 2011, 09:44:21 AM
Thanks. :)

I've just updated it to include Dutch.
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: carlosdelarco on May 07, 2011, 09:34:56 AM
Hi Kays

Here is the translation into Spanish!!

Enjoy!!

$txt['xmlnews_maxshow'] = 'Número de elementos que se mostrarán';
$txt['wirelessMaxMessages'] = 'Número de mensajes por página para visualización inalámbrica.';
$txt['wirelessMaxTopics'] = 'Cantidad de mensajes por página para visualización inalámbrica.';
$txt['wirelessMaxMessagesDefault'] = 'Por defecto 5, máximo 25';
$txt['wirelessMaxTopicsDefault'] = 'Por defecto 9, máximo 50';
Title: Re: Change Amount Displayed For Wireless & RSS
Post by: bruce86 on August 18, 2011, 09:45:56 AM
Italian:

$txt['xmlnews_maxshow'] = 'Numero di articoli da visualizzare';
$txt['wirelessMaxMessages'] = 'Numero di post per pagina per la visualizzazione della modalità wireless.';
$txt['wirelessMaxTopics'] = 'Numero di argomenti per pagina per la visualizzazione della modalità wireless.';
$txt['wirelessMaxMessagesDefault'] = 'Predefinita 5, massimo 25';
$txt['wirelessMaxTopicsDefault'] = 'Predefinita 9, massimo 50';