Post Frequency Bar

Started by steve in houston, October 26, 2006, 03:58:47 PM

Previous topic - Next topic

El Reclutador 2003

Can someone send the mod with 1.1.2. compatibilities?
http://www.dr3team.net    http://www.dr3team.com


kerrang!

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 />';
}
I'm my own worst enemy! :P

Css Help <--Having difficulty matching the look of the code function with the style of "quote".. =)

TrueSatan

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.

kerrang!

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!
I'm my own worst enemy! :P

Css Help <--Having difficulty matching the look of the code function with the style of "quote".. =)

TrueSatan

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.

Mannie_Fine

Where is that version for 1.1.2 ? i can't find it anywhere

TrueSatan

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.

kerrang!

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!
I'm my own worst enemy! :P

Css Help <--Having difficulty matching the look of the code function with the style of "quote".. =)

Vetinari

#128
In the theme I use (corp lt01)the bar appears like this:



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

TrueSatan

 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.

karlbenson

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

TrueSatan

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.

Tron420

i cant get it to work using smf 1.1.2

TrueSatan

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.

Tron420

#134
it installed with no errors but isnt working .even default theme isnt showing right..

TrueSatan

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.

TrueSatan


leomai

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..

trenchteam

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.

MinasC

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 !

Advertisement: