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
Installed and running in mt SMF 1.1.3. Very nice job, congratulations.
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
Good job Thanks
Which file do i download, cuz theres 3 on the mod page :/ help a newb lol
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.
does this work with 1.12?
Working fine, thank you!
S.M.F. 1.1.3
EDIT: BTW, Does this mod observe permissions?
Thanks TrueSatan, should of been put in the description anyway lol
i would love to see some kind of SCREEN SHOTS .. please
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
Cool mod but I see one issue. It shows hidden forum post topic name too. :o
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?
i want to select boards and show most 10 topics
and does it work for tinyportal themes? or do we need manual install?
Themes are themes.
You always need to manual install things if required.
yeah... my bad.. i just used package parser and noticed i have the boardindex template to edit hehehe
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?
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/
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)
What language co-oliations are you using? English -UTF8?
Go to Admin > Server Settings > And try changing the language to English.
you probably installed the wrong one
uninstall that one and download the first one on the list
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.
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
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.
Thanks a lot, it works well.
If anyone wants, I can tell it manually ;)
thank you very much, it works perfectly!
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.
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!
i guess no 1.12 support?
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?
huge problem, shows every kind of topic even if this one shoud not be seen by visitors!
nice mod indeed, looking forward this mod can be relate most popular topic by day, weeks, months and so on..
Thanks in advanced
Hi Grek_Kamchatka
any idea about when we will have an update fixing the permissions problem?
;)
There are no problem, this mod was made for my forum and i don't need this function. But i'll think about it.
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!
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?
without any reason. who need this mod - please, download and use, unless go past =)
I found this MOD fantastic but my forum is a medical one and there is some boards that cannot be available to public.
;)
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 :|
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
Version 2.0 now available.
Are now the permissions soved?
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.
so what's the changes made on the version 2 cause the first release is working fine for me
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.
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...
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.
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...
Thanks :) ;D
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.
good mod. a question
how configure that it shows popular post but of some boards only?
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...
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..
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 :)
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"
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).
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? :-[
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
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?
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..
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?
Yes i did it :-\
version 2.0
Strange.
Are you sure your board is restricted? Does it has LOCAL permission instead of GLOBAL?
Is it right?
http://img250.imageshack.us/img250/7076/62856799mr8.png
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
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 :(
can you make it more flexible ?
for example showing more than one topic per day ;)
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.
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!
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! :-[
Someone could help me?
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.
workes fine in my 1.1.4 smf
many thanks to the author
Hi, is this OK on a dilber theme. Hoe you can help me installing it. thanks
Similar to your other queries on other topics...detailed reply given there.
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
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...
Nice i install in my forum with a manual edit and works great thanks ;)
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?
is it possible to add more topics than just one?
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. :)
great mod ;D
by the way, which part should i change so it can show 5 most popular topic?
im realy sorry bout the bump, but did anyone have a solution for my question? coz im not pretty good at scripting :'(
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?
I am using 2.0 RC1.2. Is it possible to update it to the newer versions?
Thanks,
IC
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
I have taken over this mod and its now updated for 2.0 rc3
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:
$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
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)
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... :-[
Hi all. how to display more than 1?
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
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?
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
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¤cy_code=GBP&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
Compatibility2.0 RC4
PurposeThis mod adds a new section to your boardindex.template so you can see the most popular topic of the moment.
FAQHow 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
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??
correct
2,0 is nearing a stable release each day thats where modders and themers are spending most of there time.
Any chance you could update this to work with SMF 1.1.12?
nope
LIMIT 5' - not work. Displaying only 5 in a row but again only one. please help
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".
It has a built-in spelling error - if no one has replied today you see this -
QuoteSorry, no-one hes replied today
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
thanks for posting these ill look into them in my next mod updates session
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
It´s doesn´t work in LIMIT 5
Any suggestion please.
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
How we can put it in simple portal Block................
Hi Runic
In the first post of this topic, there is a typo error as it should be: Most Popular Topic
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
does this work with 2.0?
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';
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
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
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!
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~
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
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
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.
working fine with smf 2.0.2
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?
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?
This is very interesting! Could you limit it do a certain board?
Hello ,
array(
'time' => time(),
'time2' => (time()-86400),
)
change ?
86400 = 1 day 86400*7 = 604800
604800 = 7 day and week ?
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
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'], ' "', $context['most_popular_topic_today']['coll'], '"
320: </div>';
321: echo '
322: </p>';
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
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?
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
ok, thanks
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'], ' "', $context['most_popular_topic_today']['coll'], '"
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
What error are you getting in the log?
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']);
Posted an update to the mod.
See if that helps!
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.
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.
Great, glad that helped!
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)
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),
)
);
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.
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.
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
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
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
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.
This just shows a popular topic. How do I get it to display 5 popular topics?
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.
Thanks Doug. Might add a setting for it.
Quote from: Doug Heffernan on September 10, 2021, 12:33:01 PMQuote 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
More changes required needs to add a foreach to loop over.
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.
Any chance of this mod been updated to 2.1