Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on September 15, 2007, 01:56:23 PM

Title: Most Popular Topic Today
Post by: vbgamer45 on September 15, 2007, 01:56:23 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=937)

Most Popular Topic


SMF Version: 2.0.X


Description:
This mod adds a new section to your boardindex.template so you can see the most popular topic of the moment.

Why Not Visit:
https://www.smfhacks.com
Title: Re: Most Popular Topic Today
Post by: Sakae on September 15, 2007, 03:00:58 PM
Installed and running in mt SMF 1.1.3. Very nice job, congratulations.
Title: Re: Most Popular Topic Today
Post by: Neorics on September 15, 2007, 03:37:57 PM
Modifications to SMF files

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 89: parser error : Opening and ending tag mismatch: file line 69 and modification in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: </modification> in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 90: parser error : Premature end of data in tag modification line 3 in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/groups/modparser/htdocs/index.php on line 450

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/groups/modparser/htdocs/index.php:450 Stack trace: #0 /home/groups/modparser/htdocs/index.php(450): SimpleXMLElement->__construct('???<?xml versio...') #1 /home/groups/modparser/htdocs/index.php(419): parseModificationXML('/tmp/smf_xml/Mo...', Object(SimpleXMLElement), 'all') #2 /home/groups/modparser/htdocs/index.php(94): parsePackageInfoXML('/tmp/smf_xml/pa...', 'install', 'all') #3 /home/groups/modparser/htdocs/index.php(735): parseArchive('/tmp/phpndKauW', 'install', 'all') #4 {main} thrown in /home/groups/modparser/htdocs/index.php on line 450
Title: Re: Most Popular Topic Today
Post by: kamili34 on September 15, 2007, 03:42:04 PM
Good job Thanks
Title: Re: Most Popular Topic Today
Post by: hayley2007 on September 15, 2007, 04:56:59 PM
Which file do i download, cuz theres 3 on the mod page :/ help a newb lol
Title: Re: Most Popular Topic Today
Post by: TrueSatan on September 15, 2007, 05:00:36 PM
The first file is for English users, the second is for Russian users and the third a Russian users utf8 version...if you aren't Russian I Have a feeling that your choice may not be too difficult.
Title: Re: Most Popular Topic Today
Post by: ArkServer on September 15, 2007, 05:34:17 PM
does this work with 1.12?
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 15, 2007, 05:37:50 PM
Working fine, thank you!

S.M.F. 1.1.3

EDIT: BTW, Does this mod observe permissions?
Title: Re: Most Popular Topic Today
Post by: hayley2007 on September 15, 2007, 07:24:03 PM
Thanks TrueSatan, should of been put in the description anyway lol
Title: Re: Most Popular Topic Today
Post by: asdas2 on September 15, 2007, 10:49:04 PM
i would love to see some kind of SCREEN SHOTS .. please
Title: Re: Most Popular Topic Today
Post by: Neorics on September 16, 2007, 02:13:08 AM
Quote from: Neorics on September 15, 2007, 03:37:57 PM
Modifications to SMF files

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 89: parser error : Opening and ending tag mismatch: file line 69 and modification in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: </modification> in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: Entity: line 90: parser error : Premature end of data in tag modification line 3 in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: in /home/groups/modparser/htdocs/index.php on line 450

Warning: SimpleXMLElement::__construct() [function.SimpleXMLElement---construct]: ^ in /home/groups/modparser/htdocs/index.php on line 450

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/groups/modparser/htdocs/index.php:450 Stack trace: #0 /home/groups/modparser/htdocs/index.php(450): SimpleXMLElement->__construct('???<?xml versio...') #1 /home/groups/modparser/htdocs/index.php(419): parseModificationXML('/tmp/smf_xml/Mo...', Object(SimpleXMLElement), 'all') #2 /home/groups/modparser/htdocs/index.php(94): parsePackageInfoXML('/tmp/smf_xml/pa...', 'install', 'all') #3 /home/groups/modparser/htdocs/index.php(735): parseArchive('/tmp/phpndKauW', 'install', 'all') #4 {main} thrown in /home/groups/modparser/htdocs/index.php on line 450

oops my bad, this one is for the russian utf

the english one works fine

thanks
Title: Re: Most Popular Topic Today
Post by: Skipdawg on September 16, 2007, 02:31:48 AM
Cool mod but I see one issue. It shows hidden forum post topic name too.  :o
Title: Re: Most Popular Topic Today
Post by: messyone on September 16, 2007, 04:10:50 AM
I have installed it with no errors on S.M.F. 1.1.3 but still don't see it in the info centre.
Must it be turned on someplace?
Title: Re: Most Popular Topic Today
Post by: sifirforum.com on September 16, 2007, 04:13:21 AM
i want to select boards and show most 10 topics
Title: Re: Most Popular Topic Today
Post by: Neorics on September 16, 2007, 05:51:11 AM
and does it work for tinyportal themes? or do we need manual install?
Title: Re: Most Popular Topic Today
Post by: Dragooon on September 16, 2007, 05:53:49 AM
Themes are themes.
You always need to manual install things if required.
Title: Re: Most Popular Topic Today
Post by: Neorics on September 16, 2007, 06:03:04 AM
yeah... my bad.. i just used package parser and noticed i have the boardindex template to edit hehehe
Title: Re: Most Popular Topic Today
Post by: messyone on September 16, 2007, 06:10:24 AM
Quote from: messyone on September 16, 2007, 04:10:50 AM
I have installed it with no errors on S.M.F. 1.1.3 but still don't see it in the info centre.
Must it be turned on someplace?

Help?
Title: Re: Most Popular Topic Today
Post by: Neorics on September 16, 2007, 06:21:55 AM
Quote from: messyone on September 16, 2007, 06:10:24 AM
Quote from: messyone on September 16, 2007, 04:10:50 AM
I have installed it with no errors on S.M.F. 1.1.3 but still don't see it in the info centre.
Must it be turned on someplace?

Help?


you need to manually install it if you are using a different theme other than the default theme

use the link below to find out how to install this package manually
http://modparser.dev.dansoftaustralia.net/
Title: Re: Most Popular Topic Today
Post by: rosoner on September 16, 2007, 06:32:57 AM
i just installed it but there is the problem. On board index
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg2.imagetitan.com%2Fimg2%2Fsmall%2F5%2F5_1340.jpg&hash=f31bf8d5711e608c0cf91ea4e1b227551a0afcba) (http://img2.imagetitan.com/img.php?image=5_1340.jpg)
Title: Re: Most Popular Topic Today
Post by: Dragooon on September 16, 2007, 06:37:29 AM
What language co-oliations are you using? English -UTF8?
Go to Admin > Server Settings > And try changing the language to English.
Title: Re: Most Popular Topic Today
Post by: Neorics on September 16, 2007, 06:38:41 AM
you probably installed the wrong one

uninstall that one and download the first one on the list
Title: Re: Most Popular Topic Today
Post by: messyone on September 16, 2007, 06:46:35 AM
Quote from: Neorics on September 16, 2007, 06:21:55 AM
Quote from: messyone on September 16, 2007, 06:10:24 AM
Quote from: messyone on September 16, 2007, 04:10:50 AM
I have installed it with no errors on S.M.F. 1.1.3 but still don't see it in the info centre.
Must it be turned on someplace?

Help?


you need to manually install it if you are using a different theme other than the default theme

use the link below to find out how to install this package manually
http://modparser.dev.dansoftaustralia.net/

Using the different theme and it's not showing.
Title: Re: Most Popular Topic Today
Post by: Neorics on September 16, 2007, 07:36:44 AM
http://modparser.dev.dansoftaustralia.net/

go to the link above, in that site

browse to the mod in your computer

choose which smf version you are using

leave it at install

choose theme edit

then click send file



now do exactly what it tells you
Title: Re: Most Popular Topic Today
Post by: messyone on September 16, 2007, 08:03:08 AM
Quote from: Neorics on September 16, 2007, 07:36:44 AM
http://modparser.dev.dansoftaustralia.net/

go to the link above, in that site

browse to the mod in your computer

choose which smf version you are using

leave it at install

choose theme edit

then click send file



now do exactly what it tells you

Yahooooo....... it worked. Many thx.
Title: Re: Most Popular Topic Today
Post by: Minare on September 16, 2007, 08:04:03 AM
Thanks a lot, it works well.

If anyone wants, I can tell it manually  ;)
Title: Re: Most Popular Topic Today
Post by: Hoochie Coochie Man on September 16, 2007, 09:37:54 AM
thank you very much, it works perfectly!
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 16, 2007, 11:11:40 AM
Quote from: jossanaijr on September 15, 2007, 05:37:50 PM

S.M.F. 1.1.3

EDIT: BTW, Does this mod observe permissions?

Well I made a test by myself and this mod does not observe permissions. Guest can see the title of private boards (even they cannot see all the post).
So I will have to uninstall it and wait for a update version.
Title: Re: Most Popular Topic Today
Post by: fireandsalt on September 16, 2007, 03:34:03 PM
Quote from: Skipdawg on September 16, 2007, 02:31:48 AM
Cool mod but I see one issue. It shows hidden forum post topic name too.  :o
I like the mod, and it works fine on 1.1.3, my only concern is the same as skipdawg. It shows the hidden forum topics as well. I have uninstalled it until a version comes out that will not show topics on my moderator's board.

Cool concept though!
Title: Re: Most Popular Topic Today
Post by: ArkServer on September 16, 2007, 03:53:52 PM
i guess no 1.12 support?
Title: Re: Most Popular Topic Today
Post by: Grek.Kamchatka on September 16, 2007, 09:54:48 PM
Quote from: ArkServer on September 16, 2007, 03:53:52 PM
i guess no 1.12 support?
not tested. try it yourself
Title: Re: Most Popular Topic Today
Post by: CiOooo on September 17, 2007, 11:54:20 AM
hello, i need a little help about the mod

after i installed the mod, the reply phrase appeared ( re: )

i want to delete this phrase on boardindex (or on main page)

which queries should i delete?
Title: Re: Most Popular Topic Today
Post by: Apostaganha on September 17, 2007, 06:57:43 PM
huge problem, shows every kind of topic even if this one shoud not be seen by visitors!
Title: Re: Most Popular Topic Today
Post by: yeop on September 18, 2007, 01:22:14 AM
nice mod indeed, looking forward this mod can be relate most popular topic by day, weeks, months and so on..

Thanks in advanced
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 19, 2007, 10:24:55 AM
Hi Grek_Kamchatka
any idea about when we will have an update fixing the permissions problem?
;)
Title: Re: Most Popular Topic Today
Post by: Grek.Kamchatka on September 19, 2007, 07:51:19 PM
There are no problem, this mod was made for my forum and i don't need this function. But i'll think about it.
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 19, 2007, 08:31:35 PM
Quote from: Grek_Kamchatka on September 19, 2007, 07:51:19 PM
There are no problem, this mod was made for my forum and i don't need this function. But i'll think about it.
Thank you!
Title: Re: Most Popular Topic Today
Post by: Apostaganha on September 20, 2007, 07:13:53 PM
Quote from: Grek_Kamchatka on September 19, 2007, 07:51:19 PM
There are no problem, this mod was made for my forum and i don't need this function. But i'll think about it.

LOL so why bother sharing with the others?

Title: Re: Most Popular Topic Today
Post by: Grek.Kamchatka on September 20, 2007, 07:41:21 PM
without any reason. who need this mod - please, download and use, unless go past =)
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 20, 2007, 08:01:03 PM
I found this MOD fantastic but my forum is a medical one and there is some boards that cannot be available to public.
;)
Title: Re: Most Popular Topic Today
Post by: Apostaganha on September 20, 2007, 08:06:50 PM
Quote from: jossanaijr on September 20, 2007, 08:01:03 PM
I found this MOD fantastic but my forum is a medical one and there is some boards that cannot be available to public.
;)

Like me, but has he said this mod is only for his board :|
Title: Re: Most Popular Topic Today
Post by: snork13 on September 20, 2007, 08:23:04 PM
Quote from: Apostaganha on September 20, 2007, 08:06:50 PM
Quote from: jossanaijr on September 20, 2007, 08:01:03 PM
I found this MOD fantastic but my forum is a medical one and there is some boards that cannot be available to public.
;)

Like me, but has he said this mod is only for his board :|
i think what he is trying to say is he made the mod for his forum and was nice enough to share with others. He didn't need the function to hide topic based on permissions. It is possible todo, maybe in the future he will look into it.

-snork13
Title: Re: Most Popular Topic Today
Post by: Grek.Kamchatka on September 23, 2007, 09:39:13 PM
Version 2.0 now available.
Title: Re: Most Popular Topic Today
Post by: Apostaganha on September 24, 2007, 02:08:15 AM
Are now the permissions soved?
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 24, 2007, 07:03:16 AM
Quote from: Grek_Kamchatka on September 23, 2007, 09:39:13 PM
Version 2.0 now available.
Hi Grek_Kamchatka,
thank you.
Installed and working fine.
I know you did not need this changes in your forum.
In future, if you change something I will just ask you to think about the possibility to show the most popular topic by membergroup; so it will show the most popular topic permitted by each membergroup.
Thank you.
Title: Re: Most Popular Topic Today
Post by: Neorics on September 24, 2007, 08:38:56 AM
so what's the changes made on the version 2 cause the first release is working fine for me
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 24, 2007, 10:06:23 AM
Quote from: Neorics on September 24, 2007, 08:38:56 AM
so what's the changes made on the version 2 cause the first release is working fine for me
It does not allow to see post if you do not have permission.
Title: Re: Most Popular Topic Today
Post by: Neorics on September 24, 2007, 12:26:15 PM
Quote from: jossanaijr on September 24, 2007, 10:06:23 AM
Quote from: Neorics on September 24, 2007, 08:38:56 AM
so what's the changes made on the version 2 cause the first release is working fine for me
It does not allow to see post if you do not have permission.

mine already does that...
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 24, 2007, 12:28:08 PM
Quote from: Neorics on September 24, 2007, 12:26:15 PM
Quote from: jossanaijr on September 24, 2007, 10:06:23 AM
Quote from: Neorics on September 24, 2007, 08:38:56 AM
so what's the changes made on the version 2 cause the first release is working fine for me
It does not allow to see post if you do not have permission.

mine already does that...
First version allows guest to see title posts even if those post are in restricted boards.
Title: Re: Most Popular Topic Today
Post by: Neorics on September 24, 2007, 12:39:52 PM
i'm dropping this mod...

i suggest making only the database query to the boards that are not hidden and therefore it will only show and always show the most popular topic today and not a sentence saying sorry you cant see this board cause it's locked... bla bla bla...
Title: Re: Most Popular Topic Today
Post by: kamili34 on September 24, 2007, 02:16:09 PM
Thanks :) ;D
Title: Re: Most Popular Topic Today
Post by: Grek.Kamchatka on September 24, 2007, 06:15:04 PM
Quote from: Neorics on September 24, 2007, 12:39:52 PM
i'm dropping this mod...

i suggest making only the database query to the boards that are not hidden and therefore it will only show and always show the most popular topic today and not a sentence saying sorry you cant see this board cause it's locked... bla bla bla...
It's a variant, but not exactly right.
Title: Re: Most Popular Topic Today
Post by: franklinrony on September 25, 2007, 12:15:36 AM
good mod. a question
   
how configure  that it shows  popular post but of some boards   only?
Title: Re: Most Popular Topic Today
Post by: Grek.Kamchatka on September 25, 2007, 12:24:34 AM
Quote from: frony on September 25, 2007, 12:15:36 AM
how configure  that it shows  popular post but of some boards   only?
Only by editing sql query.

...bla-bla-bla...
WHERE ID_BOARD=23
   AND ID_BOARD=34
   AND ID_BOARD=56
...bla-bla-bla..

and so on...
Title: Re: Most Popular Topic Today
Post by: Hoochie Coochie Man on September 25, 2007, 06:16:50 AM
OK! We solved visitors thing.
Visitors can't see populer topic. thank you

But i have last problem.
I have a hidden board for administrators and moderators
we have secret meetings about forum..
And users can see the topic name in "Most Popular Topic Today"
Can you help me about that, I don't want to see hidden board's topics..
Title: Re: Most Popular Topic Today
Post by: franklinrony on September 25, 2007, 12:20:58 PM
Quote from: Grek_Kamchatka on September 25, 2007, 12:24:34 AM
Quote from: frony on September 25, 2007, 12:15:36 AM
how configure  that it shows  popular post but of some boards   only?
Only by editing sql query.

...bla-bla-bla...
WHERE ID_BOARD=23
   AND ID_BOARD=34
   AND ID_BOARD=56
...bla-bla-bla..

and so on...
thanks for your help :)
Title: Re: Most Popular Topic Today
Post by: Grek.Kamchatka on September 25, 2007, 06:47:54 PM
Quote from: HOOCHIE COOCHIE MAN on September 25, 2007, 06:16:50 AM
OK! We solved visitors thing.
Visitors can't see populer topic. thank you

But i have last problem.
I have a hidden board for administrators and moderators
we have secret meetings about forum..
And users can see the topic name in "Most Popular Topic Today"
Can you help me about that, I don't want to see hidden board's topics..
If board is hide, and users haven't permission to see this board, your users can't see this topic, they will see "Sorry, it's a locked board, you can't see this topic"
Title: Re: Most Popular Topic Today
Post by: fre3men on September 27, 2007, 07:35:07 AM
QuoteIf board is hide, and users haven't permission to see this board, your users can't see this topic, they will see "Sorry, it's a locked board, you can't see this topic"

[Spaninglish mode on]  ;D

I have the same problem, users can't see into the topic, but  they can see the title name, and I think that the others users (HOOCHIE COOCHIE MAN,   Apostaganha, Neorics, jossanaijr...),  don't want that users without permissions can see title too.

Is very good mod  :) , but for me have this "bug"  :'(

Thanks for your job. I hope that you can solved it (for example, in the TP block of Last Post, not appear the topics that the users don't have permissions).
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 27, 2007, 09:01:36 AM
Check your version.  Now users can NOT see titles anymore if they are not allowed to.

The only changes I think it needs is that it could show the most popular topic for each membergroup, so if member1 can see boards #1 and #2 and member 2 can see only boards #2 and If the the most popular topic is in board #1 followed by a topic in board #2, member #1 would see the real most popular topic in board #1 but member 2 would see the most popular topic of boards he is allowed to see, in this case the topic in board #2 (and not the message "Sorry, it's a locked board, you can't see this topic").  Confused? :-[
Title: Re: Most Popular Topic Today
Post by: Hoochie Coochie Man on September 27, 2007, 12:57:23 PM
Quote from: Grek_Kamchatka on September 25, 2007, 06:47:54 PM
Quote from: HOOCHIE COOCHIE MAN on September 25, 2007, 06:16:50 AM
OK! We solved visitors thing.
Visitors can't see populer topic. thank you

But i have last problem.
I have a hidden board for administrators and moderators
we have secret meetings about forum..
And users can see the topic name in "Most Popular Topic Today"
Can you help me about that, I don't want to see hidden board's topics..
If board is hide, and users haven't permission to see this board, your users can't see this topic, they will see "Sorry, it's a locked board, you can't see this topic"
No, it's not right!
My users can see the hide board's topic! :(

In the mod's new version, the visitors can't see the hide board's topic, it is OK!

But the users, not ok! :S
Title: Re: Most Popular Topic Today
Post by: Grek.Kamchatka on September 27, 2007, 04:42:45 PM
Quote from: HOOCHIE COOCHIE MAN on September 27, 2007, 12:57:23 PM
Quote from: Grek_Kamchatka on September 25, 2007, 06:47:54 PM
Quote from: HOOCHIE COOCHIE MAN on September 25, 2007, 06:16:50 AM
OK! We solved visitors thing.
Visitors can't see populer topic. thank you

But i have last problem.
I have a hidden board for administrators and moderators
we have secret meetings about forum..
And users can see the topic name in "Most Popular Topic Today"
Can you help me about that, I don't want to see hidden board's topics..
If board is hide, and users haven't permission to see this board, your users can't see this topic, they will see "Sorry, it's a locked board, you can't see this topic"
No, it's not right!
My users can see the hide board's topic! :(

In the mod's new version, the visitors can't see the hide board's topic, it is OK!

But the users, not ok! :S
I just now test it and everything is ok. Visitors and users can't see topic in hide board. Anybody see this trouble on your forum?
Title: Re: Most Popular Topic Today
Post by: Hoochie Coochie Man on September 28, 2007, 02:36:35 PM
Sorry but i think i can't explain myself :)
it's right, users can't see the hide board's topic's inside
But on the boardindex.template.php, visitors can see the hide board's topic's title

my only problem, i don't want to see them to see the topic, like the visitors :)

Thanks..
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 28, 2007, 03:24:02 PM
Quote from: HOOCHIE COOCHIE MAN on September 28, 2007, 02:36:35 PM
Sorry but i think i can't explain myself :)
it's right, users can't see the hide board's topic's inside
But on the boardindex.template.php, visitors can see the hide board's topic's title

my only problem, i don't want to see them to see the topic, like the visitors :)

Thanks..
No they don't.  Did you check your version?
Title: Re: Most Popular Topic Today
Post by: Hoochie Coochie Man on September 28, 2007, 04:16:05 PM
Yes i did it  :-\
version 2.0
Title: Re: Most Popular Topic Today
Post by: jossanaijr on September 28, 2007, 04:20:16 PM
Strange.
Are you sure your board is restricted?  Does it has LOCAL permission instead of GLOBAL?
Title: Re: Most Popular Topic Today
Post by: Hoochie Coochie Man on September 28, 2007, 05:34:50 PM
Is it right?
http://img250.imageshack.us/img250/7076/62856799mr8.png
Title: Re: Most Popular Topic Today
Post by: littleone on October 01, 2007, 03:45:30 PM
Ok here is a problem.....

Same as Above....

I have a Moderator only board, and if it is the most popular topic, then the members can see the topics title, which I do NOT want.  IF the board is hidden, everything should be hidden, including the title.  anyway to put a check on this for a future version?  I removed this mod until thats updated.  Thanks
Title: Re: Most Popular Topic Today
Post by: Hoochie Coochie Man on October 02, 2007, 12:44:56 PM
Quote from: littleone on October 01, 2007, 03:45:30 PM
Ok here is a problem.....

Same as Above....

I have a Moderator only board, and if it is the most popular topic, then the members can see the topics title, which I do NOT want.  IF the board is hidden, everything should be hidden, including the title.  anyway to put a check on this for a future version?  I removed this mod until thats updated.  Thanks
There you go,
now another guy have my problem too :)
Now you understand me?
Please update it :(
Title: Re: Most Popular Topic Today
Post by: ltdeta on October 04, 2007, 09:25:25 AM
can you make it more flexible ?

for example showing more than one topic per day  ;)
Title: Re: Most Popular Topic Today
Post by: TrueSatan on October 04, 2007, 10:44:57 AM
Folks...Please see reply 41 and note that Grek made it for his own site, it does all he needs it to do there, and has been kind enough to share it with us.
Title: Re: Most Popular Topic Today
Post by: Hoochie Coochie Man on October 04, 2007, 01:02:54 PM
Quote from: TrueSatan on October 04, 2007, 10:44:57 AM
Folks...Please see reply 41 and note that Grek made it for his own site, it does all he needs it to do there, and has been kind enough to share it with us.
Yeah I Saw it!
I've just request!
Title: Re: Most Popular Topic Today
Post by: ikaroweb on October 05, 2007, 04:56:54 PM
this mod show the topic with more answers in last the 24 hours.
it's possible to have the topic more it is visited in last the 24 hours?

Sorry for my bad english!  :-[
Title: Re: Most Popular Topic Today
Post by: ikaroweb on October 07, 2007, 03:26:42 AM
Someone could help me?
Title: Re: Most Popular Topic Today
Post by: ceewee on November 22, 2007, 03:13:45 PM
Jut installed it on 2 smf boards one with 15 mods already and the other one has already 45 mods installed  ;D

Both are 1.1.4 boards so upgrade your info on smf mod site plz.
Title: Re: Most Popular Topic Today
Post by: Gourgi on November 25, 2007, 06:32:22 PM
workes fine in my 1.1.4 smf
many thanks to the author
Title: Re: Most Popular Topic Today
Post by: Aileen on November 28, 2007, 05:11:26 AM
Hi, is this OK on a dilber theme. Hoe you can help me installing it. thanks
Title: Re: Most Popular Topic Today
Post by: TrueSatan on November 28, 2007, 05:46:40 AM
Similar to your other queries on other topics...detailed reply given there.
Title: Re: Most Popular Topic Today
Post by: jasuk70 on December 08, 2007, 05:55:28 PM
I have a similar problem to the other people here. It is a great mod, we use the forum of a On line Gaming Guild, one of the Guild Officers posted to a board hidden to normal guild members with a topic something like.

"I've been having problems reported about 'xxxx'"

And this topic appeared in the most popular of the day visible by to all members, obviously "xxxx" wasn't very happy with this and left the guild. (It was actually something benign and went completely off topic hence became popular).

I've removed the mod, I just wanted to point out what other people are mentioning. If it gets something to not include hidden boards then I'll put it back on.

Cheers,

Jas
Title: Re: Most Popular Topic Today
Post by: mark7144 on March 15, 2008, 08:03:24 AM
Quote from: yeop on September 18, 2007, 01:22:14 AM
nice mod indeed, looking forward this mod can be relate most popular topic by day, weeks, months and so on..

Thanks in advanced
Is there a mod out there that does this? Because that's exactly what I'm looking for...
Title: Re: Most Popular Topic Today
Post by: Nibogo on March 15, 2008, 11:10:46 AM
Nice i install in my forum with a manual edit and works great thanks ;)
Title: Re: Most Popular Topic Today
Post by: khamseen on October 24, 2008, 06:46:01 PM
Hey sorry for the bump, but I just had to uninstall this mod because whilst installed, only the main admin account could see topics in any boards that weren't visible to their primary membergroup, but for some reason I got a PM from a rather distressed member of my community who was able to see a topic which was in an admin board... I can't explain why though as his permissions are identical to all other standard members.

Can you help me out with this one please?
Title: Re: Most Popular Topic Today
Post by: Phat^Trance on December 27, 2008, 09:43:23 AM
is it possible to add more topics than just one?
Title: Re: Most Popular Topic Today
Post by: bpratt on January 04, 2009, 09:17:14 PM
Quote from: mark7144 on March 15, 2008, 08:03:24 AM
Quote from: yeop on September 18, 2007, 01:22:14 AM
nice mod indeed, looking forward this mod can be relate most popular topic by day, weeks, months and so on..

Thanks in advanced
Is there a mod out there that does this? Because that's exactly what I'm looking for...

Like you, this mod is a great mod and something that a lot of users like to check out, but the only thing that really lets it down big time, is the fact that it does not take in to account users permissions.

Like many that I've read in here, I have a admin/moderator discussion board, and lately one of the topics in there has become more popular than any other topic on the forums, and non-admin users are reading the "Sorry, it's a locked board, you can't read this topic".

The impression of secret forum discussions is not something that we want people to think we're doing. :)


Sooo.... if anyone is interested in upgrading/doing their own version of this mod, I dare say they'd be a lot of people very happy with you.  :)
Title: Re: Most Popular Topic Today
Post by: ernest on February 15, 2009, 09:37:05 AM
great mod  ;D
by the way, which part should i change so it can show 5 most popular topic?
Title: Re: Most Popular Topic Today
Post by: ernest on February 18, 2009, 09:25:32 AM
im realy sorry bout the bump, but did anyone have a solution for my question? coz im not pretty good at scripting  :'(
Title: Re: Most Popular Topic Today
Post by: bpratt on November 16, 2009, 09:43:14 PM
I'm trying to make the move to 2.0RC2, and sadly it doesn't want to install.

Is there likely to be an update to this mod?
Title: Re: Most Popular Topic Today
Post by: IlliniCrusader on February 16, 2010, 09:13:14 PM
I am using 2.0 RC1.2.  Is it possible to update it to the newer versions?

Thanks,
IC
Title: Re: Most Popular Topic Today
Post by: tomy123456 on July 11, 2010, 11:08:19 AM
hi help me

btw i dont have instal this mod but got problem

how can fix this?
8: Undefined index: most_pop_top
File: /home/davc123/public_html/forums/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 299

8: Undefined index: most_pop_top
File: /home/davc123/public_html/forums/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 299
Title: Re: Most Popular Topic Today
Post by: Deaks on October 28, 2010, 08:02:39 AM
I have taken over this mod and its now updated for 2.0 rc3
Title: Re: Most Popular Topic Today
Post by: Cal O'Shaw on October 30, 2010, 02:31:25 AM
Hello,

Thank you for picking up this MOD.  Looks like it could be really nice.

I looked a bit in the topic and others have made the same requests that came to my mind when I installed this.  So I took the liberty of compiling them into this one post.

Would you be willing to look at adjusting it to allow the listing of the "X" most popular topics?  It looks like the code is already doing most of the work, so it might just be having it list the first "X" topics it has ordered.  "X" could either be a setting in the AdminCP or just a fixed number, such as 5.

The number of posts is in quotes, which looks a bit odd.  Could the quotes be removed?

Here's a set of the text strings, adjusted to more natural US English:

Code (Proposed changes to text strings) Select

$txt['most_popular_topic_today'] = 'The Most Popular Topic in the last 24 hours';
$txt['most_pop_top'] = 'Number of posts per day:';
$txt['most_pop_top_abs'] = 'Sorry, no one has replied today';
$txt['cant_read_mpt'] = 'Sorry, unable to calculate at this time';

The "can't read" string changed to hide the reason why some users may be unable to see.  Which does echo the concern mentioned before, that permissions are not factored in when the query is made and the list of popular topics is ordered.

We're using SMF 1.1.11, but hope any enhancements you make will be applied to that branch of the MOD as well.

Grazie,

Cal
Title: Re: Most Popular Topic Today
Post by: Deaks on October 30, 2010, 11:03:15 AM
I do plan on working on fixing the text strings and updating the mod more at some point :)

But thank you for your translated strings (from russian english to english lol)
Title: Re: Most Popular Topic Today
Post by: wwwserfer on November 21, 2010, 02:17:49 PM
Quote from: khamseen on October 24, 2008, 06:46:01 PM
Hey sorry for the bump, but I just had to uninstall this mod because whilst installed, only the main admin account could see topics in any boards that weren't visible to their primary membergroup, but for some reason I got a PM from a rather distressed member of my community who was able to see a topic which was in an admin board... I can't explain why though as his permissions are identical to all other standard members.


Uninstall this mod for the same reasons... :-[
Title: Re: Most Popular Topic Today
Post by: recived on November 27, 2010, 07:57:04 AM
Hi all. how to display more than 1?
Title: Re: Most Popular Topic Today
Post by: Deaks on November 27, 2010, 08:05:00 AM
Quote from: wwwserfer on November 21, 2010, 02:17:49 PM
Quote from: khamseen on October 24, 2008, 06:46:01 PM
Hey sorry for the bump, but I just had to uninstall this mod because whilst installed, only the main admin account could see topics in any boards that weren't visible to their primary membergroup, but for some reason I got a PM from a rather distressed member of my community who was able to see a topic which was in an admin board... I can't explain why though as his permissions are identical to all other standard members.


Uninstall this mod for the same reasons... :-[

Yeh this have came to my attention, I got a friend to look over it and he has sent me a fix, just need to test it now :)

Quote from: recived on November 27, 2010, 07:57:04 AM
Hi all. how to display more than 1?

You cant
Title: Re: Most Popular Topic Today
Post by: recived on November 27, 2010, 08:13:13 AM
Quote from: Runic on November 27, 2010, 08:05:00 AM
Quote from: wwwserfer on November 21, 2010, 02:17:49 PM
Quote from: khamseen on October 24, 2008, 06:46:01 PM
Hey sorry for the bump, but I just had to uninstall this mod because whilst installed, only the main admin account could see topics in any boards that weren't visible to their primary membergroup, but for some reason I got a PM from a rather distressed member of my community who was able to see a topic which was in an admin board... I can't explain why though as his permissions are identical to all other standard members.


Uninstall this mod for the same reasons... :-[

Yeh this have came to my attention, I got a friend to look over it and he has sent me a fix, just need to test it now :)

Quote from: recived on November 27, 2010, 07:57:04 AM
Hi all. how to display more than 1?

You cant
any way possible to make more than 1? If the code to make changes?
Title: Re: Most Popular Topic Today
Post by: Deaks on November 27, 2010, 08:14:36 AM
there is always a way but at this time the mod has a more important issue, also the mod is called Most Popular Topic of the day
Title: Re: Most Popular Topic Today
Post by: Deaks on November 28, 2010, 08:10:36 PM
Mod has been updated and should fix the issue of blocking non admins, also fixed language strings and have updated the description:




Most Poupular Topic
Created by Runic


Support (http://www.bryandeakin.com) | Donate (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SS58QTJY3HXU2&lc=GB&item_name=Mods%20and%20Themes&item_number=1&currency_code=GBP&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)


Compatibility
2.0 RC4

Purpose
This mod adds a new section to your boardindex.template so you can see the most popular topic of the moment.

FAQ
How do I add more post?
Once installed open your BoardIndex.php file located in your sources folder and search for
LIMIT 1'

Simply increase this number to your desired amount for example:
LIMIT 5'

Once you save upload this file overwriting the old one.  Please remember to backup
Title: Re: Most Popular Topic Today
Post by: wwwserfer on December 02, 2010, 06:57:07 AM
Quote from: Runic on November 28, 2010, 08:10:36 PM
Mod has been updated and should fix the issue of blocking non admins, also fixed language strings...

Great! But... now mod UnCompatible with smf 1.1.xx??
Title: Re: Most Popular Topic Today
Post by: Deaks on December 02, 2010, 08:29:13 AM
correct
Title: Re: Most Popular Topic Today
Post by: wwwserfer on December 02, 2010, 08:49:06 AM
Quote from: Runic on December 02, 2010, 08:29:13 AM
correct

well...  :-\
Title: Re: Most Popular Topic Today
Post by: Deaks on December 02, 2010, 09:00:42 AM
2,0 is nearing a stable release each day thats where modders and themers are spending most of there time.
Title: Re: Most Popular Topic Today
Post by: sharks on December 02, 2010, 10:51:58 AM
Any chance you could update this to work with SMF 1.1.12?
Title: Re: Most Popular Topic Today
Post by: Deaks on December 02, 2010, 11:26:13 AM
nope
Title: Re: Most Popular Topic Today
Post by: recived on December 06, 2010, 04:41:38 AM
LIMIT 5' - not work. Displaying only 5 in a row but again only one. please help
Title: Re: Most Popular Topic Today
Post by: nicor2k on December 06, 2010, 11:30:01 AM
Thanks Scrooge for taking over this nice mod, with a little "handwork" it also runs on 1.0.x - tested :)

Does anyone has an idea about how to show the most popular topic counted by the VIEWS, not the REPLIES? Just an idea how to change the sql query :)




If someone is interested: If you do not want to display the most popular topic from the last 24 hours but just from this day, use this code instead of the original time-variables:

   $stunde = date('G');
   $minute = date('l');
   $sekunden = ((($stunde * 60) + $minute) * 60);
   $time1 = time();
   $time2 = (time() - $sekunden);

You can now use "time1" and "time2".

Title: Re: Most Popular Topic Today
Post by: xrunner on January 11, 2011, 12:49:32 PM
It has a built-in spelling error - if no one has replied today you see this -

QuoteSorry, no-one hes replied today
Title: Re: Most Popular Topic Today
Post by: xrunner on January 11, 2011, 12:57:45 PM
It also causes the 2 types of errors shown below to appear in the error log. When the mod is removed the errors stop occurring.

2: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed
File: /home/thesite9/public_html/test/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 290

8: Undefined variable: user_info
File: /home/thesite9/public_html/test/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 290
Title: Re: Most Popular Topic Today
Post by: Deaks on January 11, 2011, 01:06:34 PM
thanks for posting these ill look into them in my next mod updates session
Title: Re: Most Popular Topic Today
Post by: SteveW on March 05, 2011, 03:40:29 PM
Hi - fantastic mod!

Is there a way of doing this within a PHP block? - I'm using Simpleportal and would love to see this on the frontpage :)

Thanks
Title: Re: Most Popular Topic Today
Post by: Casal on April 24, 2011, 07:03:07 AM
It´s doesn´t work in LIMIT 5

Any suggestion please.
Title: Re: Most Popular Topic Today
Post by: tuantt on July 02, 2011, 12:35:56 AM
Hi Runic,

I found your's mod is very indeed. I would like to ask how to convert it to a function that I can put in ssi. I need a function to show most popular topic of the day on my webpage out side the forum
Title: Re: Most Popular Topic Today
Post by: Realinfo on January 16, 2012, 09:59:35 PM
How we can put it in simple portal Block................
Title: Re: Most Popular Topic Today
Post by: sharks on January 17, 2012, 04:16:25 AM
Hi Runic

In the first post of this topic, there is a typo error as it should be: Most Popular Topic
Title: Re: Most Popular Topic Today
Post by: snooks on January 17, 2012, 09:56:36 AM
Question, on the images attached to this mod i see it shows "most popular topic in last 24 hours" after i installed this mod on my site i see only "most popular topic" is there a reason for this and how to make it show "in last 24 hours"

thanks nice mod
Title: Re: Most Popular Topic Today
Post by: jaisi on January 18, 2012, 05:47:56 AM
does this work with 2.0?
Title: Re: Most Popular Topic Today
Post by: Realinfo on January 18, 2012, 06:54:59 AM
Quote from: snooks on January 17, 2012, 09:56:36 AM
Question, on the images attached to this mod i see it shows "most popular topic in last 24 hours" after i installed this mod on my site i see only "most popular topic" is there a reason for this and how to make it show "in last 24 hours"

thanks nice mod


/Themes/default/languages/index.english.php

$txt['most_popular_topic_today'] = 'Most Popular Topic in Last 24 Hours';
Title: Re: Most Popular Topic Today
Post by: snooks on January 18, 2012, 01:55:18 PM
Thank you Realinfo but i have a problem i think in my themes/default/languages/ i have index.english.php~ and cannot be opened anyone any idea why my index.english.php has a ~ after it please ?

thank you
Title: Re: Most Popular Topic Today
Post by: Realinfo on January 18, 2012, 10:03:05 PM
Quote from: snooks on January 18, 2012, 01:55:18 PM
Thank you Realinfo but i have a problem i think in my themes/default/languages/ i have index.english.php~ and cannot be opened anyone any idea why my index.english.php has a ~ after it please ?

thank you

Do u have index.english.php, if not then u need to have that............ index.english.php~ is somewhat duplicate copy of index.english.php
Title: Re: Most Popular Topic Today
Post by: braddasexy on February 12, 2012, 12:01:28 PM
Quote from: Casal on April 24, 2011, 07:03:07 AM
It´s doesn´t work in LIMIT 5

Any suggestion please.

I tried this too and it doesn't list the 5 most popular topics.  Also I would love to see a PHP version of this too as I would like to put it in a block as I am using Tiny Portal.  Any chance of seeing any of this?  Thanks so much!
Title: Re: Most Popular Topic Today
Post by: snooks on February 13, 2012, 12:38:45 PM
Quote from: Realinfo on January 18, 2012, 10:03:05 PM
Quote from: snooks on January 18, 2012, 01:55:18 PM
Thank you Realinfo but i have a problem i think in my themes/default/languages/ i have index.english.php~ and cannot be opened anyone any idea why my index.english.php has a ~ after it please ?

thank you

Do u have index.english.php, if not then u need to have that............ index.english.php~ is somewhat duplicate copy of index.english.php
Sorry for late reply, no I just have index.english.php~
Title: Re: Most Popular Topic Today
Post by: BigMike on April 19, 2012, 04:01:33 PM
First, thank you Runic for this awesome mod!! :) :D

Quote from: Runic on September 15, 2007, 01:56:23 PM
FAQ
How do I add more post?
Once installed open your BoardIndex.php file located in your sources folder and search for
LIMIT 1'

Simply increase this number to your desired amount for example:
LIMIT 5'


Quote from: Casal on April 24, 2011, 07:03:07 AM
It´s doesn´t work in LIMIT 5

I am using SMF 2.0.2 and Casal is correct, this does not work. I am _VERY_ shocked this mod is over 4-1/2 years old / 119 replies in this thread and no one has offered a solution to this!

Looking at the code it is very easy to see why it doesn't work as advertised: All Runic's suggestion does is increment the amount of data pulled from the database. This is good, but as coded, any increased number of information from the database is simply overwritten atop itself in the $context['most_popular_topic_today'] array, and the template file does not contain any additional while or for...next loops to support this.

I spent a few mins and got this to work. I rewrote some of the code & here is what I am using to display the current top 5 most active topics:

In BoardIndex.php,

//*********************************** Most popular topic today.***************************//
$id_group = $user_info['groups'];
    $request = $smcFunc['db_query']('', '
    SELECT COUNT(mes.id_topic) as t, mes.id_topic, mes.subject, boa.member_groups
    FROM {db_prefix}messages AS mes
    LEFT JOIN {db_prefix}boards as boa ON (mes.id_board = boa.id_board)
    WHERE poster_time <= {int:time}
    AND poster_time >= {int:time2}
    GROUP BY id_topic
    ORDER BY t DESC
    LIMIT 5',
    array(
    'time' => time(),
    'time2' => (time()-86400),
    )
    );
    $i = 0;
    $context['most_popular_topic_today'] = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
    {
      // Build the Array
      $context['most_popular_topic_today'][$i] = array(
        'coll' => $row['t'],
    'id_topic' => $row['id_topic'],
    'subject' => $row['subject'],
    'memberGroups' => explode(',', $row['member_groups'])
    );

    // User cannot read this topic
    if ((isset($context['most_popular_topic_today'][$i]['memberGroups'])) && (!array_intersect($context['most_popular_topic_today'][$i]['memberGroups'], $id_group) && !allowedTo('admin_forums')))
        $context['most_popular_topic_today'][$i]['id_topic'] = "hide";

    // No one has replied to anything in the given time period
    elseif (isset($context['most_popular_topic_today'][$i]['coll']) == '')
      $context['most_popular_topic_today'][$i]['id_topic'] = "none";

      $i = $i + 1;
    }
    $smcFunc['db_free_result']($request);
//******************************************************************************************//


...and in BoardIndex.template.php,

echo '
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $txt['most_popular_topic_today'], '
</span>
</h4>
<p>';

    foreach ($context['most_popular_topic_today'] as $post)
    {
      if ($post['id_topic'] == "hide")
        echo $txt['cant_read_mpt'] . ' ' . implode(',', $user_info['groups']);
      elseif ($post['id_topic'] == "none")
        echo $txt['most_pop_top_abs'];
      else
        echo '
      <strong><a href="', $scripturl, '?topic=', $post['id_topic'], '">', substr($post['subject'], 4), '</a></strong>
      <span class="smalltext">
       (', $post['coll'], ' ', $txt['most_pop_top'], ')
      </span>';
      echo '<br />';
    }


I have changed the output to be on one line, making the following changes to the template language file,

$txt['most_popular_topic_today'] = 'Our Current Most Active Topics';
$txt['most_pop_top'] = 'replies per day';


And I have also trimmed the first 4 characters of the topic's reply title to remove the "Re: ", since it's not the reply which is popular, it's the topic! I also dropped the $context['topic_mod'] variable and used a unique 'topic_id' to handle the permission checks instead (uses 1 less variable).

The result looks like this:

QuoteOur Current Most Active Topics

