Change Amount Displayed For Wireless & RSS

Started by Kays, October 02, 2009, 06:06:51 PM

Previous topic - Next topic

Kays

Link to Mod

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



If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Sabre™

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Kays

Thanks. :)

It's something I've seen requested more than a few times.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

tanshin

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.

Kays

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.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

tanshin

Makes sense. I'll see what I can find in some of the files and such!

Kays

Look in Sources/News.php.

If you have any problems or questions on this please post them in the SMF Coding Discussion board.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

tanshin

Sounds good, thanks! I'm not too good with PHP but I'll see what I can get from that file.

Ivan23

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

Kays

Hi, thanks. For that you'd be best to post the question in the SMF Coding Discussion board.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

david090366

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.)

Kays

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.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

david090366

#12
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.

Kays

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.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Rain Forest

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

Kays

Thanks. :)

I've just updated it to include Dutch.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

carlosdelarco

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

bruce86

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

Advertisement: