Simple Chart Help Button 0.1
By Akyhne

SMF 2.0.x
SMF 2.1 Alpha 1
Simple Chart 0.5 and up

This modification is experimental.

Simple Chart v0.5 or higher, should be installed, before installing this mod.
This mod should also be uninstalled, before removing Simple Chart.

This mod adds an extra help button/dropdown to the Simple Chart modification
The button/dropdown will be added to your SMF forum's editor.
The mod is experimental! It also adds some help text, unrelated to most of your forum users.


0.1 28th October 2012
o First beta

File Edits


Find: [Select]
\'white\': ', JavaScriptEscape($txt['white']), '
Add After: [Select]

// Simple Chart Help dropdown
echo ',
sType: \'select\',
sName: \'sel_chart\',
oOptions: {
\'\': ', JavaScriptEscape($txt['sc_select_chart']), ',
\' width=300 height=150 title="Horizontal Chart" max=10]Apples=5|Bananas=3|Lemons=7\': ', JavaScriptEscape($txt['sc_horizontal_chart']), ',
\' width=200 height=150 title="Vertical Chart" layout=v max=10]Apples=5|Bananas=3|Lemons=7\': ', JavaScriptEscape($txt['sc_vertical_chart']), ',
\' width=300 height=150 title="Horizontal Multi Level Chart" max=8]Apples=5;3|Bananas=3;2|Lemons=7;4\': ', JavaScriptEscape($txt['sc_horizontal_multilevel_chart']), ',
\' width=250 height=150 title="Vertical Multi Level Chart" layout=v max=8]Apples=5;3|Bananas=3;2|Lemons=7;4\': ', JavaScriptEscape($txt['sc_vertical_multilevel_chart']), ',
\' title="My Pie" layout=pie max=10]Apples=5|Bananas=3|Lemons=7\': ', JavaScriptEscape($txt['sc_horizontal_pie_chart']), ',
\' title="My Gauge" layout=gauge max=200]My IQ=185.2\': ', JavaScriptEscape($txt['sc_gauge']), ',
\' layout=stars max=5]x=4\': ', JavaScriptEscape($txt['sc_stars']), ',
\'\nwidth=200 {optional, min. is 100, max. is 1000}\nheight=200 {optional, min. is 80, max. is 1000. Only has effect on vertical charts}\ntitle="Title" {optional}\nalign=none|left|right|center {optional}\nlayout=v|h\nstyle=MyStyle {optional, used to style the chart. You will have to do this yourself in the simplechart.css stylesheet. There are some predefined layouts: For horizontal charts;RedBar|GreenBar|BlueBar. For vertical charts;RedColumn|GreenColumn|BlueColumn}\nmax=10 {optional, used to set a higher max than the largest value. Only used to improve the layout}\n]\na=1;5;3|b=3;2;6\n\' : ', JavaScriptEscape($txt['sc_chart_options']), ',
\'\ntitle="My Pie" {optional}\nlayout=pie\nmax=17 {optional, should be more than sum of the values.}\n]\nApples=5|Bananas=3|Lemons=7\n\': ', JavaScriptEscape($txt['sc_pie_options']), ',
\'\nwidth=200 {optional, defaults to 300}\ntitle="abc" {optional}\nlayout=gauge\nstyle=graygauge|speedometer|racer|half|radar|blueglass|temp|kungfu|time {optional, any of these styles or your own}\nmax=300 {optional, defaults to the chosen styles max}\n]\nx=75.4\n\': ', JavaScriptEscape($txt['sc_gauge_options']), ',
\'\nlayout=stars\nstyle=default|led|book {optional}\nmax=5 {optional, defaults to 10. Max. is 20}\n]\nx=4\n\' : ', JavaScriptEscape($txt['sc_star_options']), '


Find: [Select]
var sCurFontColor = '';
Add After: [Select]

var sCurChart = '';

Find: [Select]
this.opt.oBBCBox.setSelect('sel_color', sCurFontColor);
Add After: [Select]

this.opt.oBBCBox.setSelect('sel_chart', sCurChart);

Find: [Select]
this.smf_execCommand('forecolor', false, sValue);
Add After: [Select]

// Or charts even?
else if (oSelectProperties.sName == 'sel_chart')
// Are we in boring mode?
if (!this.bRichTextEnabled)
surroundText('[chart' + sValue, '[/chart]', this.oTextHandle);
oSelectProperties.oSelect.selectedIndex = 0;

File Operations

Move the included file "default/images/bbc/chart_help.gif" to "./Themes/default/images/bbc".