News:

SMF 2.1.3 has been released! Take it for a spin! Read more.

Main Menu

AJAX Recent Topics

Started by live627, July 08, 2008, 07:15:38 PM

Previous topic - Next topic

live627

Link to Mod

AJAX Recent Topics 1.1 developed by live627 and created by SlammedDime



This mod adds a Recent Topics list that is updated via AJAX to your board.  It can be found at ?action=recenttopics

Settings can be found in 'Current Theme' options in your admin panel.

This will also work with specific boards or categories:
?action=recenttopics;boards=1,2,3
or
?action=recenttopics;board=3
or
?action=recenttopics;c=3

To-do:
> Add a description so when the user is viewing the recent topics, they show up as such in the Who's online list
> Exclude AJAX calls for new info from hit count
> Convert template to semantic version

Turkish Translation (Modifications.turkish.php)
$txt['recent_topics'] = 'Son Konular';
$txt['minutes_ago'] = ' Dakika önce';
$txt['number_recent_topics_interval'] = 'Güncellenmiş konular için kontrol edilicek (saniye cinsinden) bekleme süresi';
$txt['number_recent_topics_interval_desc'] = '5-10 sn kabul edilebilir,çok düşük değil.';
$txt['number_recent_topics'] = 'Son konular sayfasın da gösterilicek konu sayısı';


German Translation (Modifications.german.php)
// AJAX Recent Topics
$txt['recent_topics'] = 'Neueste Themen';
$txt['minutes_ago'] = ' Minuten her';
$txt['number_recent_topics_interval'] = 'Zeit (in Sekunden) zwischen Update-Check nach neuen Beiträgen';
$txt['number_recent_topics_interval_desc'] = 'Nicht zu niedrig wählen, 5-10 Sekunden sind vernünftig';
$txt['number_recent_topics'] = 'Anzahl der anzuzeigenden Themen auf der Neueste-Themen-Seite';


Changelog
Version 1.1 - June 10, 2010, 12:56:07 AM
* Update for 1.1.11 and 2.0 RC3

Version 1.0.1 - September 18, 2008, 03:59:27 PM
! Fixed SQL query

Legend:
--------------------------------------------------------------------------------
! Minor change or bugfix
* Feature edit
& Known bug
+ Feature addition
- Feature removal

Qayyom Ashraf

Any Live / working DEMO? or Screen shots

Please
Qayyom Ashraf  |  Karachi-PK |::.www.JangForum.Com.::|

SlammedDime

This isn't my site, or my mod, but the functionality is identical

http://mycoffeelounge.net/forum-recent.php
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Alpay

#3
Dear SlammedDime 
I would like permission to translate your mod, AJAX Recent Topics into Turkish. If you accept, I also want to kindly ask you to release it in the mod site, so that I won't be violating any redistribution rules via redistibuting the mod myself. Thank you in advance.

Quote$txt['recent_topics'] = 'Son Konular';
$txt['minutes_ago'] = ' Dakika önce';
$txt['number_recent_topics_interval'] = 'Güncellenmiş konular için kontrol edilicek (saniye cinsinden) bekleme süresi';
$txt['number_recent_topics_interval_desc'] = '5-10 sn kabul edilebilir,çok düşük değil.';
$txt['number_recent_topics'] = 'Son konular sayfasın da gösterilicek konu sayısı';

Best Regards,
Alpay

Edit :
SlammedDime ; you're welcome,if one or two words will been updated,I'll contact u with pm,nice days

SlammedDime

If you don't mind, I'll kindly add the information to the first post of this topic.  Thanks for the translation!
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

stanaca

...

digit

#6
Wow!  Very cool!  Thanks!  (>I< have a new default page!)

Does this increase server load in any way?

hmm, small issue... I have noticed that even though a post was made about 10 minutes ago - it's still showing 0 minutes ago... even after new posts have updated the page.  If I manually reload the page - the times ARE updated
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

stanaca

You can use this link as demo but my site is slow in case of posts so page may not update.


Demo:
http://www.stanaca.com/index.php?action=recenttopics
...

digit

Let me know when you create the AJAX who's online list!   ;)
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

SlammedDime

The times will not update automatically.  That would be far too much javascript work.

As for server load: it's less server load than someone pushing F5 to refresh the page.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

jossanaijr

Sorry but what exactly does this MOD do?

Minare

Thank u for the mod

I am using here and I want to ask sth, can we set how many topics will be displayed ?

If yes, how ?

I couldn find any settings in admin

Thanks again

p.goepfert

I translated it to German - not very professional, but a nativ Speaker understands :)

<file name="$languagedir/Modifications.german.php">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[// AJAX Recent Topics
$txt['recent_topics'] = 'Neueste Themen';
$txt['minutes_ago'] = ' Minuten her';
$txt['number_recent_topics_interval'] = 'Zeit (in Sekunden) zwischen Update-Check nach neuen Beiträgen';
$txt['number_recent_topics_interval_desc'] = 'Nicht zu niedrig wählen, 5-10 Sekunden sind vernünftig';
$txt['number_recent_topics'] = 'Anzahl der anzuzeigenden Themen auf der Neueste-Themen-Seite';

]]></add>
</operation>
</file>

SlammedDime

jossanaijr - Look at the link in the example in the post below yours, as well as the example I posted in my second post in the topic, should be explanatory.

منارة - Settings can be found in Current Theme settings in your Admin panel.  You can set the number of topics and the refresh rate.  Default is 50 and 10 seconds, respectively.

Thank you pago.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

jossanaijr

Quote from: SlammedDime on July 09, 2008, 06:13:24 PM
jossanaijr - Look at the link in the example in the post below yours, as well as the example I posted in my second post in the topic, should be explanatory.
Because I have this (image attached) in my forum.  Besides the layout and the information a little different what is the advantage of this MOD?  :-[

SlammedDime

I don't know what exactly you have, but this updates topics on the page in real time, no refresh needed.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

jossanaijr


Paracelsus

2 thumbs up, I was waiting for this Mod ;)


A few questions:

1. How to change that gray color of the new listed topics?

2. Would it be possible to config this feature as "post-centered" instead of "topic-centered"? (see the attached example)

SlammedDime

1) It uses the classes windowbg and windowbg2 of your style.css, so whichever colors you have set for those, thats what it uses.

2) Are you talking about showing the contents, or part of it, from the post as well?  The only problem I forsee with this is bbcode, and throwing the layout out of line.  I suppose I could strip all bbcode and image tags and html tags out, so its just plain text though.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Paracelsus

Quote from: SlammedDime on July 10, 2008, 02:52:57 AM
1) It uses the classes windowbg and windowbg2 of your style.css, so whichever colors you have set for those, thats what it uses.

2) Are you talking about showing the contents, or part of it, from the post as well?  The only problem I forsee with this is bbcode, and throwing the layout out of line.  I suppose I could strip all bbcode and image tags and html tags out, so its just plain text though.

1) Got it ;) and 2) Yes, that was my point (a little content preview).


An issue:

- The message time isn't updated correctly - If you don't refresh the recent topics page, the "xx minutes ago" thing doesn't update itself (except for the new topics that popup). Eventually, you'll have a full page with "0 minutes ago". (I know this because I've changed the target of "new post" link to a new window)

Advertisement: