Top 10 Posters today and This Week

Started by burtybob, June 03, 2008, 11:34:31 PM

Previous topic - Next topic

tyty1234

You will have to manually make the edits to that file. Here's what you'll need to change in Stats.template.php.

Code (Find) Select

global $context, $settings, $options, $txt, $scripturl, $modSettings;


Code (Replace With) Select

global $context, $settings, $options, $txt, $scripturl, $modSettings, $top10_txt, $top10_sort;


Code (Find) Select


echo '
</table>
</td>
</tr><tr>
<td class="catbg" colspan="2" width="50%"><b>', $txt['top_starters'], '</b></td>
<td class="catbg" colspan="2" width="50%"><b>', $txt['most_time_online'], '</b></td>


Code (Replace With) Select


echo '
</table>
</td>
</tr><tr>';

foreach ($top10_sort as $time)
{
// This is needed first for the data.
$top10_posters = 'top10_posters_' . $time;
$top10_topic_starters = 'top10_topic_starters_' . $time;

echo '
<td class="catbg" colspan="2" width="50%"><b>', $top10_txt['posters'][$time], '</b></td>
<td class="catbg" colspan="2" width="50%"><b>', $top10_txt['topic_starters'][$time], '</b></td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_posters.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';
foreach ($context[$top10_posters] as $id => $poster)
echo '
<tr>
<td width="60%" valign="top">', $poster['link'], '</td>
<td width="20%" align="left" valign="top">', $poster['num_amount'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $poster['post_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $poster['num_amount'], '</td>
</tr>';
echo '
</table>
</td>
<td class="windowbg" width="20" valign="middle" align="center" nowrap="nowrap"><img src="', $settings['images_url'], '/stats_posters.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';
foreach ($context[$top10_topic_starters] as $id => $poster)
echo '
<tr>
<td width="60%" valign="top">', $poster['link'], '</td>
<td width="20%" align="left" valign="top">', $poster['num_amount'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $poster['post_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $poster['num_amount'], '</td>
</tr>';
echo '
</table>
</td>
</tr><tr>';
}

echo '
<td class="catbg" colspan="2" width="50%"><b>', $txt['top_starters'], '</b></td>
<td class="catbg" colspan="2" width="50%"><b>', $txt['most_time_online'], '</b></td>
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

glennk

When I click to go to mod download page it says the mod doesnt exist.

tyty1234

The link on the OP is broken. Try this one instead.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

clewis789

Quote from: tyty1234 on August 23, 2009, 04:14:33 PM
You will have to manually make the edits to that file. Here's what you'll need to change in Stats.template.php.

Code (Find) Select

global $context, $settings, $options, $txt, $scripturl, $modSettings;


Code (Replace With) Select

global $context, $settings, $options, $txt, $scripturl, $modSettings, $top10_txt, $top10_sort;


Code (Find) Select


echo '
</table>
</td>
</tr><tr>
<td class="catbg" colspan="2" width="50%"><b>', $txt['top_starters'], '</b></td>
<td class="catbg" colspan="2" width="50%"><b>', $txt['most_time_online'], '</b></td>


Code (Replace With) Select


echo '
</table>
</td>
</tr><tr>';

foreach ($top10_sort as $time)
{
// This is needed first for the data.
$top10_posters = 'top10_posters_' . $time;
$top10_topic_starters = 'top10_topic_starters_' . $time;

echo '
<td class="catbg" colspan="2" width="50%"><b>', $top10_txt['posters'][$time], '</b></td>
<td class="catbg" colspan="2" width="50%"><b>', $top10_txt['topic_starters'][$time], '</b></td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/stats_posters.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';
foreach ($context[$top10_posters] as $id => $poster)
echo '
<tr>
<td width="60%" valign="top">', $poster['link'], '</td>
<td width="20%" align="left" valign="top">', $poster['num_amount'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $poster['post_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $poster['num_amount'], '</td>
</tr>';
echo '
</table>
</td>
<td class="windowbg" width="20" valign="middle" align="center" nowrap="nowrap"><img src="', $settings['images_url'], '/stats_posters.gif" width="20" height="20" alt="" /></td>
<td class="windowbg2" width="50%" valign="top">
<table border="0" cellpadding="1" cellspacing="0" width="100%">';
foreach ($context[$top10_topic_starters] as $id => $poster)
echo '
<tr>
<td width="60%" valign="top">', $poster['link'], '</td>
<td width="20%" align="left" valign="top">', $poster['num_amount'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $poster['post_percent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
<td width="20%" align="right" valign="top">', $poster['num_amount'], '</td>
</tr>';
echo '
</table>
</td>
</tr><tr>';
}

echo '
<td class="catbg" colspan="2" width="50%"><b>', $txt['top_starters'], '</b></td>
<td class="catbg" colspan="2" width="50%"><b>', $txt['most_time_online'], '</b></td>


o dam i am know good a coding could you help me
My Mods:

Playstation 3 Avatars - http://custom.simplemachines.org/mods/index.php?mod=2150

Xbox 360 Avatars - Will be up very soon.

Nintendo Wii Avatars - Coming Soon

burtybob

Do you have access to the forums script files

If yes then I could do it for you but I won't do it for free sorry. tyty1234 might do it for free.
If no then we can't help you do manual edits.
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

clewis789

Quote from: burtybob on August 26, 2009, 09:07:33 AM
Do you have access to the forums script files

If yes then I could do it for you but I won't do it for free sorry. tyty1234 might do it for free.
If no then we can't help you do manual edits.

know i dont i run the forums for the owner of the website.
My Mods:

Playstation 3 Avatars - http://custom.simplemachines.org/mods/index.php?mod=2150

Xbox 360 Avatars - Will be up very soon.

Nintendo Wii Avatars - Coming Soon

burtybob

#86
I would therefore assume the webmaster has both access to the scripts AND at least some coding knowledge.
If both are the case then ask the webmaster if they can do the edits as the manager is unable to do it.

If he doesn't have the required ability to do the modifications but does have the script access then PM me and I will send you a contact for me that you can pass onto the webmaster if they require my help.
If he does need help it will cost around £5 - £10 maybe less but defiantly no more.
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

checkmater

H, but the mod isn't installable coz the code we need to replace doesnt exist in the stats.template.php file in the default folder..... what to do? I downloaded a clean version of the forum ver. 1.1.10 and these lines doesnt exist.
SMF, other software developing and some other stuff on my website, you can also hire someone at myFreelancing website . xD

sandmannd

Where is the link to this mod? I click the one on the first post and it says it's not there.

checkmater

Here's the link http://custom.simplemachines.org/mods/index.php?mod=1231 please try it and say me if you have the same problem. (The stats.template.php code lines what doesnt exists).

Greetings!
SMF, other software developing and some other stuff on my website, you can also hire someone at myFreelancing website . xD

sandmannd


checkmater

So, you installed the mod sucesfully?, if yes... please... give me a copy of your stats.template.php I need this urgent.

Thanks
SMF, other software developing and some other stuff on my website, you can also hire someone at myFreelancing website . xD

sandmannd

Nope, it messed up my site for stats so I removed it. I'll have to look at the manual install and do it that way.

tyty1234

Quote from: sandmannd on August 29, 2009, 03:09:54 PM
Nope, it messed up my site for stats so I removed it. I'll have to look at the manual install and do it that way.
if it messed up your template, please tell me exactly what you did, and post any errors you encountered.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

checkmater

Is this mod for the 1.1.10 version? coz I cant find the lines I need to mod in the stats.template.php file, and these lines arent in a clean version of the stats file in the last version of SMF, can someone give me  a compatible version of the stats template?

Thanks.
SMF, other software developing and some other stuff on my website, you can also hire someone at myFreelancing website . xD

tyty1234

Quote from: sandmannd on August 29, 2009, 03:09:54 PM
Nope, it messed up my site for stats so I removed it. I'll have to look at the manual install and do it that way.
Quote from: checkmater on August 31, 2009, 11:42:55 AM
Is this mod for the 1.1.10 version? coz I cant find the lines I need to mod in the stats.template.php file, and these lines arent in a clean version of the stats file in the last version of SMF, can someone give me  a compatible version of the stats template?

Thanks.

I was looking through the files this morning, and I found some errors with the $txt strings that makes the mod uninstallable for SMF 1.1.x users. I apologize for that, and I will try to fix it later on today, or within the next few days.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

checkmater

Hi, now the mod is installable but shows me this error:

Database Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '}messages AS m
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.I' at line 2
File: /home/elitefun/public_html/forum/Sources/Stats.php
Line: 547

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.10, while your database is at version 1.1.9. The above error might possibly go away if you execute the latest version of upgrade.php

What could be? I will see the code and try to fix it.

Greetings! - and thanks for support this mod tyty1234 !
SMF, other software developing and some other stuff on my website, you can also hire someone at myFreelancing website . xD

tyty1234

Quote from: checkmater on September 01, 2009, 12:41:05 PM
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.10, while your database is at version 1.1.9. The above error might possibly go away if you execute the latest version of upgrade.php

You should probably upgrade your database then. If that doesn't work, then please attach your Stats.php file.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Dream of Omnimaga

I wonder if it would be possible to make this mod compatible with this mod?

No matter in which order I install both, when both are installed conflict seems to occur, even thought there's no warning when installing the mods. So when trying to go on the Statistic page you get a

Fatal error: Call to undefined function: str_ireplace() in /homepages/32/d221544684/htdocs/omnimaga/Sources/Stats.php on line 467

Or is there any alternative to that mod that does the same thing?

tyty1234

str_ireplace() is actually a PHP5 function. It won't work with PHP4. I will probably change this to str_replace() in the future.

What you could do right now is uninstall the mod, and wait 'til I update the mod. Or, go into the Stats.php file, change str_ireplace() to str_replace().
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Advertisement: