Link to Mod (http://mods.simplemachines.org/index.php?mod=502)
Rate this Mod (http://mods.simplemachines.org/index.php?action=review;sa=add;mod=502)
Versions:
For SMF 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.1 RC3
Description:
This mod will add a frequency bar to each posts to show member activity.
For instance, if your most active member posts 20 times a day, set the
threshold to 20 then their bar will be maxed out. A member that averages
5 posts per day will have a bar 1/4 of the bar colored in. When a user
hovers over the bar, it will show total posts and daily average. I've
seen this on other boards and thought it would be a good feature here.
Options:
In the Admin->Edit Features and Options there will be 3 new options at the
bottom of the Basic Forum Features section.
* Enable frequency bar on posts - Toggle on or off
* Posting frequency bar threshold - Set number to scale the bar
* Posting frequency bar color - Choose from 8 colors
(black, blue, green, grey, orange, purple, red, yellow)
Troubleshoot:
* If you are using a theme other than default, download the
frequency_images.zip file and upload them to your theme's image directory.
* Make sure you have a registered date set for the admin user.
Screenshots:
1. Frequency bar on a post (grey)
2. Frequency bar options in Edit Features and Options
3. Green bar with tool-tip (hover) text
I received a "Execute Modification ./Sources/Display.php" error when trying to apply the mod.
Looks like a great mod but I will not attempt to load it unless this problem can be fixed.
Cheers,
Sean
do you have other mods installed that effected the display.php file?
yes, are there manual adjustments I can make to allow your mod to work?
yes. what version are you using?
you can download the zip file and read the install xml file.
you will only need to manually fix display.php, but there are only
4 pages that get affected anyways.
It failed at the mod setting for me but i installed it manually, awesome mod!
Quote from: ArkServer on October 26, 2006, 06:08:17 PM
It failed at the mod setting for me but i installed it manually, awesome mod!
cool!
thanks
I am using SMF 1.1 RC3
I will look at the files.
Cheers,
Sean
Look like an awesome mod. Might try it out later :)
Any changes to get for RC 1.1 2 ??
Quote from: qtime on October 27, 2006, 02:14:44 AM
Any changes to get for RC 1.1 2 ??
ive always used the 1.0.x versions.
i downloaded a fresh install of RC3 and modified my code because
i knew people would ask for it.
you can probably get by with a manual install for your version.
if it works, ill add it to the list of avaiable versions.
Hm.. not sure if this is an error with the mod or an error with my forums but when I post the bar doesnt display anything but it does work for other people.
(example)
My post:
http://atlantis.montecarlohosting.net/~arksvr/forum/index.php/topic,3983.msg19403/topicseen.html#new
other people:
http://atlantis.montecarlohosting.net/~arksvr/forum/index.php/topic,3288.msg19401.html#new
Quote from: ArkServer on October 27, 2006, 10:39:00 AM
Hm.. not sure if this is an error with the mod or an error with my forums but when I post the bar doesnt display anything but it does work for other people.
(example)
My post:
http://atlantis.montecarlohosting.net/~arksvr/forum/index.php/topic,3983.msg19403/topicseen.html#new
other people:
http://atlantis.montecarlohosting.net/~arksvr/forum/index.php/topic,3288.msg19401.html#new
it shows you only post .006 posts per day. check your registered date under Profile->Account Settings
Date registered: 2005-11-11
Posts: 2709
I don't think .006 is right?
Well, atleast i know it's not because of your cool mod ;D
Quote from: ArkServer on October 27, 2006, 11:14:25 AM
Date registered: 2005-11-11
Posts: 2709
I don't think .006 is right?
Well, atleast i know it's not because of your cool mod ;D
it could be. look on your profile and see what it says your posts per day is.
Quote from: steve in houston on October 27, 2006, 11:23:02 AM
Quote from: ArkServer on October 27, 2006, 11:14:25 AM
Date registered: 2005-11-11
Posts: 2709
I don't think .006 is right?
Well, atleast i know it's not because of your cool mod ;D
it could be. look on your profile and see what it says your posts per day is.
Sorry i forgot to mention that.
Posts: 2,709 (7.740 per day)
:-\
but all the other members post bar work ok?
i was thinking it was something with the calculations but all members
use the same equation.
try changing your registered date to see if it effects it
When i change 2005 to 2006 it does show some progress (2/7th full bar)
I think somehow it miscalculates my posting stats.
i believe it is because RC3 shows posts over 1000 with a comma.
my version 1.0.8 doesnt do that.
ill add a line to strip it.
ark, i just uploaded the fix.
if you just want to edit it manually, its 1 little thing
in file Display.template.php
Find:
$posts_per_day = number_format($message['member']['posts'] / $days_registered, 3);
and Replace with:
$posts_per_day = comma_format($message['member']['posts'] / $days_registered, 3);
* This applies to RC3 only
I wish i could say it worked but I guess my admin account is broken ;(
Quote from: ArkServer on October 27, 2006, 01:53:12 PM
I wish i could say it worked but I guess my admin account is broken ;(
::) thats not good.
Hi, i have one more question, does your mod count the message in the archieve/deleted post boards? If not that would be the problem.
Quote from: ArkServer on October 28, 2006, 11:49:30 AM
Hi, i have one more question, does your mod count the message in the archieve/deleted post boards? If not that would be the problem.
it uses the same equation that is on your profile.
if you have those boards set up to count posts, then this will use them.
I installed it - everything, apparently, was installed correctly - no errors...
But, now that I'm running it, nothing is happening. Nothing shows up.
I did upload the images to the themes\images directory (since I'm not using default layout).
Should they go in their own folder? I just have them sitting in the main images directory...
(here's a link to my board...unless I'm missing something, it's not showing up):
http://www.libogroup.com/SMF/index.php
Chris
Quote from: lemur21 on October 30, 2006, 11:20:53 AM
I installed it - everything, apparently, was installed correctly - no errors...
But, now that I'm running it, nothing is happening. Nothing shows up.
I did upload the images to the themes\images directory (since I'm not using default layout).
Should they go in their own folder? I just have them sitting in the main images directory...
(here's a link to my board...unless I'm missing something, it's not showing up):
http://www.libogroup.com/SMF/index.php
Chris
did you Enable it in the Admin panel?
Under "Features and Options"
I have "Enable frequency bar" - checked
Posting threshold - 20
color - blue
Is there somewhere else I need to activate it?
Chris
no, thats it.
does that theme you use have its own Display.php file in it?
some themes share it with the defaults.
if under your theme folder you see a file called Display.php,
then manually make the changes to that file.
I don't have a display.php file.
I DO have a display.template.php file...
Is that what you're asking about? And, if so - which manual changes am I making to it?
Chris
yes, thats what i meant. sorry.
* This applies to RC3 only display.template.php
Look for this phrase:
// Show avatars, images, etc.
And ADD this code BEFORE the above phrase:
// Frequency Bar
if (!empty($modSettings['frequency_bar_enable'])){
$days_registered = (int) ((time() - $message['dateRegistered']) / (3600 * 24));
if (empty($message['dateRegistered']) || $days_registered < 1){
$days_registered = 1; // Skip out on the Divide by Zero error
}
$posts_per_day = comma_format($message['member']['posts'] / $days_registered, 3);
// Calculate bar width
if(empty($modSettings['frequency_bar_max'])){ $modSettings['frequency_bar_max'] = 50; }
$rate = $posts_per_day * (100/$modSettings['frequency_bar_max']);
if($rate>100){ $rate = 100; }
echo $txt['frequency_bar_text'].'
<table border="0" cellpadding="0" cellspacing="0">
<tr onmouseover="this.title=\'', $message['member']['posts'], ' posts (', $posts_per_day, ' posts per day)\'">
<td><img border="0" src="', $settings['images_url'] ,'/freq_bar_l.gif" width="4" height="17" alt="" /></td>
<td width="100" style="background:url(\'', $settings['images_url'] ,'/freq_bar_bk.gif\');background-repeat:repeat-x;"><img border="0" src="', $settings['images_url'] ,'/freq_bar_', $modSettings['frequency_bar_color'] ,'.gif" width="', $rate ,'" height="17" alt="" /></td>
<td><img border="0" src="', $settings['images_url'] ,'/freq_bar_r.gif" width="4" height="17" alt="" /></td>
</tr>
</table>
<br />';
}
Yep - that did it...thanks a bunch!
I'm still 'new' at figuring out this whole coding thing ;)
Chris
Can this be made for 1.1 rc2?
Quote from: SurfExcelerator.com on October 30, 2006, 01:05:21 PM
Can this be made for 1.1 rc2?
i dont have that version to test on.
my guess is that it will work.
if you can manually install it and verify that it works,
ill add RC2 as an option.
Strangly it only works for members with less than 1000 posts on my board.
As soon as a member has greater than 1000 postings, it will show an empty line.
I was making the suggested code change in Display.template.php but it didn't solve the problem.
And no, I did not mess up that php file with a strange editor and I also uploaded/replaced it correctly.
OK, I solved the problem. Maybe useful for others:
Admin -> Features / Options -> Default number format -> 1234.00
Quote from: katzenellenbogen on October 31, 2006, 02:54:15 PM
OK, I solved the problem. Maybe useful for others:
Admin -> Features / Options -> Default number format -> 1234.00
yeah, i thought i fixed it by using the comma_format instead of number.
the comma throws the equation off.
Hm, I think you are right about the 1k posts. I just checked and my account and a few others with 1k+ posts have the same problem with the bar. Still.. setting the default number format to 1234.00 didn't help.
alrighty then.
in that case, open display.template.php in the themes directory
find this line:
$posts_per_day = comma_format($message['member']['posts'] / $days_registered, 3);
and add this line just ABOVE it
$message['member']['posts'] = str_replace(",","",$message['member']['posts']);
it will strip the comma.
ill modify the zipped file now
Quote from: steve in houston on October 31, 2006, 06:29:34 PM
alrighty then.
in that case, open display.template.php in the themes directory
find this line:
$posts_per_day = comma_format($message['member']['posts'] / $days_registered, 3);
and add this line just ABOVE it
$message['member']['posts'] = str_replace(",","",$message['member']['posts']);
it will strip the comma.
ill modify the zipped file now
Yup, that did the trick. Awesome! :-*
I got this successfully installed, but had to manaully mod display.php due to a conflict with the Reason for Editing mod.
i just made an enhancement to this bar.
i made several other bars to go with it, including:
1. Average posts per day
2. Posts made today
3. Longevity (how long have they been a member)
4. Positive karma percentage (positive karma / total karma)
* all bars have descriptive stats as a tooltip when the mouse hovers over it
i am beta testing it on http://www.stucknut.com/jimrome (http://www.stucknut.com/jimrome)
just pick any thread and look above the avatar.
i will package it up soon. it will most likely be a new mod because there
are so many changes and some people may want just a single post
frequency bar.
wow steve the new one looks absolutely stunning!! Great job!
I eagerly await the release :D I wana be the 1st to try it out :D
Aku
Quote from: akulion on November 04, 2006, 11:34:34 PM
wow steve the new one looks absolutely stunning!! Great job!
I eagerly await the release :D I wana be the 1st to try it out :D
Aku
Agree wif akulion about this ! ;D
any news on this?
im open for beta testing as well - got a test site up and ready :D
it runs just fine.
i just need to break down the code and package it.
im kinda limited on time right now with work projects.
hopefully ill get to it this week.
eagerly looking forward to it :D
Thanks
nice mod...
*waits patiently for the cool next version*
hey any news on when the new one will be out?
i check everyday lol
Quote from: akulion on November 22, 2006, 06:35:47 AM
hey any news on when the new one will be out?
i check everyday lol
:)
sorry, i was out for a while.
im just now getting caught up on everything.
no problem - just really love it so couldnt wait lol
1.1 Final is out :D
Looking forward to the NEW 1.1 compatible mod :D (the new one) :D
Hello,
Is there an ETA on when the 1.1 compatible mod will be ready? Since you can't uninstall the old one (easily) - right now, everyone's post frequency bar just flies off the page! :)
Thanks!
Chris
heres the countdown
(http://img148.imageshack.us/img148/4551/countdownnl3.gif)
This mod is compatible with 1.1. Just unzip the file, open packages-info.php and edit. Change all 1.1RC3 to 1.1 and repackage.
im waiting for the NEW one...did u see the preview on his site?
its really cool!
Xarcell,
I think you're mostly right -- I did download the file, and opened packages-info.php...there were two instances where 1.1 RC3 needed to be changed to 1.1
And, now, yes, the mod works -- people actually have the correct bar.
However, if did give me some install errors, when I installed the mod (Themes/default/Display.Template.php and Sources/ModSettings.php).
And, even though it's working, it's no longer showing up in the admin panel - i.e., I couldn't enable/disable it, change the color of the bar or change the # of posts, if I wanted to...
Chris
can't be installed on 1.1 Final by adding 1.1 to packages-info.php.. (blackrain)
on a fresh install of 1.1, it works fine for me without errors.
I enabled/disabled 3 times and it worked. Also, no errors...
EDIT: I also testing changing colors. Also works without errors.
How do you get a 'fresh' install? When I upgraded to 1.1 Final - it still kept some of the frequency bar mod applicable (although, everyone was maxed out).
Now, it's functioning correctly -- but I don't show the options to change anything (i.e., I can't change the color or the post count, because those options aren't even present on the admin screen to edit).
Chris
Try manually installing it.
I don't know what to tell you other than it works fine for me.
By fresh install , I mean SMF 1.1final.
Yep - it doesn't work fine for me...
I'll have to wait until the 1.1-compatible mod is released. Maybe it's because I'm not using the default theme....in either case, since it's WORKING (but I just can't alter it) it's not an urgency...
Chris
aaaaaaaaaaaaaaaaa
i cant wait any longer :'(
when is the new one coming out seen here:
http://www.stucknut.com/sports/index.php/topic,8659.msg112789.html#msg112789
:'( :-* :'( :-* :D
hey, its me again.
i am going to do a fresh install with 1.1 on my website and
ill extract the new post frequency code and package it up
while i do that.
yesss yess :D yahooo :D thanks
cant wait wooo hoo
I like the original version better.
I hope you offer both. Maybe a toggle between teh 2 in the admin?
Hi,
I upgraded from 1.1RC3 where it worked fine to 1.1 Final and somehow, some settings weren't changed and I still saw the image under each name in my forum so, can I assume that it does work fine in 1.1 Final ?
that means that whichever theme ur using did not get updated!
there have been template changes between 1.1 RC3 and 1.1 Final - so be sure to make the necessary updates to ur custom themes using this doc:
http://www.simplemachines.org/community/index.php?topic=129250.0
Ok, maybe it's bed time... what did I do wrong this time?
Just followed the link and looked for those lines to be changed ending up with this template parse error:
I just copied back the index.template.php from the upgrade files I have and it looks normal again, better get to bed and read all again tomorrow ;)
dunno - but in my case all my mods got uninstalled when updating..so it really sucked having to re-modify all the themes by hand lol as u can imagine!
but if its workin for u - i say enjoy! lol
Has this been made 1.1 Final-compatible yet? I'd like to redownload it and install it over the not-complete version I currently have on my system...
Chris...
Yes same question here :S
My board is fully modded up now
The ONLY mod I await now is the new version of Steves frequency bar and then I will be at peace :D
steve o steve why hast thou forsaken us :'(
Quote from: lemur21 on December 12, 2006, 08:26:08 AM
Has this been made 1.1 Final-compatible yet? I'd like to redownload it and install it over the not-complete version I currently have on my system...
Chris...
I'm wondering the same! :)
bump... for the question
steve must be busy especially with it being the end of the year and all
Im sure he will get around to it
remember: best things come to those who wait :D
No problem, it can wait.
And you're right, the best things do come to those who wait ;D
All the best for 2007
steve any news on this ? :D
Yeah steve, any news? :P
I think steve got fed up with us asking and decided to make us wait more
whens this coming out?
in 2009
Quote from: akulion on January 08, 2007, 10:47:27 AM
in 2009
I thought i read somewhere it's cancelled till 2015 :D
Anyway I'm going back to the waiting mode.
lol ok lets not get carried away or steve may get angry :P
Steve it's that time of the year that you can give us a little present, yes... i'm talking about the mod (forget the fact that christmas just passed) =P
It's the last one remaining for my website be completed. We are few, but we are waiting. =)
view his profile, it looks like he barely ever visits this site I doubt he's gonna read everyone's spam in this topic:
Name: steve in houston
Posts: 119 (0.248 per day)
Position: Newbie
Date Registered: September 17, 2005, 05:17:47 PM
Last Active: December 13, 2006, 01:24:49 AM
its not spam - its FAN MAIL
we all love this mod and are anxiously awaiting it - thats why we keep posting in the 'hope'
Just like waiting for Chinese Democracy (Guns N' Roses album 13 years in the making) which is what my whole site is about. ;D
Haha just kidding---hopefully someone can contact him or somehow we can get this mod...its great, I saw it on another board once and it was really cool.
we love Post Frequency Bar (the new one) lol
we love Post Frequency Bar
we love Post Frequency Bar
we love Post Frequency Bar
see its like a horde of crazy fans in this thread going insane with the anticipation!
hhahaahahaha, all this talk, now I want it!
Post Frequency Bar!
Post Frequency Bar
Post Frequency Bar
Post Frequency Bar
Post Frequency Bar
Anyone update this to 1.1.1?
man steve u took so long that now ive switched over to vB whch has this mod :P
its all ur fault :P
Quote from: akulion on January 29, 2007, 10:53:12 AM
man steve u took so long that now ive switched over to vB whch has this mod :P
its all ur fault :P
So, it is still not available ?
Anybody knows if this mod works in 1.1.2?
It took me far too long to repackage this mod...the previous version seemed to have a lot of failsafes around the display.template.php file that were causing members to have to do manual installs because they caused the package installer to fail...that should be OK now. The version for SMF 1.1.1 and 1.1.2 I've put together has several small changes to accommodate small changes in the SMF core files that would also cause the package installer to fail...it seems to be good to go and I've tested it on a clean install of SMF 1.1.2. I added a modified install file for 1.1.1 and 1.1.2 to the package.
Version for SMF 1.1.1 and 1.1.2 below
Thanks TrueSatan. :)
My pleasure...glad you have liked it.
So weird, I installed the updated package, received no errors, but there's no frequency bar on the posts. On my test site I set the threshold at 10.
Any ideas?
http://www.avalanchestyle-test.com/forum/index.php?action=forum
Quote from: RoarinRow on March 05, 2007, 10:44:39 AM
So weird, I installed the updated package, received no errors, but there's no frequency bar on the posts. On my test site I set the threshold at 10.
Any ideas?
http://www.avalanchestyle-test.com/forum/index.php?action=forum
Figured it out. Somehow this code did not pull into my display.template.php file. I added it manually and it worked!
// Frequency Bar - Steve Lyons - Stucknut.com
if (!empty($modSettings['frequency_bar_enable'])){
$days_registered = (int) ((time() - $message['dateRegistered']) / (3600 * 24));
if (empty($message['dateRegistered']) || $days_registered < 1){
$days_registered = 1; // Skip out on the Divide by Zero error
}
$message['member']['posts'] = str_replace(",","",$message['member']['posts']);
$posts_per_day = comma_format($message['member']['posts'] / $days_registered, 3);
// Calculate bar width
if(empty($modSettings['frequency_bar_max'])){ $modSettings['frequency_bar_max'] = 50; }
$rate = $posts_per_day * (100/$modSettings['frequency_bar_max']);
if($rate>100){ $rate = 100; }
echo $txt['frequency_bar_text'].'
<table border="0" cellpadding="0" cellspacing="0">
<tr onmouseover="this.title=\'', $message['member']['posts'], ' posts (', $posts_per_day, ' posts per day)\'">
<td><img border="0" src="', $settings['images_url'] ,'/freq_bar_l.gif" width="4" height="17" alt="" /></td>
<td width="100" style="background:url(\'', $settings['images_url'] ,'/freq_bar_bk.gif\');background-repeat:repeat-x;"><img border="0" src="', $settings['images_url'] ,'/freq_bar_', $modSettings['frequency_bar_color'] ,'.gif" width="', $rate ,'" height="17" alt="" /></td>
<td><img border="0" src="', $settings['images_url'] ,'/freq_bar_r.gif" width="4" height="17" alt="" /></td>
</tr>
</table>
<br />';
}
Yep...those old failsafes made the package install fail if there was any problem in that area of the code and not put in the other edits on the affected file either. it should work as it is on a clean install but if there is a glitch the manual edit you posted will fix it.
I might have another go at the package to try to trap the error better.
I cannot get the frequency bar to work on a theme, help would be appriciated
<?php
// Version: 1.0; Display
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
//Display ads on the thread page
$ads = show_threadAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
// Show the anchor for the top and for the first message. If the first message is new, say so.
echo '
<a name="top"></a>
<a name="msg', $context['first_message'], '"></a>', $context['first_new_message'] ? '<a name="new"></a>' : '';
// Show the linktree as well as the "Who's Viewing" information.
echo '
<table width="100%" cellpadding="3" cellspacing="0">
<tr>
<td valign="bottom">', theme_linktree(), '</td>';
if (!empty($settings['display_who_viewing']))
{
echo '
<td align="center" class="smalltext">';
// Show just numbers...?
if ($settings['display_who_viewing'] == 1)
echo count($context['view_members']), ' ', count($context['view_members']) == 1 ? $txt['who_member'] : $txt[19];
// Or show the actual people viewing the topic?
else
echo empty($context['view_members_list']) ? '0 ' . $txt[19] : implode(', ', $context['view_members_list']) . (empty($context['view_num_hidden']) || $context['can_moderate_forum'] ? '' : ' (+ ' . $context['view_num_hidden'] . ' ' . $txt['hidden'] . ')');
// Now show how many guests are here too.
echo $txt['who_and'], $context['view_num_guests'], ' ', $context['view_num_guests'] == 1 ? $txt['guest'] : $txt['guests'], $txt['who_viewing_topic'], '</td>';
}
// Show the previous/next links.
echo '
<td valign="bottom" align="right" class="smalltext">
<span class="nav">', $context['previous_next'], '</span>
</td>
</tr>
</table>';
// Is this topic also a poll?
if ($context['is_poll'])
{
echo '
<table cellspacing="1" cellpadding="4" width="100%" class="tborder">
<tr class="titlebg">
<td colspan="2" valign="middle" align="left" style="padding-left: 6px;">
<img src="', $settings['images_url'], '/topic/', $context['poll']['is_locked'] ? 'normal_poll_locked' : 'normal_poll', '.gif" alt="" align="top" /> ', $txt['smf43'], '
</td>
</tr>
<tr>
<td width="5%" valign="top" class="windowbg2"><b>', $txt['smf21'], ':</b></td>
<td class="windowbg2">
', $context['poll']['question'];
if (!empty($context['poll']['expire_time']))
echo '
(', ($context['poll']['is_expired'] ? $txt['poll_expired_on'] : $txt['poll_expires_on']), ': ', $context['poll']['expire_time'], ')';
// Are they not allowed to vote but allowed to view the options?
if (!$context['allow_vote'])
{
echo '
<table width="100%" border="0">
<tr>
<td style="padding-top: 2ex;">
<table border="0" cellpadding="0" cellspacing="0">';
// Show each option with it's corresponding percentage bar.
foreach ($context['poll']['options'] as $option)
echo '
<tr>
<td>', $option['option'], '</td>', $context['allow_poll_view'] ? '
<td width="7"> </td>
<td nowrap="nowrap">' . $option['bar'] . $option['votes'] . ' (' . $option['percent'] . '%)</td>' : '', '
</tr>';
echo '
</table>
</td>
<td valign="bottom" style="padding-left: 15px;" align="right" width="100">';
// If they're allowed to lock the poll, show a link!
if ($context['poll']['lock'])
echo '
<a href="', $scripturl, '?action=lockVoting;topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', !$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b'], '</a><br />';
// If they're allowed to edit the poll... show a link!
if ($context['poll']['edit'])
echo '
<a href="', $scripturl, '?action=editpoll;topic=', $context['current_topic'], '.', $context['start'], '">', $txt['smf39'], '</a>';
echo '
</td>
</tr>', $context['allow_poll_view'] ? '
<tr>
<td colspan="2"><b>' . $txt['smf24'] . ': ' . $context['poll']['total_votes'] . '</b></td>
</tr>' : '', '
</table><br />';
}
// They are allowed to vote! Go to it!
else
{
echo '
<form action="', $scripturl, '?action=vote;topic=', $context['current_topic'], '.', $context['start'], ';poll=', $context['poll']['id'], '" method="post" style="margin: 0px;">
<table width="100%" border="0">
<tr>
<td colspan="2">';
// Show a warning if they are allowed more than one option.
if ($context['poll']['allowed_warning'])
echo '
', $context['poll']['allowed_warning'], '
</td>
</tr><tr>
<td>';
// Show each option with it's button - a radio likely.
foreach ($context['poll']['options'] as $option)
echo '
', $option['vote_button'], ' ', $option['option'], '<br />';
echo '
</td>
<td valign="bottom" style="padding-left: 15px;" align="right" width="100">';
// Allowed to view the results? (without voting!)
if ($context['allow_poll_view'])
echo '
<a href="', $scripturl, '?topic=', $context['current_topic'], '.', $context['start'], ';viewResults">', $txt['smf29'], '</a><br />';
// Show a link for locking the poll as well...
if ($context['poll']['lock'])
echo '
<a href="', $scripturl, '?action=lockVoting;topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', (!$context['poll']['is_locked'] ? $txt['smf30'] : $txt['smf30b']), '</a><br />';
// Want to edit it? Click right here......
if ($context['poll']['edit'])
echo '
<a href="', $scripturl, '?action=editpoll;topic=', $context['current_topic'], '.', $context['start'], '">', $txt['smf39'], '</a>';
echo '
</td>
</tr><tr>
<td colspan="2"><input type="submit" value="', $txt['smf23'], '" /></td>
</tr>
</table>
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
}
echo '
</td>
</tr>
</table><br />';
}
// Show the page index... "Pages: [1]".
echo '
<table width="100%" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td align="left" class="catbg" width="100%" height="35">
<table cellpadding="3" cellspacing="0" width="100%">
<tr>
<td>
<b>', $txt[139], ':</b> ', $context['page_index'];
// Show a "go down" link?
if (!empty($modSettings['topbottomEnable']))
echo $context['menu_separator'], '<a href="#bot">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/go_down.gif" alt="' . $txt['topbottom5'] . '" border="0" align="top" />' : $txt['topbottom5'], '</a>';
echo '
</td>
<td align="right" style="font-size: smaller;">';
$buttonArray = array();
if ($context['can_reply'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';
if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' . $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/notify.gif" alt="' . $txt[131] . '" border="0" />' : $txt[131]) . '</a>';
// This is a special case; if they can see mark unread, put it at the top... otherwise show add poll.
if ($context['user']['is_logged'] && $settings['show_mark_read'])
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=topic;topic=' . $context['current_topic'] . '.' . $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markunread.gif" alt="' . $txt['mark_unread'] . '" border="0" />' : $txt['mark_unread']) . '</a>';
elseif ($context['can_add_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;poll;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/addpoll.gif" alt="' . $txt['add_poll'] . '" border="0" />' : $txt['add_poll']) . '</a>';
if ($context['can_send_topic'])
$buttonArray[] = '<a href="' . $scripturl . '?action=sendtopic;topic=' . $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/sendtopic.gif" alt="' . $txt[707] . '" border="0" />' : $txt[707]) . '</a>';
$buttonArray[] = '<a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0" target="_blank">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/print.gif" alt="' . $txt[465] . '" border="0" />' : $txt[465]) . '</a>';
echo implode($context['menu_separator'], $buttonArray);
echo '</td>
</tr>
</table>
</td>
</tr>
</table>
<br />';
// Show the topic information - icon, subject, etc.
echo '
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
<tr class="titlebg">
<td valign="middle" align="left" width="15%" style="padding-left: 6px;">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" alt="" align="middle" /> ', $txt[29], '
</td>
<td valign="middle" align="left" width="85%" style="padding-left: 6px;">
', $txt[118], ': ', $context['subject'], ' (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
</td>
</tr>
</table>';
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
echo '
<form action="', $scripturl, '?action=quickmod2;topic=', $context['current_topic'], '.', $context['start'], '" method="post" name="quickModForm" style="margin: 0;">';
echo '
<div class="tborder">
<table cellpadding="4" cellspacing="1" width="100%" bgcolor="#FFFFFF">
<tr>
<td valign="bottom" align="left" width="15%" class="windowbg" colspan="3" style="padding-left: 6px;">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" alt="" align="middle" />
', $txt[118], ': ', $context['subject'], ' (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
</td>
</tr>
';
$thisAvatar = '';
$lastAvatar = '';
$avatarHere = true;
$count = 0;
//Ad Counter
$adcounter =0;
// Get all the messages...
while ($message = $context['get_message']())
{
$adcounter++;
if ($adpost = show_posts($adcounter))
{
echo '<div class="post">', $adpost['type'] == 0 ? $adpost['content'] : eval($adpost['content']) , '</div>';
}
// Show information about the poster of this message.
$posterData = '<table width="100%" cellpadding="0" cellspacing="0">';
$posterData .= '<tr><td><b>' . $message['member']['link'] . '</b></td></tr>';
// Show the member's custom title, if they have one.
if (isset($message['member']['title']) && $message['member']['title'] != '')
$posterData .= '<tr><td class="smalltext">' . $message['member']['title'] . '</td></tr>';
// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
$posterData .= '<tr><td class="smalltext">' . $message['member']['group'] . '</td></tr>';
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
if ($message['member']['post_group'] != '') {
$posterData .= '<tr><td class="smalltext">' . $message['member']['post_group'] . '</td></tr>';
$posterData .= '<tr><td>' . $message['member']['group_stars'] . '</td></tr>';
}
// Is karma display enabled? Total or +/-?
if ($modSettings['karmaMode'] == '1')
$posterData .= '<tr><td class="smalltext">' . $modSettings['karmaLabel'] . ' ' . ($message['member']['karma']['good'] - $message['member']['karma']['bad']) . '</td></tr>';
elseif ($modSettings['karmaMode'] == '2')
$posterData .= '<tr><td class="smalltext">' . $modSettings['karmaLabel'] . ' +' . $message['member']['karma']['good'] . '/-' . $message['member']['karma']['bad'] . '</td></tr>';
// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
$posterData .= '<tr><td class="smalltext"><a href="' . $scripturl . '?action=modifykarma;sa=applaud;uid=' . $message['member']['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';m=' . $message['id'] . '">' . $modSettings['karmaApplaudLabel'] . '</a> <a href="' . $scripturl . '?action=modifykarma;sa=smite;uid=' . $message['member']['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';m=' . $message['id'] . '">' . $modSettings['karmaSmiteLabel'] . '</a></td></tr>';
// Show online and offline buttons?
if (!empty($modSettings['onlineEnable']) && !$message['member']['is_guest']) {
$posterData .= '<tr><td>';
if ($context['can_send_pm']) $posterData .= '<a href="' . $message['member']['online']['href'] . '" title="' . $message['member']['online']['label'] . '">';
if ($settings['use_image_buttons']) $posterData .= '<img src="' . $message['member']['online']['image_href'] . '" alt="' . $message['member']['online']['text'] . '" border="0" align="middle" />';
else $posterData .= $message['member']['online']['text'];
if ($context['can_send_pm']) $posterData .= '</a>';
if ($settings['use_image_buttons']) $posterData .= '<span class="smalltext"> ' . $message['member']['online']['text'] . '</span>';
$posterData .= '</td></tr>';
}
// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
$posterData .= '<tr><td>' . $txt[231] . ': ' . $message['member']['gender']['image'] . '</td></tr>';
// Show how many posts they have made.
$posterData .= '<tr><td>' . $txt[26] . ': ' . $message['member']['posts'] . '</td></tr>';
}
// Otherwise, show the guest's email.
else
$posterData .= '<tr><td><br /><br /><a href="mailto:' . $message['member']['email'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]) . '</a></td></tr>';
$posterData .= '</table>';
$lastAvatar = $thisAvatar;
$thisAvatar = (!empty($message['member']['avatar']['image'])) ? $message['member']['avatar']['image'] : '<img src="' . $settings['images_url'] . '/noavatar.gif" alt="?" width="65" height="65" />';
if (empty($settings['left_avatar_only'])) {
if ($count>0 && $avatarHere) {
echo '<tr><td width="100" valign="top" align="right">', $lastAvatar, '</td><td>';
} else if ($count > 0) {
echo '<tr><td width="100" valign="bottom">', $posterData, '</td><td>';
} else {
echo '<tr><td width="100"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td><td>';
}
} else {
echo '<tr><td valign="bottom" align="right">', $posterData, '<br />', $thisAvatar, '</td><td>';
}
echo '<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr><td class="chattopleft"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="32" height="9" /></td><td class="chattop" width="100%"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" height="9" /></td><td class="chattopright"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="32" height="9" /></td></tr><tr><td class="chatleft"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="32" height="1" /></td><td class="chatinside" width="100%">';
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>';
// Time of post
echo '<td class="smalltext" valign="bottom" width="1000">« ', $message['time'], ' »</td><td align="right" valign="bottom" height="20" nowrap="nowrap" style="font-size: smaller;">';
// Can they reply? Have they turned on quick reply?
if ($context['can_reply'] && !empty($options['display_quick_reply']))
echo '<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '" onclick="if (!currentSwap) doQuote(', $message['id'], '); else window.location.href = this.href; return false;">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>';
// So... quick reply is off, but they *can* reply?
elseif ($context['can_reply'])
echo '<a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/quote.gif" alt="' . $txt[145] . '" border="0" />' : $txt[145]), '</a>';
// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '<a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/modify.gif" alt="' . $txt[66] . '" border="0" />' : $txt[17]), '</a>';
// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '<a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
// What about splitting it off the rest of the topic?
if ($context['can_split'])
echo '<a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/split.gif" alt="' . $txt['smf251'] . '" border="0" />' : $txt['smf251']), '</a>';
// Show a checkbox for quick moderation?
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $message['can_remove'])
echo '<input type="checkbox" name="msgs[]" value="', $message['id'], '" class="check" />';
// Show the post itself, finally!
echo '</td></tr><tr><td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td></tr>';
echo '<tr><td colspan="2">', $message['body'], '</td></tr>';
// Assuming there are attachments...
if (!empty($message['attachment']))
{
echo '
<tr><td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td></tr>
<tr><td colspan="2">
<div style="overflow: auto; width: 100%;">';
foreach ($message['attachment'] as $attachment)
{
if (isset($attachment['image']))
echo $attachment['image'], '<br />';
echo '<a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" /> ' . $attachment['name'] . '</a> (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['width'] . 'x' . $attachment['height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';
}
echo '</div></td></tr>';
}
// Show the member's signature?
if (!empty($settings['show_signature']) && empty($options['show_no_signatures']) && !empty($message['member']['signature']))
echo '
<tr><td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td></tr>
<tr><td colspan="2">
<div style="overflow: auto; width: 100%;">', $message['member']['signature'], '</div></td></tr>';
echo '<tr><td align="left" valign="bottom" class="smalltext" colspan="2">' . ($settings['show_modify'] && !empty($message['modified']['name']) ? '<br />« <i>' . $txt[211] . ': ' . $message['modified']['time'] . ' ' . $txt[525] . ' ' . $message['modified']['name'] . '</i> »' : '') . '</td></tr>';
echo '<tr><td align="right" valign="bottom" class="smalltext" colspan="2">', ($context['can_report_moderator'] ? '<a href="' . $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $message['counter'] . ';msg=' . $message['id'] . '">' . $txt['rtm1'] . '</a> ' : ''), '', ($context['user']['is_admin'] && !empty($message['member']['ip']) ? '<a href="' . $scripturl . '?action=trackip;searchip=' . $message['member']['ip'] . '"><img src="' . $settings['images_url'] . '/ip.gif" alt="" border="0" /> ' . $message['member']['ip'] . '</a>' : '<img src="' . $settings['images_url'] . '/ip.gif" alt="" border="0" /> ' . $txt[511]), '</td></tr>';
echo '</table>';
if (empty($settings['left_avatar_only'])) {
if ($avatarHere) {
$avatarHere = false;
echo '</td><td class="chatright"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="1" /></td></tr><tr><td class="chatbottomleft"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td><td class="chatbottom" width="100%"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" height="23" /></td><td class="chatspeakright"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td></tr></table>';
echo '</td><td width="100" valign="bottom">', $posterData, '</td></tr>';
} else {
$avatarHere = true;
echo '</td><td class="chatright"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="1" /></td></tr><tr><td class="chatspeakleft"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td><td class="chatbottom" width="100%"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" height="23" /></td><td class="chatbottomright"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td></tr></table>';
echo '</td><td width="100" valign="top">', $lastAvatar, '</td></tr>';
}
} else {
echo '</td><td class="chatright"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="1" /></td></tr><tr><td class="chatspeakleft"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td><td class="chatbottom" width="100%"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" height="23" /></td><td class="chatbottomright"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="27" height="23" /></td></tr></table>';
echo '</td></tr>';
echo '<tr><td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td></tr>';
}
$count++;
}
echo '<tr>';
if (empty($settings['left_avatar_only'])) {
if ($avatarHere) echo '<td valign="top" align="right">', $thisAvatar, '<td width="100%"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td><td><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td></td>';
else echo '<td><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td><td width="100%"><img src="', $settings['images_url'], '/layout/spacer.gif" alt="" width="80" height="1" /></td><td valign="top">', $thisAvatar, '</td>';
}
echo '</tr>
<tr><td style="padding: 0 0 1px 0;"></td></tr>
</table>
</div>
<a name="lastPost"></a>
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-top: 1ex;">
<tr>
<td align="left" class="catbg" width="100%" height="30">
<table cellpadding="3" cellspacing="0" width="100%">
<tr>
<td>
<a name="bot"></a><b>', $txt[139], ':</b> ', $context['page_index'], ($modSettings['topbottomEnable'] ? $context['menu_separator'] . '<a href="#top">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/go_up.gif" alt="' . $txt['topbottom4'] . '" border="0" align="top" />' : $txt['topbottom4']) . '</a>' : ''), '
</td>
<td align="right" style="font-size: smaller;">';
$buttonArray = array();
if ($context['can_reply'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';
if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' . $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/notify.gif" alt="' . $txt[131] . '" border="0" />' : $txt[131]) . '</a>';
// Another special case, similar to above but reversed. Show "add poll" unless they can't - then show unread here too.
if ($context['can_add_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;poll;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/addpoll.gif" alt="' . $txt['add_poll'] . '" border="0" />' : $txt['add_poll']) . '</a>';
elseif ($context['user']['is_logged'] && $settings['show_mark_read'])
$buttonArray[] = '<a href="' . $scripturl . '?action=markasread;sa=topic;topic=' . $context['current_topic'] . '.' . $context['start'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/markunread.gif" alt="' . $txt['mark_unread'] . '" border="0" />' : $txt['mark_unread']) . '</a>';
if ($context['can_send_topic'])
$buttonArray[] = '<a href="' . $scripturl . '?action=sendtopic;topic=' . $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/sendtopic.gif" alt="' . $txt[707] . '" border="0" />' : $txt[707]) . '</a>';
$buttonArray[] = '<a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0" target="_blank">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/print.gif" alt="' . $txt[465] . '" border="0" />' : $txt[465]) . '</a>';
echo implode($context['menu_separator'], $buttonArray);
echo '
</td>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript1.2" type="text/javascript"><!--';
if (!empty($options['display_quick_reply']))
echo '
var currentSwap = ', $options['display_quick_reply'] == 2 ? 'false' : 'true', ';
function swapOptions()
{
document.getElementById("quickReplyExpand").src = smf_images_url + "/" + (currentSwap ? "collapse.gif" : "expand.gif");
document.getElementById("quickReplyOptions").style.display = currentSwap ? "" : "none";
currentSwap = !currentSwap;
}
setTimeout("fetchSession();", 600000);
function fetchSession()
{
document.getElementById("fetchSessionTemp").src = "', $scripturl, '?action=jsoption;sesc=', $context['session_id'], ';" + (new Date().getTime());
setTimeout("fetchSession();", 600000);
}';
else
echo '
var currentSwap = true';
echo '
function doQuote(messageid)
{
if (currentSwap)
window.location.href = "', $scripturl, '?action=post;quote=" + messageid + ";topic=', $context['current_topic'], '.', $context['start'], ';sesc=', $context['session_id'], '";
else
{
window.open("', $scripturl, '?action=quotefast;quote=" + messageid + ";sesc=', $context['session_id'], '", "quote", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,top=40,left=40,width=240,height=90,resizable=no;");
if (navigator.appName == "Microsoft Internet Explorer")
window.location.hash = "quickreply";
else
window.location.hash = "#quickreply";
}
}
// --></script>
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>';
if ($settings['linktree_inline'])
echo '
<td valign="top" align="left">', theme_linktree(), '</td> ';
echo '
<td valign="top" align="right" class="smalltext"> <span class="nav"> ', $context['previous_next'], '</span></td>
</tr>
</table>
<br /><table width="100%" cellspacing="1" cellpadding="4" class="tborder"><tr><td class="catbg" >', theme_show_mod_buttons(), '</td></tr></table>';
if (!empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $context['can_remove_post'])
echo '
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
echo '
<table border="0" width="100%"><tr><td align="right">
<form action="', $scripturl, '" method="get" name="jumptoForm">
<span class="smalltext">' . $txt[160] . ':</span>
<select name="jumpto" onchange="if (this.options[this.selectedIndex].value) window.location.href=\'', $scripturl, '\' + this.options[this.selectedIndex].value;">
<option value="">' . $txt[251] . ':</option>';
foreach ($context['jump_to'] as $category)
{
echo '
<option value="" disabled="disabled">-----------------------------</option>
<option value="#', $category['id'], '">', $category['name'], '</option>
<option value="" disabled="disabled">-----------------------------</option>';
foreach ($category['boards'] as $board)
echo '
<option value="?board=', $board['id'], '.0"', $board['is_current'] ? ' selected="selected"' : '', '> ' . str_repeat('==', $board['child_level']) . '=> ' . $board['name'] . '</option>';
}
echo '
</select>
<input type="button" value="', $txt[161], '" onclick="if (document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value) window.location.href = \'', $scripturl, '\' + document.jumptoForm.jumpto.options[document.jumptoForm.jumpto.selectedIndex].value;" />
</form>
</td></tr></table>
<br />';
if ($context['can_reply'] && !empty($options['display_quick_reply']))
{
if ($context['show_spellchecking'])
echo '
<script language="JavaScript1.2" type="text/javascript" src="' . $settings['default_theme_url'] . '/spellcheck.js"></script>';
echo '
<a name="quickreply"></a>
<table cellspacing="1" cellpadding="4" width="100%" class="tborder">
<tr>
<td colspan="2" class="catbg"><a href="javascript:swapOptions();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.gif" alt="+" border="0" id="quickReplyExpand" /></a> <a href="javascript:swapOptions();">', $txt['quick_reply_1'], '</a></td>
</tr>
<tr id="quickReplyOptions"', $options['display_quick_reply'] == 2 ? '' : ' style="display: none"', '>
<td class="windowbg" width="25%" valign="top">', $txt['quick_reply_2'], $context['is_locked'] ? '<br /><br /><b>' . $txt['quick_reply_warning'] . '</b>' : '', '</td>
<td class="windowbg" width="75%" align="center">
<form action="', $scripturl, '?action=post2" method="post" name="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />
<input type="hidden" name="subject" value="' . $txt['response_prefix'] . $context['subject'] . '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="notify" value="', $context['is_marked_notify'] || empty($options['auto_notify']) ? '0' : '1', '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $context['num_replies'], '" />
<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />
<input type="submit" name="post" value="' . $txt[105] . '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" />
<input type="submit" name="preview" value="' . $txt[507] . '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="4" />';
if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" />';
echo '
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
</form>
</td>
</tr>
</table>';
if ($context['show_spellchecking'])
echo '
<form name="spell_form" id="spell_form" method="post" target="spellWindow" action="', $scripturl, '?action=spellcheck"><input type="hidden" name="spell_formname" value="" /><input type="hidden" name="spell_fieldname" value="" /><input type="hidden" name="spellstring" value="" /></form>';
echo '
</div>';
}
echo '<img src="', $settings['images_url'], '/blank.gif" alt="" id="fetchSessionTemp" />';
}
function theme_show_mod_buttons()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
$moderationButtons = array();
if ($context['can_move'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=movetopic;topic=' . $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_move.gif" alt="' . $txt[132] . '" border="0" />' : $txt[132]) . '</a>';
if ($context['can_delete'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt[162] . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_rem.gif" alt="' . $txt[63] . '" border="0" />' : $txt[63]) . '</a>';
if ($context['can_lock'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=lock;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_lock.gif" alt="' . (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280']) . '" border="0" />' : (empty($context['is_locked']) ? $txt['smf279'] : $txt['smf280'])) . '</a>';
if ($context['can_sticky'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_sticky.gif" alt="' . (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278']) . '" border="0" />' : (empty($context['is_sticky']) ? $txt['smf277'] : $txt['smf278'])) . '</a>';
if ($context['can_merge'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/merge.gif" alt="' . $txt['smf252'] . '" border="0" />' : $txt['smf252']) . '</a>';
if ($context['can_remove_poll'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=removepoll;topic=' . $context['current_topic'] . '.' . $context['start'] . '" onclick="return confirm(\'' . $txt['poll_remove_warn'] . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin_remove_poll.gif" alt="' . $txt['poll_remove'] . '" border="0" />' : $txt['poll_remove']) . '</a>';
if ($context['calendar_post'])
$moderationButtons[] = '<a href="' . $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0;sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/linktocal.gif" alt="' . $txt['calendar37'] . '" border="0" />' : $txt['calendar37']) . '</a>';
if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
$moderationButtons[] = $settings['use_image_buttons'] ? '<input type="image" name="submit" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete_selected.gif" alt="' . $txt['quickmod_delete_selected'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" />' : '<a href="javascript:document.quickModForm.submit();" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');">' . $txt['quickmod_delete_selected'] . '</a>';
return implode($context['menu_separator'], $moderationButtons);
}
?>
I'm no use to you on themes...they're the very first thing I dump on any forum...to my mind they're endless trouble and extra work.
Good luck...you may need it.
good to my they do not funcioan to me in smf 1.1.2 the tapeworm in other versions worked well but in the version that I use not eh been able to make work it
Quote from: TrueSatan on March 04, 2007, 11:01:06 AM
It took me far too long to repackage this mod...the previous version seemed to have a lot of failsafes around the display.template.php file that were causing members to have to do manual installs because they caused the package installer to fail...that should be OK now. The version for SMF 1.1.1 and 1.1.2 I've put together has several small changes to accommodate small changes in the SMF core files that would also cause the package installer to fail...it seems to be good to go and I've tested it on a clean install of SMF 1.1.2. I added a modified install file for 1.1.1 and 1.1.2 to the package.
Version for SMF 1.1.1 and 1.1.2 below
i got a Display.php test failure , any ideas ? using smf 1.1.2/tp 0.971 .
thnx !
I'm not a TP user so getting it to work in that is down to you unless somebody else can help but I've fixed the Display.template.php issue and packaged up the fix for you.
The original mod had some syntax errors in the installer...they were the problem.
the Display.template.php didn't cause me any problem (passed the installation test along with Modifications.english.php and ModSettings.php) , it was the Display.php that returned the error . i tried to install frequency_bar v1.1a.zip but got the exact same error ! thnx for the try though , i appreciate it ! any ideas what to do ?
Do the same as you would with any such failure in the automatic installer...note the file that fails...ftp the failing file from your server to your computer...do a manual install into that file based on the details in the package...as per usual backup files and database...run the automatic installer with the failed file note and all...ignore the failure...ftp back to the server your hand modified replacement for the file on which the automatic installer failed. Nothing different from normal...
I installed manually following the XML files. Worked flawlessly. The package itself gave me errors.
You can see it in action at www.shoyoroll.com/forum
just to let you know also TRUESATAN, in the package you have it as add after this:
// Show avatars, images, etc.?
It should be replace. It creates double avatar insert in the display template and you have to remove one of these.
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';
Thanks Trenchteam...you're quite right and I've packaged up a new version so as to fix that error...wacking myself in the head for making it. Rather than doing a replace though I'll keep it as an add and just remove the duplicated lines from the addition block.
This is a good mod to have available for SMF so I'll keep packaging up versions of it as needed (unless somebody else beats me to it) and if anyone wants to play with the code I hope they'll do the same.
Thanks again for spotting my silly mistake and the friendly way you responded to it.
no problem man. Im a friendly guy. haha. I love this mod and glad your keeping it up to date. ;D
sorry for leaving all of you hanging.
i decided not to upgrade to the new SMF version for my sports forum,
so i never remade the mod to fit it.
i have way too many mods and custom mods there to consider upgrading.
i still might download a test version to get the new updated post frequency bars,
seen here above the avatar: http://www.stucknut.com/sports/index.php/topic,15552.0.html (http://www.stucknut.com/sports/index.php/topic,15552.0.html)
thanks
Very nice mod.
I wished it worked with 1.1.2, but it's a really great idea.
~Kudos!
~Kerrang!
Quote from: kerrang! on April 17, 2007, 04:03:01 PM
Very nice mod.
I wished it worked with 1.1.2, but it's a really great idea.
~Kudos!
~Kerrang!
It works on 1.1.2, install the pakage 1.1b which is posted above and manually modify your CUSTOM theme
Thanks teamvtec...I was just about to post much the same as you...perhaps those who add posts could point to that download from time to time so it doesn't get lost in all the other postings.
Quote from: TrueSatan on April 17, 2007, 04:12:49 PM
Thanks teamvtec...I was just about to post much the same as you...perhaps those who add posts could point to that download from time to time so it doesn't get lost in all the other postings.
LoL np, and it is a good idea to add the download to posts from time to time ;)
sorry, the display error still exist but good work guys!
Quote from: bigmohi on April 17, 2007, 11:22:20 PM
sorry, the display error still exist but good work guys!
Please could you be a bit less cryptic and tell us exactly what error you have/are reporting? I can't promise you a fix but if you'll let us all know what the problem is we'll have a try at helping you.
Quote from: steve in houston on April 06, 2007, 06:14:20 PM
i still might download a test version to get the new updated post frequency bars,
seen here above the avatar: http://www.stucknut.com/sports/index.php/topic,15552.0.html (http://www.stucknut.com/sports/index.php/topic,15552.0.html)
I like it! Where we can download?
Can someone send the mod with 1.1.2. compatibilities?
Wonderful mod.
I download the v1.1b.zip and I've found that it works perfectly fine, however when I scroll/hover over the bar it says I have "52 Posts - 52 Posts Per Day". I haven't altered anything as I'm using smf's default skin.
Would anyone know how to solve this?
~Kerrang!
P.s I took the moment to browse my display_template.. however I pathetic at coding, it's not a strong point for me..
// Frequency Bar - Steve Lyons - Stucknut.com
if (!empty($modSettings['frequency_bar_enable'])){
$days_registered = (int) ((time() - $message['dateRegistered']) / (3600 * 24));
if (empty($message['dateRegistered']) || $days_registered < 1){
$days_registered = 1; // Skip out on the Divide by Zero error
}
$message['member']['posts'] = str_replace(",","",$message['member']['posts']);
$posts_per_day = comma_format($message['member']['posts'] / $days_registered, 3);
// Calculate bar width
if(empty($modSettings['frequency_bar_max'])){ $modSettings['frequency_bar_max'] = 50; }
$rate = $posts_per_day * (100/$modSettings['frequency_bar_max']);
if($rate>100){ $rate = 100; }
echo $txt['frequency_bar_text'].'
<table border="0" cellpadding="0" cellspacing="0">
<tr onmouseover="this.title=\'', $message['member']['posts'], ' posts (', $posts_per_day, ' posts per day)\'">
<td><img border="0" src="', $settings['images_url'] ,'/freq_bar_l.gif" width="4" height="17" alt="" /></td>
<td width="100" style="background:url(\'', $settings['images_url'] ,'/freq_bar_bk.gif\');background-repeat:repeat-x;"><img border="0" src="', $settings['images_url'] ,'/freq_bar_', $modSettings['frequency_bar_color'] ,'.gif" width="', $rate ,'" height="17" alt="" /></td>
<td><img border="0" src="', $settings['images_url'] ,'/freq_bar_r.gif" width="4" height="17" alt="" /></td>
</tr>
</table>
<br />';
}
The modification code you posted looks OK...not sure why you posted it though? It seems to be the same as the mod with no alterations.
You might have a conflict with another mod...that's a possibility. Probably the best way forward would be for you to set up an empty test forum with no mods in it and a new database then install the mod into that...if it works there then you could add your mods one by one and see if it conflicts with one of them by testing after each addition.
Silly question...I presume it isn't installed on a new test forum with 52 test posts that you have made today...I had to ask.
Quote from: TrueSatan on May 22, 2007, 05:52:10 PM
The modification code you posted looks OK...not sure why you posted it though? It seems to be the same as the mod with no alterations.
You might have a conflict with another mod...that's a possibility. Probably the best way forward would be for you to set up an empty test forum with no mods in it and a new database then install the mod into that...if it works there then you could add your mods one by one and see if it conflicts with one of them by testing after each addition.
Silly question...I presume it isn't installed on a new test forum with 52 test posts that you have made today...I had to ask.
Thanks for the advice TrueSatan;
I'll try your suggestion, as I haven't tested it. Would it be possible that the error lies somewhere else within the other files the mod edits are? (just a question)
I don't really have many mods installed...
~Kerrang!
There are mods with which this one will have problems so a mod conflict is a distinct possibility. Manual installation with a bit of juggling to get things to work can get around most such problems but not quite all of them.
If you didn't get errors at the installation stage then the chances are that that went OK though checking each file to see that the edits are in place would be a good idea.
Where is that version for 1.1.2 ? i can't find it anywhere
Quote from: Mannie_Fine on May 24, 2007, 06:52:55 AM
Where is that version for 1.1.2 ? i can't find it anywhere
Try reading the whole of this topic...as you should with any topic as you will find that most questions tend to have already been asked and answered.
Quote from: Mannie_Fine on May 24, 2007, 06:52:55 AM
Where is that version for 1.1.2 ? i can't find it anywhere
Just search this topic for "v1.1b.zip" you'll find it quicker if you haven't already.
~Kerrang!
In the theme I use (corp lt01)the bar appears like this:
(http://img478.imageshack.us/img478/6931/barraoo7.jpg)
Why the bar is incomplete? In default theme it works perfectly
I have test with other mod with bar :Bar of Experience and happen the same thing.
Sorry for my english and thanks
EDIT: Problem solved updating to corplt02
As this mod is working properly for you in the default theme and the theme you are trying to use seems to be the problem perhaps you should contact the author the theme or consider using a theme in which the mods you wish to use do work.
I'm no theme expert (hate them to be honest) and so I'd rather not get involved in trying to fix a theme that, from what you say, has problems with a number of mods.
Some of your guys may be interested in a the mini versions which I've justposted as a beta
http://www.simplemachines.org/community/index.php?topic=174498.0
Thanks! It does look to be an interesting development and may well suit people better than this version. I'll keep this mod supported untill SMF v2.0 (perhaps longer if there is a call for it and if the code will migrate to that version without too much bother) just in case members still want it.
i cant get it to work using smf 1.1.2
Quote from: Tron420 on June 23, 2007, 08:20:36 AM
i cant get it to work using smf 1.1.2
The version I posted to this topic works with SMF 1.1.2...like most mods it only installs into the SMF default theme.
You may have conflicts with other mods you have installed or need to change from english utf8 to english in your language settings.
Please try it in a fresh test forum on your hosting and with no other mods or custom themes installed...if it works in that you can then add mods etc and find where you have a conflict between systems.
it installed with no errors but isnt working .even default theme isnt showing right..
You appear to have already added a lot of mods to your forum and also been using a lot of changes from the coding discussion pages (including beta code.) Your postings have, for some time, suggested that your forum may have underlying problems from all the mass of additions and changes you have made.
I already gave you advice regarding trying the mod on a test forum...that advice still stands. The mod does work properly but not all mods will live happily together and the other changes you have made to your forum further complicate matters. Proving it in a test forum (without all your other changes and additions) then slowly adding changes is your best way forward.
General advice regarding mods is "less is more"...the more mods and changes you add the more likely you are to open security issues and have other problems....the more likely it is that mods will conflict and so on.
Update for SMF 1.1.3
Fatal error: Call to undefined function theme_show_normal_buttons() in \www\forum\Sources\Load.php(1740) : eval()'d code on line 198.. i got this any help? thanks guys..
Quote from: karlbenson on May 31, 2007, 08:26:05 PM
Some of your guys may be interested in a the mini versions which I've justposted as a beta
http://www.simplemachines.org/community/index.php?topic=174498.0
This mini frequency bar is great. works flawlessly in 1.1.3 Just needed to update the XML.
Quote from: TrueSatan on June 25, 2007, 10:54:51 AM
Update for SMF 1.1.3
got an error in Sources/Display.php , any ideas why ?
thnx !
Quote from: MinasC on July 19, 2007, 04:57:43 PM
Quote from: TrueSatan on June 25, 2007, 10:54:51 AM
Update for SMF 1.1.3
got an error in Sources/Display.php , any ideas why ?
thnx !
That would rather depend on the error. If it was a fail when installing all it means is that another mod has already edited the file and you thus need to do a manual installation of this mod.
Quote from: TrueSatan on July 19, 2007, 09:09:11 PM
Quote from: MinasC on July 19, 2007, 04:57:43 PM
Quote from: TrueSatan on June 25, 2007, 10:54:51 AM
Update for SMF 1.1.3
got an error in Sources/Display.php , any ideas why ?
thnx !
That would rather depend on the error. If it was a fail when installing all it means is that another mod has already edited the file and you thus need to do a manual installation of this mod.
you were right , it was the mod showing the edit reason that had altered the display.php ! i installed it manually and worked perfect , thnx a lot !
My pleasure.
i just noticed that it shows some crazy things ! for me it shows 0,004 posts per day while i have the most posts of all , and at the same time it shows 0,840 posts per day for member with 1/4 the posts i have and the same time of being registered in the forum ! it also doesn't show any bars except from the first one whether it is me we are talking about or other members !
It looks likely that the mod is not at fault as it was working properly for you and the mod itself hasn't changed...I would suspect the post count records in your database. You might try using the Member Posts Recount mod and running all the other database maintenance options in the ACP.
If the problem occurred post an upgrade to a newer SMF version you should also manually check that all the edits the mod seeks to make are still in place and haven't been overwritten by the upgrade...in fact check that in any case as another mod might have changed them.
i will do the 2nd part , i am not touching my database again (once i did and i messed it up) !
thnx a lot !
You should be fine if you use the controls in the forum...in ACP>Maintenance>Forum Maintenance...they are all very sanitised to remove any real possibility of their causing problems...it's not like using phpmyadmin to do it. Backup first just to be sure.
ok i did it but nothing changed !
I'd say that you have a database error that is providing incorrect information to the mod and thus the mod itself is providing incorrect information...and hence my earlier course of action for you to undertake. Unfortunately without getting ones hands dirty in the database it would be a difficult one to fix...sorry, but unless you want to delve into database editing you'll have to live without the mod and you did say you weren't keen on database work already.
i am willing to do it , but i would need spesific directions (go there , click that , change this to that , etc) ! if you have the time to do it ok (i couldn't possibly ask for something like that) , but on my own i wouldn't know where to begin !
thnx a lot !
The first thing you had best do is to make sure you have backup copies of both your database and your files. Go to phpmyadmin...should be available in your hosting...in that select your SMF database check (as in select) all the tables and then check (as in check command) the lot, analyze the lot, repair the lot and optimise the lot.
This mod doesn't add any new items to the database...it makes different use of what was already there...so there's nothing it will have done to change a working database into a non-working one.
In your ACP try changing the trigger level for the mod...the Frequency Bar Threshold shown in Features and Options...unlikely but it could be a missetting there.
If you've used the Member Post Recount mod to do its job then those are all the reasonably simple tasks that might resolve this issue...other than those it would be a fairly/very extensive task to sort this one out.
i already tried changing the trigger level for the mod and didn't work ! i will check my database as you said and get back to you .
thnx !
i still plan to package up the new and improved version.
im going to download 1.1.4 soon.
to view the new version on a live site, check it out here:
http://www.stucknut.com/sports/index.php/topic,20747.0.html
I like the new version! :)
I have the same problem, with the strange postcounts. Can it be linked to regional settings? it seems the problem comes from dateRegistered which seems to output a 10 digit unix timestamp.
But, in some countries, you write the date as day/month/year, instead of month/day/year. I'm far from an expert in php, but can this fact be the trigger of this problem?
Thanks...I think that may well be possible but will need to investigate further when I have time.
should be easy to check;p
$days_registered = (int) ((time() - $message['dateRegistered']) / (3600 * 24));
let's run this line "manualy"
I grab my timestamp from my usr table:
# cat members.txt |grep nwalker|cut -d ',' -f3
1144029046
so it leads me to 04 / 02 / 06 @ 9:50pm
and now we are 1199382404 (01/03/2008 @ 12:46pm)
this lead us to 55353358 seconds, so 640 days, with month/day/year format.
I wrote 2349 posts, so 3.67 posts/day
Now I switch to the french way:
04/02/06 @ 9:50pm becomes 02/04 /06 @ 9:50pm =>1139107800
01/03/08 @ 12:46pm becomes 03/01/08 @ 12:46pm =>1204393560
it leads me to 65285760 seconds, so 755 days, 3.11 posts per day, and the mod gives me 0.004.
so no, it's not the problem:s
lets continue the maths so...
$posts_per_day = comma_format($message['member']['posts'] / $days_registered, 3);
will give 2349/640=3.67
maths still good here.
next one, so:
$rate = $posts_per_day * (100/$modSettings['frequency_bar_max']); with frequency_bar_max=4
3.67*(100/4)=91.75
maths are still good, but my forum gives me 0.004.
strange :-\
SOLVED!!
In some countries, we write numbers like that:
1.234,00
and you, you write this number like that: 1,234.00
just change this parameter in your SMF conf, and the mod will work fine;p
edit: I guess it's something which can be dealt by the comma_format function, but I don't know how;p (for a non PHP writer this doc (http://support.simplemachines.org/function_db/index.php?action=view_function;function=282) is a bit short)
Hi! Is possible to run Post Frequency Bar on SMF 1.1.4?? Someone can put the url??
Thanks!
Uprated as per your request...haven't dealt with nwalker's excellent bug spotting yet though.
Try to add this between lines 50 and 51 of install_1.1.x.xml:
$days_registered = str_replace(",","-", $days_registered ); //temp swap comma for random char
$days_registered = str_replace(".",",", $days_registered ); //swap dot to comma
$days_registered = str_replace("-",".", $days_registered ); //and comma to dot
I can't seems to find a builtin php function to do that, but it should be fine with this code
Quote from: nwalker on January 03, 2008, 01:20:42 PM
SOLVED!!
In some countries, we write numbers like that:
1.234,00
and you, you write this number like that: 1,234.00
just change this parameter in your SMF conf, and the mod will work fine;p
that did it for me , thnx a lot !
Thanks to nwalker for the bug fix...new version now done with his bug fix in place (included in all version installs)...version compatibility extended to SMF 1.0.5-1.1.99
Thanks for updating TrueSatan! Great mod! And thanks to steve for the original mod
Always a pleasure...and likewise my thanks too to Steve and those who've helped keep the mod alive.
Hey Guys , I need some help with this mod
see this results
1. Execute Modification ./Sources/Display.php Test failed
2. Execute Modification ./Themes/default/Display.template.php Test successful
3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
4. Execute Modification ./Sources/ModSettings.php Test successful
can any one help me plz
I attach Display.php file
Best regards
Is there for version of 1.1.4? If so, please point me out to it. Thanks.
I am also interested in a version for 1.1.4
Quote from: TrueSatan on January 14, 2008, 03:25:34 PM
...version compatibility extended to SMF 1.0.5-1.1.99
This one is for 1.1.xx, so it should be working into 1.1.14 also.
However I've got the same issue as D.S.
1. Execute Modification ./Sources/Display.php Test failed
Hopefully someone can assist with this.
Thanks in advance
Is it possbile to make it work whit 1.1.4?
I believe it does work for 1.1.4 . check above at TrueSatan's post with attachment ^^^
I tried to use that, but it says that the test fails on display.php!
I attach the file...
Update portuguese and brazilian
<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Frequency Bar - Steve Lyons - Stucknut.com Update Candidosa2
$txt['frequency_bar_text'] = 'Poste com Freqüência';
$txt['frequency_bar_enable'] = 'Activar a barra de freqüência no poste ';
$txt['frequency_bar_enable_help'] = 'Mostrar uma barra de freqüência em cada posto sob o nome para mostrar como os membros activos que estão numa base diária.';
$txt['frequency_bar_max'] = 'Poste freqüência barra limiar';
$txt['frequency_bar_max_help'] = 'Definir limiar / max número de postos de trabalho por dia para o ratio. ie: Se os seus membros mais ativos postar cerca de 20 vezes por dia, o limite fixado para 20 e no bar será maxed para fora para que o membro.';
$txt['frequency_bar_color'] = 'Poste com freqüência na barra de cores';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Frequency Bar - Steve Lyons - Stucknut.com Update Candidosa2
$txt['frequency_bar_text'] = 'Poste com Freqüência';
$txt['frequency_bar_enable'] = 'Activar a barra de freqüência no poste ';
$txt['frequency_bar_enable_help'] = 'Mostrar uma barra de freqüência em cada posto sob o nome para mostrar como os membros activos que estão numa base diária.';
$txt['frequency_bar_max'] = 'Poste freqüência barra limiar';
$txt['frequency_bar_max_help'] = 'Definir limiar / max número de postos de trabalho por dia para o ratio. ie: Se os seus membros mais ativos postar cerca de 20 vezes por dia, o limite fixado para 20 e no bar será maxed para fora para que o membro.';
$txt['frequency_bar_color'] = 'Poste com freqüência na barra de cores';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Frequency Bar - Steve Lyons - Stucknut.com
$txt['frequency_bar_text'] = 'Poste com Freqüência';
$txt['frequency_bar_enable'] = 'Activar a barra de freqüência no poste';
$txt['frequency_bar_max'] = 'Poste freqüência barra limiar';
$txt['frequency_bar_color'] = 'Poste com freqüência na barra de cores';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.brazilian.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Frequency Bar - Steve Lyons - Stucknut.com
$txt['frequency_bar_text'] = 'Poste com Freqüência';
$txt['frequency_bar_enable'] = 'Activar a barra de freqüência no poste';
$txt['frequency_bar_max'] = 'Poste freqüência barra limiar';
$txt['frequency_bar_color'] = 'Poste com freqüência na barra de cores';
]]></add>
</operation>
</file>
On my forum, http://www.fiestahq.sparkonline.net/forum/index.php, the post frequency bar color doesn't show. The bar itself shows but not the color.....the post threshold is set to 2000 and all of the images for the bar have been uploaded to the theme's image directory. I use a custom theme. Any ideas?
Quotethe post threshold is set to 2000
Set it to 100, and see again.
thanks! it works!
ei guys...i intall this mod f version and appens this
anybody have the solution?
thnkx
is there some mod like this but version 1.1.5 pls !!!
i really need to put a mod like this , its pretty cool ... or maybe u can make another one for those who has version 1.1.5 SMF ... we will appreciate it man ...
thank u ! so much ... ill be waiting for some ideas or replies :'(
Anybody intrested in revamping this mod for the new versions?
Hello ,
Is this MOD available for version (SMF 2.0 RC1-1)
Plz help i need this mod..
I'm also looking for this mod for SMF 2.0.2
can any one tell me how to manually install or update the mode...please
Rather than ask if this outdated mod will be updated why not have a look at the Activity bar mod which is for 2.0.2 and does the same job?
will be possible to upgrade to 2.0.5?
thank you
Quote from: vms on August 23, 2013, 06:37:04 PM
will be possible to upgrade to 2.0.5?
thank you
That won't be easy.
QuoteCompatible With:
1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1 RC3