Topic One (# replies per day)
Topic Two (# replies per day)
Topic Three (# replies per day)
Topic Four (# replies per day)
Topic Five (# replies per day)

You can see it along with the "Statistics in jQuery" mod in action here: http://board.marlincrawler.com

Just theme for your own needs and enjoy :D

Regards,
BigMike
Title: Re: Most Popular Topic Today
Post by: BigMike on May 08, 2012, 12:14:48 PM
Quote from: BigMike on April 19, 2012, 04:01:33 PM
...and in BoardIndex.template.php,

<strong><a href="', $scripturl, '?topic=', $post['id_topic'], '">', substr($post['subject'], 4), '</a></strong>


......I have also trimmed the first 4 characters of the topic's reply title to remove the "Re: ", since it's not the reply which is popular, it's the topic!

I have seen a few times where the topic subject is called instead of the reply subject, so removing the first 4 characters doesn't work in all cases.

For this reason, I've decided to do an expression replace if "Re: " ever exists in any subject being used. Update my above line to the following...

<strong><a href="', $scripturl, '?topic=', $post['id_topic'], '">', preg_replace('/Re: /','',$post['subject']), '</a></strong>


And that will take care of any and all reply subjects without affecting wayward topic subjects. This will fail if anyone decides to make a topic that has "Re: " in it -- it is case sensitive -- such as "Hey Sally, remember me Re: last night", but I don't think I've ever seen that on my 1 million post community. At any rate, it's omission probably won't logically destroy the subject anyway lol  :D

Sure I could run additional checks but I'm too lazy to learn how :P

BigMike
Title: Re: Most Popular Topic Today
Post by: Deaks on May 08, 2012, 02:15:28 PM
interesting, I have been extremley busy with offline stuff but I will incorporate your changes into the mod of course with your permission and credit given where due.
Title: Re: Most Popular Topic Today
Post by: bestfriendavinash on May 09, 2012, 06:50:52 AM
working fine with smf 2.0.2
Title: Re: Most Popular Topic Today
Post by: TheListener on June 16, 2013, 05:56:44 PM
Runic as ya now the owner of the mod.

How would I get rid of

QuoteSorry, no-one hes replied today

and just leave the topic title?
Title: Re: Most Popular Topic Today
Post by: bros on September 27, 2013, 09:39:32 PM
Question - would it be possible to integrate this into a simpleportal block, so I could display today's active topics in lets say, a sidebar?
Title: Re: Most Popular Topic Today
Post by: Biology Forums on September 27, 2013, 10:08:46 PM
This is very interesting! Could you limit it do a certain board?
Title: Re: Most Popular Topic Today
Post by: Alpay on October 23, 2013, 05:51:05 PM
Hello ,

array(
          'time' => time(),
          'time2' => (time()-86400),
       )

change ?
86400 = 1 day 86400*7 = 604800
604800 = 7 day and week ?
Title: Re: Most Popular Topic Today
Post by: BigMike on November 06, 2013, 01:21:15 PM
Quote from: Liam_michael on September 27, 2013, 10:08:46 PM
This is very interesting! Could you limit it do a certain board?
Yes indeed, change the $request in BoardIndex.php to the following:

    $request = $smcFunc['db_query']('', '
    SELECT COUNT(mes.id_topic) as t, mes.id_topic, mes.subject, boa.member_groups
    FROM {db_prefix}messages AS mes
    LEFT JOIN {db_prefix}boards as boa ON (mes.id_board = boa.id_board)
    WHERE poster_time <= {int:time}
    AND poster_time >= {int:time2}
    AND boa.id_board IN ({array_int:boards})
    GROUP BY id_topic
    ORDER BY t DESC
    LIMIT 5',
    array(
    'time' => time(),
    'time2' => (time()-86400),
    'boards' =>  array(1, 2, 3),
    )
    );


Noting the line near the end, "'boards' =>  array(1, 2, 3),". Simply enter in whatever board ID you want to be included and it will only draw posts from those boards. You can enter just one number here or all of your board IDs, the size of the array doesn't matter so long as you have at least one ID number in there.

To do the inverse, if you want to include all boards except for those in the array, don't waste your time filling the array with all your boards minus a couple. Instead change the IN to NOT EXIST like so:
AND boa.id_board NOT EXIST ({array_int:boards})
Now it will pull all board IDs except for the ones you have in the array (which again could just be a single ID if needed).

Side note: This modification was very simple. Here are the only two lines that were added:
    AND boa.id_board IN ({array_int:boards})
and
    'boards' =>  array(1, 2, 3),

Quote from: Alpay on October 23, 2013, 05:51:05 PM
change ?
604800 = 7 day and week ?
Yes, this works! This will arrange by Most Active Topics per week :)

BigMike
Title: Re: Most Popular Topic Today
Post by: MangosMadMax on March 03, 2014, 06:10:29 AM
Hey there,

Using this mod with the Bluebird theme and the error log for the forum is full of the following:

Quotehttps://community.getmangos.co.uk/index.php?https://community.getmangos.co.uk/community/
2: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed
File: /home/mangos/public_html/community/Themes/BlueBird/BoardIndex.template.php
Line: 312

311: if ($context['topic_mod'] == '0')
==>312: echo $txt['cant_read_mpt'] . ' ' . implode(',', $user_info['groups']);
313: elseif (!isset($context['most_popular_topic_today']['coll']) || ($context['topic_mod']) == '2')
314:         echo $txt['most_pop_top_abs'];
315:     else
316:       echo '
317:     <strong><a href="', $scripturl, '?topic=', $context['most_popular_topic_today']['id_topic'], '">', $context['most_popular_topic_today']['subject'], '</a></strong>
318:     <div class="smalltext">
319:     ', $txt['most_pop_top'], ' &quot;', $context['most_popular_topic_today']['coll'], '&quot;
320:     </div>';
321: echo '
322: </p>';
Title: Re: Most Popular Topic Today
Post by: Biology Forums on March 03, 2014, 10:44:35 AM
Could you upload the 1.x version; it appears to have been discontinued. If not, please visit:

http://www.simplemachines.org/community/index.php?topic=519331
Title: Re: Most Popular Topic Today
Post by: DarkAngel612 on July 25, 2015, 12:04:24 AM
I realize you are uber busy but thought to let you know, in case you are updating this to work with 2.0.10

I installed it a few years ago and it works beautifully.

1. still can not see more that one popular thread.

2. I tried inserting the code that was offered a few posts before this and got not favorable effect....page was blank. (removed code)

3. Also noted that when logged in the members or admin/staff belonging to said thread will see like they should. Unlogged in will see (our forum is open for all to see save some group only areas.) when viewing the Recent area at bottom of forum...will not see the most popular "anyone" thread, they see sort of a stats section but no thread.

Not sure if that is how it should be with the code I mentioned in #3 but when the original code is reinstated the logged/unlogged DO see the popular thread...I like that.

Will you be updating this mod or is it defunct or waiting for the next version of SMF?
Title: Re: Most Popular Topic Today
Post by: vbgamer45 on July 25, 2015, 11:01:05 AM
On hold on the moment not too familiar with the code will have to go over it should work still for SMF 2.0.x
Title: Re: Most Popular Topic Today
Post by: DarkAngel612 on July 25, 2015, 07:44:49 PM
ok, thanks
Title: Re: Most Popular Topic Today
Post by: KittyGalore on January 26, 2020, 12:40:28 PM
Quote from: MangosMadMax on March 03, 2014, 06:10:29 AM
Hey there,

Using this mod with the Bluebird theme and the error log for the forum is full of the following:

Quotehttps://community.getmangos.co.uk/index.php?https://community.getmangos.co.uk/community/
2: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed
File: /home/mangos/public_html/community/Themes/BlueBird/BoardIndex.template.php
Line: 312

311: if ($context['topic_mod'] == '0')
==>312: echo $txt['cant_read_mpt'] . ' ' . implode(',', $user_info['groups']);
313: elseif (!isset($context['most_popular_topic_today']['coll']) || ($context['topic_mod']) == '2')
314:         echo $txt['most_pop_top_abs'];
315:     else
316:       echo '
317:     <strong><a href="', $scripturl, '?topic=', $context['most_popular_topic_today']['id_topic'], '">', $context['most_popular_topic_today']['subject'], '</a></strong>
318:     <div class="smalltext">
319:     ', $txt['most_pop_top'], ' &quot;', $context['most_popular_topic_today']['coll'], '&quot;
320:     </div>';
321: echo '
322: </p>';

Was there ever a fix for this it seems that if topics are hidden for certain members and guests the error is in the error log. SMF Version 2.0.17 SMF Default theme
Title: Re: Most Popular Topic Today
Post by: vbgamer45 on January 26, 2020, 01:27:36 PM
What error are you getting in the log?
Title: Re: Most Popular Topic Today
Post by: KittyGalore on January 26, 2020, 01:34:05 PM
Quote from: vbgamer45 on January 26, 2020, 01:27:36 PM
What error are you getting in the log?
These 2 errors everytime from the same IP or member at the same time. Also for guests 2 errors for one person viewing at a certain time for example a guest recorded time on both errors at 16:41:04

Apply Filter: Only show the errors with the same message2: implode(): Invalid arguments passedApply Filter: Only show the errors from this fileFile: /home/xxxxxxxxx/public_html/Themes/default/BoardIndex.template.php
Line: 302


8: Undefined variable: user_infoApply Filter: Only show the errors from this fileFile: /home/xxxxxxxxxxx/public_html/Themes/default/BoardIndex.template.php
Line: 302


The code at line 302.

echo $txt['cant_read_mpt'] . ' ' . implode(',', $user_info['groups']);
Title: Re: Most Popular Topic Today
Post by: vbgamer45 on January 26, 2020, 02:20:01 PM
Posted an update to the mod.
See if that helps!
Title: Re: Most Popular Topic Today
Post by: KittyGalore on January 26, 2020, 02:46:28 PM
Quote from: vbgamer45 on January 26, 2020, 02:20:01 PM
Posted an update to the mod.
See if that helps!
Thanks  :) :) I have installed the new update i'll let you know if i get any more errors. At the moment i don't have any.
Title: Re: Most Popular Topic Today
Post by: KittyGalore on January 26, 2020, 04:43:18 PM
Quote from: vbgamer45 on January 26, 2020, 02:20:01 PM
Posted an update to the mod.
See if that helps!
Thanks that update seems to have sorted it i removed all my errors in log and the log is still at 0. It's over an hour or so now and that error hasn't come back.
Title: Re: Most Popular Topic Today
Post by: vbgamer45 on January 26, 2020, 06:08:35 PM
Great, glad that helped!
Title: Re: Most Popular Topic Today
Post by: DarkAngel612 on December 12, 2020, 02:04:10 AM
I have recently (a week ago) moved our entire bunch of things from one host to a new one. I had to remove all mods from package manager cause I had all of admin area showing but only the header and navigation links, in any theme, but nothing lower.
I have installed several of the mods but this one gave me this error, any idea what to do. I have the latest version that is offered in the mod area of downloads:

Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dbname.mes.subject' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /server/attic/Sources/BoardIndex.php
Line: 131



EDIT, seems I just now tried it with the default theme and not selecting the theme that I wanted it to show in also and it installed...but now I just get that error message above and no forum.  I have uninstalled it in hopes of it being able to be used.


Since I don't want anyone to post and we lose the stuff in the process I have the forum in Maintenance mode.


smf version: 2.0.17
http://www.thefantasiesattic.net/attic/index.php (http://www.thefantasiesattic.net/attic/index.php)
Title: Re: Most Popular Topic Today
Post by: vbgamer45 on December 12, 2020, 12:38:07 PM
See if this helps
Open sources/BoardIndex.php
Find

    $request = $smcFunc['db_query']('', '
    SELECT COUNT(mes.id_topic) as t, mes.id_topic, mes.subject, boa.member_groups
    FROM {db_prefix}messages AS mes
    LEFT JOIN {db_prefix}boards as boa ON (mes.id_board = boa.id_board)
    WHERE poster_time <= {int:time}
    AND poster_time >= {int:time2}
    GROUP BY id_topic
    ORDER BY t DESC
    LIMIT 1',
    array(
    'time' => time(),
    'time2' => (time()-86400),
    )
    );

Change to

    $request = $smcFunc['db_query']('', '
    SELECT COUNT(mes.id_topic) as t, mes.id_topic, mes.subject, boa.member_groups
    FROM {db_prefix}messages AS mes
    LEFT JOIN {db_prefix}boards as boa ON (mes.id_board = boa.id_board)
    WHERE poster_time <= {int:time}
    AND poster_time >= {int:time2}
    GROUP BY mes.id_topic, mes.id_topic, mes.subject, boa.member_groups
    ORDER BY t DESC
    LIMIT 1',
    array(
    'time' => time(),
    'time2' => (time()-86400),
    )
    );
Title: Re: Most Popular Topic Today
Post by: DarkAngel612 on December 12, 2020, 03:49:44 PM
I will try this later today...I am so upset because I have PHP 7.5 on this server and the old databases were for 5.5 and I have been getting errors right and left. Especially from trying to reinstall our zencart...LOL I will let you know if the forum behaves itself cause I and the members do so like the version we have.
Title: Re: Most Popular Topic Today
Post by: Sir Osis of Liver on December 12, 2020, 03:54:59 PM
2.0.17 does not support php 7.5, I believe 7.4 is as high as you can go.  My forums are running in 7.2.
Title: Re: Most Popular Topic Today
Post by: DarkAngel612 on December 12, 2020, 04:01:51 PM
Quote from: Sir Osis of Liver on December 12, 2020, 03:54:59 PM
2.0.17 does not support php 7.5, I believe 7.4 is as high as you can go.  My forums are running in 7.2.
I am able to reset the PHP for all entities to be from7.3 (why I insist on calling it 7.5 is beyond me, tired I guess). I am going to step away from the computer for a bit before I explode
Title: Re: Most Popular Topic Today
Post by: DarkAngel612 on December 13, 2020, 05:35:11 AM
I tried the code you mentioned and then installed the mod but again I have nothing below the navigation bar on main forum page.

I even tried reinstalling  version 1.2 of TinyPortal and it claims to install *you can see the link to forum) but again nothing below the forum page.

I uninstalled both of them and now get this on the main page for forum:

  An Error Has Occurred!    Function name must be a string

Title: Re: Most Popular Topic Today
Post by: @rjen on December 13, 2020, 07:57:07 AM
Not sure where Tinyportal comes into the mix, but I am -pretty sure that TP1.2 is not suited for PHP 7 and up ... if you want to install TP again, use the latest version: 2.0.0
Title: Re: Most Popular Topic Today
Post by: DarkAngel612 on December 13, 2020, 06:15:11 PM
Well I would love to but it refuses to install either as the first mod, second or middle and end installations..

First I need to get the forum to behave. then the other mods. I have been going thru files and found many duplicate codes in there...removed them and hope that helps.

Once I get my Mac fixed ( have part but sure won't  let me remove the power supply) then I can access my  external that has the themes so that I can have pristine files to upload. after uninstalling mods. My daughters pc will not acknowledge that external either...phooey...LOL
thanks for all your assistance.
Title: Re: Most Popular Topic Today
Post by: kapt on September 10, 2021, 11:33:16 AM
This just shows a popular topic. How do I get it to display 5 popular topics?
Title: Re: Most Popular Topic Today
Post by: Doug Heffernan on September 10, 2021, 12:33:01 PM
Quote from: kapt on September 10, 2021, 11:33:16 AMThis just shows a popular topic. How do I get it to display 5 popular topics?

At your BoardIndex.php file change LIMIT 1 to 5 in this bit of code:

//*********************************** Most popular topic today.***************************//
$id_group = $user_info['groups'];

    $request = $smcFunc['db_query']('', '
    SELECT COUNT(mes.id_topic) as t, mes.id_topic, mes.subject, boa.member_groups
    FROM {db_prefix}messages AS mes
    LEFT JOIN {db_prefix}boards as boa ON (mes.id_board = boa.id_board)
    WHERE poster_time <= {int:time}
    AND poster_time >= {int:time2}
    GROUP BY id_topic
    ORDER BY t DESC
    LIMIT 1',
    array(
    'time' => time(),
    'time2' => (time()-86400),
    )
    );


Or you can change it in the install.xml file of the mod as well, repack it and re-install it.
Title: Re: Most Popular Topic Today
Post by: vbgamer45 on September 10, 2021, 01:40:09 PM
Thanks Doug. Might add a setting for it.
Title: Re: Most Popular Topic Today
Post by: kapt on September 10, 2021, 02:34:53 PM
Quote from: Doug Heffernan on September 10, 2021, 12:33:01 PM
Quote from: kapt on September 10, 2021, 11:33:16 AMThis just shows a popular topic. How do I get it to display 5 popular topics?

At your BoardIndex.php file change LIMIT 1 to 5 in this bit of code:

//*********************************** Most popular topic today.***************************//
    $id_group = $user_info['groups'];

    $request = $smcFunc['db_query']('', '
        SELECT COUNT(mes.id_topic) as t, mes.id_topic, mes.subject, boa.member_groups
        FROM {db_prefix}messages AS mes
            LEFT JOIN {db_prefix}boards as boa ON (mes.id_board = boa.id_board)
        WHERE poster_time <= {int:time}
            AND poster_time >= {int:time2}
        GROUP BY id_topic
        ORDER BY t DESC
        LIMIT 1',
        array(
            'time' => time(),
            'time2' => (time()-86400),
        )
    );


Or you can change it in the install.xml file of the mod as well, repack it and re-install it.

didnt work
Title: Re: Most Popular Topic Today
Post by: vbgamer45 on September 10, 2021, 03:00:33 PM
More changes required needs to add a foreach to loop over.
Title: Re: Most Popular Topic Today
Post by: kapt on September 11, 2021, 03:00:10 AM
Quote from: vbgamer45 on September 10, 2021, 03:00:33 PMMore changes required needs to add a foreach to loop over.

So do you have a chance to do this? I'm sure it will work for everyone.
Title: Re: Most Popular Topic Today
Post by: KittyGalore on March 13, 2022, 08:22:45 AM
Any chance of this mod been updated to 2.1