News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

PostersInRecentPost

Started by Bulakbol, July 09, 2008, 08:29:16 PM

Previous topic - Next topic

DareDevil1990

Quote from: JohnyB on July 18, 2008, 12:41:23 AM
@targetsk
  Thanks for the language translation. I will update the mod soon.

@keshav
  We are confused. lol The BoardIndex.php I gave you was edited already so all you have to do is backup the original copy then go ahead with the installation. Then use the BoardIndex.php I gave you after you installed the mod, not before. About the text string on top of your forum, edit default/languages/Modifications.english.php and look for the ?> tag. Move it at the very end of the file with its own line.

i again did what u said but still that text string is coming on the topof the banner cant u fix ...i am trying to install thos mod for past1 week can u install it for me :)

AlenNS

Quote from: AlenNS on July 18, 2008, 01:03:06 AM
Can you make avatars to be same size like on topics and not to stretch?

Bulakbol

@ keshav
   I/m sorry, I am too busy atm.

@AlenNS
   There's no point adding avatar. Try this mod instead.
http://custom.simplemachines.org/mods/index.php?mod=1103
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

bfeo

I get an error on my     ./Sources/BoardIndex.php

I user the theme Mystic Jade.  Will it be viewable on this theme if I install it?  I noticed that you said it was supported only for the three main themes.

I'll attach the file.

PRaDiUS

Ok, I installed this mod and it was working perfectly for a couple of days and then all of a sudden it started messing up. Now only showing last 2 recent posters and nothing after or below that. Everything else in the forum is cut off. What gives?

          [ RGXbox.com ]

Bulakbol

@bfeo
   I cannot find anything wrong with your BoardIndex.php. The mod is installed in there. Can you post the error that you get?

@pradius
  Did you install any mod after installing this mod? Is uninstalling it resolve your problem? Any error in the error log?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

robbie93

#26
hi johny :D

i get this upon install

2.     Execute Modification     ./Sources/BoardIndex.php     Test failed
3.    Execute Modification    ./Themes/default/BoardIndex.template.php    Test failed

please can you edit the failed files for me  :D

thanks man 8)

ErikGCF

Great script...

But how can i change the highest posters section into how many posts there where in the last 10 days??

Can anyone help me?

Bulakbol

@robbie93
  I apologize for the delay. Been busy. I took another look at your files and the BoardIndex.template.php is kind of hard to edit. I'll take another look.

@ErikGCF
  Which one do you want to change? The one on the left of the one on the right?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

ErikGCF

Wow what a quick reply!!

The right one...

robbie93

no worries johnyB :D

it makes no sense at all to me :D  hehe

Bulakbol

@robbie93
   There's an error on the "Most Recent Topic" mod that you installed that's why it took me a while to install it manually. I can't install it without fixing the error so I did it for you. Here are your files. Use them after installing this mod.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Bulakbol

Quote from: ErikGCF on August 26, 2008, 05:23:52 AM
Wow what a quick reply!!

The right one...

To change the "Top posters" to "Posters in xx days",  in Sources/BoardIndex.php,
Code (find) Select
$top_request = db_query("
SELECT mem.ID_MEMBER, mem.realName, mem.posts, onlineColor
FROM {$db_prefix}members AS mem
LEFT JOIN {$db_prefix}membergroups ON {$db_prefix}membergroups.ID_GROUP = IF (mem.ID_GROUP=0, mem.ID_POST_GROUP, mem.ID_GROUP)
WHERE posts > 0
ORDER BY posts DESC
LIMIT $poster_limit", __FILE__, __LINE__);

$context['highest_posters'] = array();

while ($row = mysql_fetch_assoc($top_request))
$context['highest_posters'][] = array(
'posts' => $row['posts'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: '. $row['onlineColor']. ';">' . $row['realName'] . '</a>'
);
mysql_free_result($top_request);

// top posters of the day
$date = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);


Code (replace) Select
$date = @getdate(forum_time(false));
$midnight = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']) - ($modSettings['time_offset'] * 3600);
$number_of_days = $midnight - (86400 * 10);

$top_request = db_query("
SELECT mem.ID_MEMBER, mem.realName, COUNT(*) as posts, onlineColor, m.ID_BOARD
FROM {$db_prefix}messages AS m
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups ON ({$db_prefix}membergroups.ID_GROUP = IF (mem.ID_GROUP=0, mem.ID_POST_GROUP, mem.ID_GROUP))
WHERE m.posterTime > " . $number_of_days . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND m.ID_BOARD != $modSettings[recycle_board]" : '') . "
GROUP BY mem.ID_MEMBER
ORDER BY posts DESC
LIMIT $poster_limit", __FILE__, __LINE__);

$context['highest_posters'] = array();

while ($row = mysql_fetch_assoc($top_request))
$context['highest_posters'][] = array(
'posts' => $row['posts'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color: '. $row['onlineColor']. ';">' . $row['realName'] . '</a>'
);
mysql_free_result($top_request);

// top posters of the day


Change the number 10 to number of days you want.
Quote$number_of_days = $midnight - (86400 * 10);
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

ErikGCF

It works!!!

Thank you very much ;)

4fit?

Very nice mod.  However, I have several boards within my forum that are restricted to certain members/membergroups.  When posting in these boards, the post count is increased for that user on the Recent Posters list for everyone to see.  Any way of getting around this?

Bulakbol

Sorry 4fit, I like to help but I honestly do not know how to do it.  :(
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

robbie93

hi johny  :D

I changed the files over but nothing happened mate :D

Bulakbol

Did you install the mod first before you uploaded the files that I attached?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

robbie93

yea I did  :D then i changed the files over and nothing changed in the forum :o

Bulakbol

Not sure what is happening. Are there errors in the error log? Are you using the default theme?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Advertisement: