On the main board I tried to install the mod which shows the most recent posters and top topics.
However although it seemed to install ok both sections appeared empty.
I tried some test topics and these were still empty.
We use version 1.1.8
Is there a way of rectifying this?
First, are you using some custom theme - and what language are you using?
Does it work if you are using the default theme?
Do you get any errors to your forum error log?
The default theme is the one we use.
AS for forum error log.. I wouldn't be able to find it lol
The language used is English.
Admin -> Forum Error log
The below is shown at the install page.
Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./Sources/Recent.php Test successful
2. Execute Modification ./Sources/BoardIndex.php Test failed
3. Execute Modification ./Themes/default/BoardIndex.template.php Test successful
4. Execute Modification ./Themes/babylon/BoardIndex.template.php Test successful
5. Execute Modification ./Themes/classic/BoardIndex.template.php Test successful
6. Execute Modification ./Themes/shinyblue115/BoardIndex.template.php Skipping file
7. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
8. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Test successful
9. Execute Modification ./Themes/default/Settings.template.php Test successful
10. Execute Modification ./Themes/babylon/Settings.template.php Test successful
11. Execute Modification ./Themes/shinyblue115/Settings.template.php Skipping file
12. Execute Modification ./Themes/default/languages/Settings.english.php Test successful
13. Execute Modification ./Themes/default/languages/Settings.english-utf8.php Test successful
14. Execute Modification ./Themes/babylon/languages/Settings.english.php Test successful
15. Execute Modification ./Themes/classic/languages/Settings.english.php Test successful
Errmm... Did you install it anyway? After it says test failed on one of the files?
If so, then you will need to edit the BoardIndex.php yourself, manually following the edits this mod makes.
You can find the manual install instructions from the mod download page.
As far as I could see the file edits didn't need replacing.
Is it easier for me to uninstall the package and try a different method?
No I still think you should double check on the ./Sources/BoardIndex.php
and the edits this mod was supposed to make to it.
Should I copy and paste it even if I can't find any differences?
What I see is what has to replace the original anyways.
Sorry but never done anything this technical before.
If you want, attach the current BoardIndex.php to your post, and give me a link to the mod download page, and I'll take a look at it ;)
EDIT: also, if you have some other mods installed, please list them as well :)
Hopefully this is the info you required:
<!-- Sources/BoardIndex.php -->
<file name="$sourcedir/BoardIndex.php">
<operation><!-- 437 -->
<search position="replace"><![CDATA[$context['page_title'] = $txt[18];
}]]></search>
<add><![CDATA[$context['page_title'] = $txt[18];
// highest posters
$poster_limit = $settings['number_recent_posts'];
$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);
$posters_request = db_query("
SELECT mem.ID_MEMBER, mem.realName, mem.showOnline, COUNT(*) as posts_count, 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 > " . $midnight . "
AND m.ID_MEMBER != 0" . (!$user_info['is_admin'] ? "
AND mem.showOnline != 0" : '') . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND m.ID_BOARD != $modSettings[recycle_board]" : '') . "
GROUP BY mem.ID_MEMBER
ORDER BY posts_count DESC
LIMIT $poster_limit", __FILE__, __LINE__);
$context['recent_posters'] = array();
while ($posters = mysql_fetch_assoc($posters_request))
{
if ($posters['showOnline'] == 0)
$link = '<i><a href="' . $scripturl . '?action=profile;u=' . $posters['ID_MEMBER'] . '" style="color: '. $posters['onlineColor']. ';">' . $posters['realName'] . '</a></i>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $posters['ID_MEMBER'] . '" style="color: '. $posters['onlineColor']. ';">' . $posters['realName'] . '</a>';
$context['recent_posters'][] = array(
'posts' => $posters['posts_count'],
'link' => $link
);
}
mysql_free_result($posters_request);
unset($poster_limit);
}
]]></add>
</operation>
</file>
<!-- default/BoardIndex.template.php -->
<file name="$themedir/BoardIndex.template.php">
<operation><!-- 228 -->
<search position="replace"><![CDATA[
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[214], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" /></a>
</td>
<td class="windowbg2">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="100%" border="0">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="middletext" valign="top"><b>', $post['link'], '</b> ', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</td>
<td class="middletext" align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}
]]></search>
<add><![CDATA[';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
$recent_width = isset($settings['recent_poster_width']) ? $settings['recent_poster_width'] : '14%';
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="titlebg">
<th height="26" align="left">', $txt['recent_posters'], '</th>
<th align="right"><a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" /></a></th>
<th valign="middle" align="left">', $txt[214], '</th>
<th align="right">', $txt['highest_posters'], '</th>
</tr>
<tr>
<td class="windowbg2" colspan="4">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
$alternate = true;
echo '
<table cellpadding="0" cellspacing="1" width="100%" border="0" class="bordercolor">
<tr>
<td class="windowbg2" width="' . $recent_width . '" align="left" valign="top">';
if (!empty($context['recent_posters']))
{
echo '
<table border="0" cellpadding="1" cellspacing="0" width="98%" align="left">';
foreach ($context['recent_posters'] AS $num => $name)
echo '
<tr>
<td class="smalltext" align="right">', $num+1, '</td>
<td class="smalltext" align="left" nowrap="nowrap">. ', $name['link'], '</td>
<td class="smalltext" align="right">', $name['posts'], '</td>
</tr>';
echo '
</table>';
}
else
echo ' ';
echo '
</td>
<td class="windowbg2">
<table width="100%" cellpadding="0" cellspacing="0" border="0">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
{
echo '
<tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
<td class="middletext" valign="top"><b> ', $post['link'], '</b> ', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</td>
<td class="middletext" align="right" valign="top" nowrap="nowrap">', $post['time'], ' </td>
</tr>';
$alternate = !$alternate;
}
echo '
</table>
</td>
<td class="windowbg2" width="' . $recent_width . '" align="left" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="98%" align="left">';
foreach ($context['highest_posters'] AS $num => $name)
echo '
<tr>
<td class="smalltext" align="right">', $num+1, '</td>
<td class="smalltext" align="left">. ', $name['link'], '</td>
<td class="smalltext" align="right">', number_format($name['posts']), '</td>
</tr>';
echo '
</table>
</td>
</tr>
</table>';
}
echo '
</td>
</tr>
</table>';
}
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">';]]></add>
</operation>
</file>
<!-- Themes/babylon/BoardIndex.template.php -->
<file name="$boarddir/Themes/babylon/BoardIndex.template.php" error="skip">
<operation><!-- 209 -->
<search position="replace"><![CDATA[</tr>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[214], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=recent">
<img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" border="0" /></a>
</td>
<td class="windowbg2">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table width="100%" border="0">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], ']</td>
<td valign="top">', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '</td>
<td align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}]]></search>
<add><![CDATA[</tr></table>';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
$recent_width = isset($settings['recent_poster_width']) ? $settings['recent_poster_width'] : '14%';
echo '<div class="bordercolor" style="margin: 1px;">
<table class="catbg" border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<th align="center" width="' . $recent_width . '" height="25">', $txt['recent_posters'], '</th>
<th align="right"><a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" /></a> </th>
<th valign="middle" align="left"> ', $txt[214], '</th>
<th align="center" width="' . $recent_width . '">', $txt['highest_posters'], '</th>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="windowbg2" colspan="3">';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' "', $context['latest_post']['link'], '" ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
$alternate = true;
echo '
<table cellpadding="0" cellspacing="1" width="100%" border="0" class="bordercolor">
<tr>
<td class="windowbg2" width="' . $recent_width . '" align="left" valign="top">';
if (!empty($context['recent_posters']))
{
echo '
<table border="0" cellpadding="2" cellspacing="0" width="98%" align="left">';
foreach ($context['recent_posters'] AS $num => $name)
echo '
<tr>
<td class="smalltext" align="right">', $num+1, '</td>
<td class="smalltext" align="left" nowrap="nowrap">. ', $name['link'], '</td>
<td class="smalltext" align="right">', $name['posts'], '</td>
</tr>';
echo '
</table>';
}
else
echo ' ';
echo '
</td>
<td class="windowbg2">
<table width="100%" cellpadding="0" cellspacing="0" border="0">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
{
echo '
<tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
<td align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], '] </td>
<td valign="top">', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '</td>
<td align="right" valign="top" nowrap="nowrap">', $post['time'], ' </td>
</tr>';
$alternate = !$alternate;
}
echo '
</table>
</td>
<td class="windowbg2" width="' . $recent_width . '" align="left" valign="top">
<table border="0" cellpadding="2" cellspacing="0" width="98%" align="left">';
foreach ($context['highest_posters'] AS $num => $name)
echo '
<tr>
<td class="smalltext" align="right">', $num+1, '</td>
<td class="smalltext" align="left">. ', $name['link'], '</td>
<td class="smalltext" align="right">', number_format($name['posts']), '</td>
</tr>';
echo '
</table>
</td>
</tr>
</table>';
}
echo '
</td>
</tr>
</table></div>';
}
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4">';]]></add>
</operation>
</file>
The following list is our installed mods.
Mod Name Version
1. SMF 1.0.16 / 1.1.8 Update 1.0 [ Uninstall ]
2. Simple Image Upload 1.1.0 [ Uninstall ]
3. Downloads System 1.1.5.1 [ Uninstall ]
4. Admin Notepad 1.0 [ Uninstall ]
5. Bot Buster 1.1 [ Uninstall ]
6. Skype Integration 1.0 [ Uninstall ]
7. SMF Gallery Lite 1.8.3 [ Uninstall ]
8. simplemp 3.2 [ Uninstall ]
9. SMF Staff Page 1.6 [ Uninstall ]
10. 30 Assorted Animated Avatars 1.0 [ Uninstall ]
11. Welcome Back 1.0 [ Uninstall ]
12. Simple staff color legend 1.1 [ Uninstall ]
13. Member Color Link 3.0.6 [ Uninstall ]
14. Todays Birthday 1.2 [ Uninstall ]
15. Animated Avatars 1.0 [ Uninstall ]
16. Car Avatar Pack V1.0 1.0 [ Uninstall ]
17. Cat Avatars 1.0 [ Uninstall ]
18. Colorize Boards 3.0 [ Uninstall ]
19. Country_Flagatars 1.1 [ Uninstall ]
20. Latest Members 1.1 [ Uninstall ]
21. New Style Message Icon 1.1 [ Uninstall ]
22. Geek Avatars V1.0 1.0 [ Uninstall ]
23. Runes 1.0 [ Uninstall ]
24. Users Online Today Mod 1.4.0 [ Uninstall ]
25. Sci-Fi Avatars 1.0 [ Uninstall ]
26. PM Readed 1.0 [ Uninstall ]
27. Zodiac_Starsigns 1.2 [ Uninstall ]
28. Age on post 1.0 [ Uninstall ]
29. FontandSizeDropdown_1.3 1.3 [ Uninstall ]
30. MCLegendII.2 3.0 [ Uninstall ]
31. MessagePreviewOnHover 1.7 [ Uninstall ]
32. Horoscope Avatars 1.0 [ Uninstall ]
33. star wars avatars 1.0 [ Uninstall ]
34. Ultimate Dog Avatar Pack V1.0 1.0 [ Uninstall ]
35. Posting_Announcement 1.1.3.1 [ Uninstall ]
36. Last Active On MemberList 1.01 [ Uninstall ]
37. Best 3 0.1 [ Uninstall ]
38. Award Mod 1.11 [ Uninstall ]
39. Top 10 Posters Today And This Week Stats 1.1 [ Uninstall ]
40. Enhanced Profile Header 1.0 [ Uninstall ]
41. YouTube BBCode 2.4 [ Uninstall ]
42. Memberlist_Xrevolution 1.2 [ Uninstall ]
43. Animal Avatars Version 1 1.0 [ Uninstall ]
44. NextPostLevel 1.0 [ Uninstall ]
45. Posters In Recent Posts 1.1 [ Uninstall ]
46. Google Talk Field 1.0.6 [ Uninstall ]
Quote from: TheListener on April 13, 2009, 10:48:12 AM
Hopefully this is the info you required:
Not exactly, I would rather have you attach the actual file to your post.
You can find the option to attach a file, in the options below the reply box :)
EDIT: But with 46 mods I'm supprised this install failed in only one file ::)
Apologies for the wrong info. Not quite sure which info you require.
Sheesh technology can be a pain in the butt sometimes. :)
Yup,
So what I wanted you to do, is to FTP the ./Sources/BoardIndex.php file to your computer,
and attach the actual file to your post. Makes it easier to handle it. A lot easier ;)
I'm beginning to feel as tho I am wasting your time here. :(
Am I right in saying you want the installation instructions as well as what I previously posted?
Ok, let's start with this - could you link to the mod you are trying to install now?
Unfortunately the link didn't work so hope this helps.
Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./Sources/Recent.php Test successful
2. Execute Modification ./Sources/BoardIndex.php Test failed
3. Execute Modification ./Themes/default/BoardIndex.template.php Test successful
4. Execute Modification ./Themes/babylon/BoardIndex.template.php Test successful
5. Execute Modification ./Themes/classic/BoardIndex.template.php Test successful
6. Execute Modification ./Themes/shinyblue115/BoardIndex.template.php Skipping file
7. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
8. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Test successful
9. Execute Modification ./Themes/default/Settings.template.php Test successful
10. Execute Modification ./Themes/babylon/Settings.template.php Test successful
11. Execute Modification ./Themes/shinyblue115/Settings.template.php Skipping file
12. Execute Modification ./Themes/default/languages/Settings.english.php Test successful
13. Execute Modification ./Themes/default/languages/Settings.english-utf8.php Test successful
14. Execute Modification ./Themes/babylon/languages/Settings.english.php Test successful
15. Execute Modification ./Themes/classic/languages/Settings.english.php Test successful
Quote from: TheListener on April 13, 2009, 11:23:30 AM
Unfortunately the link didn't work so hope this helps.
No, I mean I need a link to the page where you downloaded this mod :)
Would it be the page on the website you mean?
Quote from: TheListener on April 13, 2009, 11:28:50 AM
Would it be the page on the website you mean?
Yup - the page with the download link for the mod :)
OK let's pray this works.
http://visionaryhosting.info/forum/index.php
Quote from: TheListener on April 13, 2009, 11:35:06 AM
OK let's pray this works.
Hmm.. That your forum?
I meant a link like http://custom.simplemachines.org/mods/index.php?mod=000 to the page where you downloaded this mod.
Ah I do apologise.
http://custom.simplemachines.org/mods/index.php?mod=1280
This is the page I downloaded the mod from.
OK, now do you know how to use FTP?
How do I use FTP? / What is FTP? (http://docs.simplemachines.org/index.php?topic=480)
Could you copy the BoardIndex.php file from your installation's Sources folder,
and attach the copied file to your next post like this:
(using the additional options, browse for the file from your computer, and press post. )
Do you mean the info I posted before the mods list?
Quote from: TheListener on April 13, 2009, 11:54:07 AM
Do you mean the info I posted before the mods list?
No - the actual file named BoardIndex.php that is in your *smf*/Sources folder on your server.
ah problem there is we use an outside server and I don't have access to it. Don't think my partner does either. :( ::)
You don't have any means of copyinf files from it or to it?
If you are able to use the package manager, you should also be aware of FTP login and password,
so you logically should have access to it via FTP...
How do I use FTP? / What is FTP? (http://docs.simplemachines.org/index.php?topic=480)