برگزیده های پرشین تولز

لیست پلاگینا !

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
سلام !
آقا من یه سوالی پیش اومده برام !
ام تی 3.2 یه قسمتی داره به نام سیستم آورویو که یه جاش همه پلاگینها لیست شدن و میشه دیزیبلشون کرد!
علاوه براین تو قسمت ستینگزش هم یه جا داره به نام پلاگین که اگه اونجا پلاگینی رو دیزیبل کنی فقط روی همون وبلاگ غیر فعال میشه !
گرفتین؟
خوب سوال اینجاس که چرا لیست همه پلاگینهااونتو نیست؟ بر چه مبنایی پلاگینا میان تو لیست تو قسمت ستینگز؟
مثلا من الان 20 تا پلاگین دارم که دو سه تاشون بیشتر تو اون لیست نیست !

تو سورسشون هم دنبال add plugin ها گشتم ! چیزی نیافتم :(
 

aaber_piade

Registered User
تاریخ عضویت
19 دسامبر 2002
نوشته‌ها
1,660
لایک‌ها
25
سن
40
محل سکونت
Tehran
من توي يه پلاگيني که اسمش يادم نيست و کارش هم يادم نيست، داشتم فايل مربوط به تغييرات و release note رو ميخوندم ديدم نوشته از ورژن چند مميز چندش به بعد خودش رو به MT 3 معرفي ميکنه يا چيزي شبيه به همين.

فکر ميکنم خود پلاگين بايد در کدنويسيش اين موضوع لحاظ شده باشه، ولي مطمئن نيستم به حرفم.
 

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
به نقل از aaber_piade :
من توي يه پلاگيني که اسمش يادم نيست و کارش هم يادم نيست، داشتم فايل مربوط به تغييرات و release note رو ميخوندم ديدم نوشته از ورژن چند مميز چندش به بعد خودش رو به MT 3 معرفي ميکنه يا چيزي شبيه به همين.

فکر ميکنم خود پلاگين بايد در کدنويسيش اين موضوع لحاظ شده باشه، ولي مطمئن نيستم به حرفم.
خوب میشه با یه کدی پلاگینو مثلا به صفحه لیست قالبها - یا هر صفحه دیگه ای - معرفی کرد .
تو اون صفحه ، پایین یه جا میاد به نام پلاگین اکشن !
فک کنم این اون بوده !
اما من به اینم خیلی ور رفتم !
نشد که نشد ! :(
 

ITX

Registered User
تاریخ عضویت
20 می 2005
نوشته‌ها
591
لایک‌ها
0
محل سکونت
CyberSpace
توی اون لیستی که میگی ... 3 تا پلگین در حالت استاندارد هستند که از اول روی ام تی 3.2 نصب شدن...وپلگین های هستند که با توجه به نیاز کاربر احتیاج به تغییر و از این چیزا دارن...ولی او پلگن های که توی لیست پلاگین ها هستند برای همه وبلاگها هست یکی اگر دوست نداشته باشه میتونه کدشو نذاره توی وبلاگش ولی اون 3 تای که از قسمت سیتسنگ میری سراغشون بسته به نوع نیاز مدیر وبلاگ استفاده میشن...اگر یادم باشه یکیش برای اسپم ها بود...یک پلاگینی هم که میلاد فارسی کرده بود اگر اشتباه نکنم همین طوری بود!
 

azizaa

مدیر بازنشسته
تاریخ عضویت
16 نوامبر 2004
نوشته‌ها
422
لایک‌ها
0
نمی دونم وارد بحث كد نویسی پلاگین شم یا همین طوری توضیح بدم. ببینید تو ام تی ۳.۲ به بعد ما دو نوع تنظیمات داریم System Level و Blog Level به این معنی كه می تونید بعضی تنظیمات رو كلا و در تمام وبلاگ ها تغییر بدید و یا اینكه بعضی اوقات یكی از تنظیمات رو فقط برای یك وبلاگ خاص تغییر بدید.
اما ... اما تمام این قابلیت ها باید در كدنویسی لحاظ شده باشه و شما blog_config و system_config رو هر دوشو تعریف كرده باشید. بقیه اش جزئیات دیگه ماله كد نویسه كه اگه دوست داشتید می تونید POD Document های ام تی رو بخونید با خودتون اگه Perl واردید یه نگاهی به كد یه پلاگین [من MT-Notifierرو پیشنهاد می كنم] بندازید.
اما ...اما قضیه Plugin Actions چیز دیگه ایه. تو ورژن های قدیمی [و فعلی] یه راه واسه اینكه پلاگین شما یه كار خاصی را انجام بده و در عین حال در User Interface هم حضور داشته باشه [ چقدر بد نوشتم!] استفاده از Plugin Action هاست[مثل كاری كه Workflow می كرد]. الانم استاندارد تربن راه همینه ولی با BIGPAPIهم می تونید هر جا كه دوست دارید خودتون رو به UI الصاق كنید.
 

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
ايول عزيز !
اما تمام این قابلیت ها باید در كدنویسی لحاظ شده باشه و شما blog_config و system_config رو هر دوشو تعریف كرده باشید.
اينو يکم بازش کن ! چه تغييراتي بايد تو سورس پلاگين ايجاد بشه؟ يا چجوري بايد تعريف بشه؟
فرض مثال من يه پلاگين دارم تو سيستم آور ويو مياد ولي تو ستينگز نمياد ! چيکارش کنم بياد؟
 

azizaa

مدیر بازنشسته
تاریخ عضویت
16 نوامبر 2004
نوشته‌ها
422
لایک‌ها
0
به نقل از Shahedr :
ايول عزيز !

اينو يکم بازش کن ! چه تغييراتي بايد تو سورس پلاگين ايجاد بشه؟ يا چجوري بايد تعريف بشه؟
فرض مثال من يه پلاگين دارم تو سيستم آور ويو مياد ولي تو ستينگز نمياد ! چيکارش کنم بياد؟

کد:
my $plugin = MT::Plugin::AzizPlugin->new ({
 name  => 'Aziz Sample Plugin',
 description => 'to show blog level and system level to shahed!',
 version  => $VERSION,
 author_name => 'Aziz',
 system_config_template => 'system_config.tmpl',   # in file bayad to shakheye tmpl ke to shakheye pluginet hast bashe! 
 blog_config_template => 'blog_config.tmpl',  # in file bayad to shakheye tmpl ke to shakheye pluginet hast bashe!
 settings => new MT::PluginSettings ([
   ['global_varibale', { Default => '1', Scope => 'system' }],
   ['blog_level_var', { Default => '0', Scope => 'blog' }],
   ]),
 });
  MT->add_plugin ($plugin);
 

azizaa

مدیر بازنشسته
تاریخ عضویت
16 نوامبر 2004
نوشته‌ها
422
لایک‌ها
0
if you are interested, just take a look on the plugin codes wriiten by other MT developers
MTNotifier and Nofollow are suitable for beginniers and media manager is perfect for pros!
 

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
به نقل از azizaa :
کد:
my $plugin = MT::Plugin::AzizPlugin->new ({
 name  => 'Aziz Sample Plugin',
 description => 'to show blog level and system level to shahed!',
 version  => $VERSION,
 author_name => 'Aziz',
 system_config_template => 'system_config.tmpl',   # in file bayad to shakheye tmpl ke to shakheye pluginet hast bashe! 
 blog_config_template => 'blog_config.tmpl',  # in file bayad to shakheye tmpl ke to shakheye pluginet hast bashe!
 settings => new MT::PluginSettings ([
   ['global_varibale', { Default => '1', Scope => 'system' }],
   ['blog_level_var', { Default => '0', Scope => 'blog' }],
   ]),
 });
  MT->add_plugin ($plugin);
آها !
برم ببينم ميشه يا نه !
 

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
عزيز ! من اينو گذاشتم تو سورس !
کد:
blog_config_template => \&blog_template,
بعد اين چيز ميزاشم تعريف کردم !
کد:
sub blog_template {
جواب داد !
فقط چيکار کنم که اون چيز ميزارو نخواد؟
فقط يه جا واسه ديزيبل کردنش باشه !
 

azizaa

مدیر بازنشسته
تاریخ عضویت
16 نوامبر 2004
نوشته‌ها
422
لایک‌ها
0
منظورت رو دقیق نگرفتم ولی ام تی امكان غیر فعال كردن پلاگین را در سطح بلاگ نمیدهد [كه به نظرم كار درستی است] اگر اصرار داری كه همچین چیزی داشته باشی یه Setting Variable به نام active (مثلا!) تعریف كن و Default را هم فعال بگیر. بعد یه چك باكس واسه Blog Config بذار تا غیر فعال یا فعال شود. Nofollow دقیقا همین كار را می كند. نگاه كن كدش رو.

بعضی چیزها را كه به فارسی می خواهی توضیح بدهی خنده دار می شود. یكی مثل این چیزی كه بالا نوشتم و یكی مثله : Last night I invited her to have a date at the pub!
به بهترین ترجمه ی این جمله (كه به نظر خود مترجم خنددار نباشد!) جایزه می دم!
 

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
به نقل از azizaa :
منظورت رو دقیق نگرفتم ولی ام تی امكان غیر فعال كردن پلاگین را در سطح بلاگ نمیدهد [كه به نظرم كار درستی است] اگر اصرار داری كه همچین چیزی داشته باشی یه Setting Variable به نام active (مثلا!) تعریف كن و Default را هم فعال بگیر. بعد یه چك باكس واسه Blog Config بذار تا غیر فعال یا فعال شود. Nofollow دقیقا همین كار را می كند. نگاه كن كدش رو.

بعضی چیزها را كه به فارسی می خواهی توضیح بدهی خنده دار می شود. یكی مثل این چیزی كه بالا نوشتم و یكی مثله : Last night I invited her to have a date at the pub!
به بهترین ترجمه ی این جمله (كه به نظر خود مترجم خنددار نباشد!) جایزه می دم!
گرفتم منظورو !
يعني قسمت ستينگ باز بشه و توش يه چک باکس باشه !
برم ببينم ميشه يا نه !
 

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
ايول ! يه Setting Variable تعريف کردم !ديفالتشم 1 گذاشتم !
بعد يه تمپليت _ ايف پشت خاصيت checked بودنش گذاشتم !
درست کار ميکرد !
تيک رو که برميداشتم با رفرش کردن صفحه تيکه نبود! اطلاعاتش ذخيره ميشد !
يه سوال اين اول ! اين اطلاعات کجا ذخيره ميشن؟
بعدم من چطور ميتونم اين روشن و خاموش بودن چک باکس رو در بيارم؟ که مثلا اگه خاموش بود پلاگين در سطح وبلاگ فعال نباشه ديگه ؟
 

azizaa

مدیر بازنشسته
تاریخ عضویت
16 نوامبر 2004
نوشته‌ها
422
لایک‌ها
0
Read this completely then you'll get the answer for all of your questions:

کد:
MT::Plugin - Movable Type class holding information that describes a
plugin

=head1 SYNOPSIS

    package MyPlugin;

    use base 'MT::Plugin';
    use vars qw($VERSION);
    $VERSION = 1.12;

    my $plugin = new MyPlugin({
        name => 'My Plugin',
        version => $VERSION,
        author_name => 'Conan the Barbaraian',
        author_link => 'http://example.com/',
        plugin_link => 'http://example.com/mt-plugins/example/',
        description => 'Frobnazticates all Diffyhorns',
        config_link => 'myplugin.cgi',
        settings => new MT::PluginSettings([
            ['option1', { Default => 'default_setting' }],
            ['option2', { Default => 'system_default', Scope => 'system' }],
            ['option2', { Scope => 'blog' }],
        ],
        config_template => \&config_tmpl
    });
    MT->add_plugin($plugin);

    # Alternatively, instantiating MT::Plugin itself

    my $plugin = new MT::Plugin({
        name => "Example Plugin",
        version => 1.12,
        author_name => "Conan the Barbarian",
        author_link => "http://example.com/",
        plugin_link => "http://example.com/mt-plugins/example/",
        description => "Frobnazticates all Diffyhorns",
        config_link => 'myplugin.cgi',
        doc_link => <documentation URL>,
        settings => new MT::PluginSettings([
            ['option1', { Default => 'default_setting' }],
            ['option2', { Default => 'system_default', Scope => 'system' }],
            ['option2', { Scope => 'blog' }],
        ],
        config_template => \&config_tmpl
    });
    MT->add_plugin($plugin);

=head1 DESCRIPTION

An I<MT::Plugin> object holds data about a plugin which is used to help
users understand what the plugin does and let them configure the
plugin.

Normally, a plugin will construct an I<MT::Plugin> object and pass it
to the C<add_plugin> method of the I<MT> class:

    MT->add_plugin($plugin);

This will insert a slug for that plugin on the main MT page; the slug
gives the name and description and provides links to the documentation
and configuration pages, if any.

When adding callbacks, you will use the plugin object as well; this
object is used to help the user identify errors that arise in
executing the callback. For example, to add a callback which is
executed before the I<MT::Foo> object is saved to the database, you might
make a call like this:

   MT::Foo->add_callback("pre_save", 10, $plugin, \&callback_function);

This call will tell I<MT::Foo> to call the function
C<callback_function> just before executing any C<save> operation. The
number '10' is signalling the priority, which controls the order in
which various plugins are called. Lower number callbacks are called
first.

=head1 ARGUMENTS

=over 4

=item * name

A human-readable string identifying the plugin. This will be displayed
in the plugin's slug on the MT front page.

=item * version (optional, but recommended)

The version number for the release of the plugin. Will be displayed
next to the plugin's name wherever listed.

=item * description (optional)

A longer string giving a brief description of what the plugin does.

=item * doc_link (optional)

A URL pointing to some documentation for the plugin. This can be a
relative path, in which case it identifies documentation within the
plugin's distribution, or it can be an absolute URL, pointing at
off-site documentation.

=item * config_link (optional)

The relative path of a CGI script or some other configuration
interface for the plugin. This is relative to the "plugin
envelope"--that is, the directory underneath C<mt/plugins> where all
your plugin files live.

=item * author_name (optional)

The name of the individual or company that created the plugin.

=item * author_link (optional)

A URL pointing to the home page of the individual or company that
created the plugin.

=item * plugin_link (optional)

A URL pointing to the home page for the plugin itself.

=item * config_template (optional)

=item * system_config_template (optional)

=item * blog_config_template (optional)

=item * settings (optional)

Identifies the plugin's configuration settings.

=head1 Methods

Each of the above arguments to the constructor is also a 'getter'
method that returns the corresponding value. C<MT::Plugin> also offers
the following methods:

=head2 $plugin->init_app

For subclassed MT::Plugins that declare this method, it is invoked when
the application starts up.

=head2 $plugin->init_request

For subclassed MT::Plugins that declare this method, it is invoked when
the application begins handling a new request.

=head2 $plugin->envelope

Returns the path to the plugin, relative to the MT directory. This is
determined automatically when the plugin is loaded.

=head2 $plugin->set_config_value($key, $value[, $scope])

=head2 $plugin->get_config_value($key[, $scope])

These routines facilitate easy storage of simple configuration
options.  They make use of the PluginData table in the database to
store a set of key-value pairs for each plugin. Call them as follows:

    $plugin->set_config_value($key, $value);
    $value = $plugin->get_config_value($key);

The C<name> field of the plugin object is used as the namespace for
the keys. Thus it would not be wise for one plugin to use the
same C<name> as a different plugin.

=head2 $plugin->get_config_obj([$scope])

Retrieves the MT::PluginData object associated with this plugin
and the scope identified (which defaults to 'system' if unspecified).

=head2 $plugin->get_config_hash([$scope])

Retrieves the configuration data associated with this plugin
and returns it a a Perl hash reference. If the scope parameter is not given,
the 'system' scope is assumed.

=head2 $plugin->config_template($params[, $scope])

Called to retrieve a HTML::Template object which will be output as the
configuration form for this plugin. Optionally a scope may be specified
(defaults to 'system').

    my $system_tmpl = $plugin->config_template($params, 'system');
    my $system_tmpl = $plugin->config_template($params);
    my $blog_tmpl = $plugin->config_template($params, 'blog:1');

=head2 $plugin->config_vars([$scope])

Returns an array of configuration setting names for the requested scope.

=head2 $plugin->save_config($param[, $scope])

Handles saving configuration data from the plugin configuration form.

    my $param = { 'option1' => 'x' };
    $plugin->save_config($param); # saves system configuration data
    $plugin->save_config($param, 'system'); # saves system configuration data
    $plugin->save_config($param, 'blog:1'); # saves blog configuration data

=head2 $plugin->load_config($param[, $scope])

Handles loading configuration data from the plugindata table.

=head2 $plugin->load_tmpl($file[, ...])

Used to load a HTML::Template object relative to the plugin's directory.
It will scan both the plugin's directory and a directory named 'tmpl'
underneath it. It will passthrough parameters that follow the $file
parameter into the HTML::Template constructor.

=head1 MT::PluginSettings

The MT::PluginSettings package is also declared with this module. It
is used to define a group of settings and their defaults for the plugin.
These settings are processed whenever configuration data is requested
from the plugin.

Example:

    $plugin->{settings} = new MT::PluginSettings([
        ['option1', { Default => 'default_setting' }],
        ['option2', { Default => 'system_default', Scope => 'system' }],
        ['option2', { Scope => 'blog' }],
    ]);

Settings can be assigned a default value and an applicable 'scope'.
Currently, recognized scopes are "system" and "blog".

here is what exactly you are searching for:
کد:
$plugin->set_config_value($key, $value);
    $value = $plugin->get_config_value($key);
 

azizaa

مدیر بازنشسته
تاریخ عضویت
16 نوامبر 2004
نوشته‌ها
422
لایک‌ها
0
by the way alll of these variables are stored in mt_plugindata table in your MT database
 

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
دستت درد نکنه !
برم يخده ديگه ور برم ببينم چي ميشه !
26.gif
 

Shahed

کاربر قدیمی پرشین تولز
تاریخ عضویت
30 ژوئن 2003
نوشته‌ها
7,289
لایک‌ها
34
محل سکونت
mt.cgi
به نقل از azizaa :
Read this completely then you'll get the answer for all of your questions:

کد:
MT::Plugin - Movable Type class holding information that describes a
plugin

=head1 SYNOPSIS

    package MyPlugin;

    use base 'MT::Plugin';
    use vars qw($VERSION);
    $VERSION = 1.12;

    my $plugin = new MyPlugin({
        name => 'My Plugin',
        version => $VERSION,
        author_name => 'Conan the Barbaraian',
        author_link => 'http://example.com/',
        plugin_link => 'http://example.com/mt-plugins/example/',
        description => 'Frobnazticates all Diffyhorns',
        config_link => 'myplugin.cgi',
        settings => new MT::PluginSettings([
            ['option1', { Default => 'default_setting' }],
            ['option2', { Default => 'system_default', Scope => 'system' }],
            ['option2', { Scope => 'blog' }],
        ],
        config_template => \&config_tmpl
    });
    MT->add_plugin($plugin);

    # Alternatively, instantiating MT::Plugin itself

    my $plugin = new MT::Plugin({
        name => "Example Plugin",
        version => 1.12,
        author_name => "Conan the Barbarian",
        author_link => "http://example.com/",
        plugin_link => "http://example.com/mt-plugins/example/",
        description => "Frobnazticates all Diffyhorns",
        config_link => 'myplugin.cgi',
        doc_link => <documentation URL>,
        settings => new MT::PluginSettings([
            ['option1', { Default => 'default_setting' }],
            ['option2', { Default => 'system_default', Scope => 'system' }],
            ['option2', { Scope => 'blog' }],
        ],
        config_template => \&config_tmpl
    });
    MT->add_plugin($plugin);

=head1 DESCRIPTION

An I<MT::Plugin> object holds data about a plugin which is used to help
users understand what the plugin does and let them configure the
plugin.

Normally, a plugin will construct an I<MT::Plugin> object and pass it
to the C<add_plugin> method of the I<MT> class:

    MT->add_plugin($plugin);

This will insert a slug for that plugin on the main MT page; the slug
gives the name and description and provides links to the documentation
and configuration pages, if any.

When adding callbacks, you will use the plugin object as well; this
object is used to help the user identify errors that arise in
executing the callback. For example, to add a callback which is
executed before the I<MT::Foo> object is saved to the database, you might
make a call like this:

   MT::Foo->add_callback("pre_save", 10, $plugin, \&callback_function);

This call will tell I<MT::Foo> to call the function
C<callback_function> just before executing any C<save> operation. The
number '10' is signalling the priority, which controls the order in
which various plugins are called. Lower number callbacks are called
first.

=head1 ARGUMENTS

=over 4

=item * name

A human-readable string identifying the plugin. This will be displayed
in the plugin's slug on the MT front page.

=item * version (optional, but recommended)

The version number for the release of the plugin. Will be displayed
next to the plugin's name wherever listed.

=item * description (optional)

A longer string giving a brief description of what the plugin does.

=item * doc_link (optional)

A URL pointing to some documentation for the plugin. This can be a
relative path, in which case it identifies documentation within the
plugin's distribution, or it can be an absolute URL, pointing at
off-site documentation.

=item * config_link (optional)

The relative path of a CGI script or some other configuration
interface for the plugin. This is relative to the "plugin
envelope"--that is, the directory underneath C<mt/plugins> where all
your plugin files live.

=item * author_name (optional)

The name of the individual or company that created the plugin.

=item * author_link (optional)

A URL pointing to the home page of the individual or company that
created the plugin.

=item * plugin_link (optional)

A URL pointing to the home page for the plugin itself.

=item * config_template (optional)

=item * system_config_template (optional)

=item * blog_config_template (optional)

=item * settings (optional)

Identifies the plugin's configuration settings.

=head1 Methods

Each of the above arguments to the constructor is also a 'getter'
method that returns the corresponding value. C<MT::Plugin> also offers
the following methods:

=head2 $plugin->init_app

For subclassed MT::Plugins that declare this method, it is invoked when
the application starts up.

=head2 $plugin->init_request

For subclassed MT::Plugins that declare this method, it is invoked when
the application begins handling a new request.

=head2 $plugin->envelope

Returns the path to the plugin, relative to the MT directory. This is
determined automatically when the plugin is loaded.

=head2 $plugin->set_config_value($key, $value[, $scope])

=head2 $plugin->get_config_value($key[, $scope])

These routines facilitate easy storage of simple configuration
options.  They make use of the PluginData table in the database to
store a set of key-value pairs for each plugin. Call them as follows:

    $plugin->set_config_value($key, $value);
    $value = $plugin->get_config_value($key);

The C<name> field of the plugin object is used as the namespace for
the keys. Thus it would not be wise for one plugin to use the
same C<name> as a different plugin.

=head2 $plugin->get_config_obj([$scope])

Retrieves the MT::PluginData object associated with this plugin
and the scope identified (which defaults to 'system' if unspecified).

=head2 $plugin->get_config_hash([$scope])

Retrieves the configuration data associated with this plugin
and returns it a a Perl hash reference. If the scope parameter is not given,
the 'system' scope is assumed.

=head2 $plugin->config_template($params[, $scope])

Called to retrieve a HTML::Template object which will be output as the
configuration form for this plugin. Optionally a scope may be specified
(defaults to 'system').

    my $system_tmpl = $plugin->config_template($params, 'system');
    my $system_tmpl = $plugin->config_template($params);
    my $blog_tmpl = $plugin->config_template($params, 'blog:1');

=head2 $plugin->config_vars([$scope])

Returns an array of configuration setting names for the requested scope.

=head2 $plugin->save_config($param[, $scope])

Handles saving configuration data from the plugin configuration form.

    my $param = { 'option1' => 'x' };
    $plugin->save_config($param); # saves system configuration data
    $plugin->save_config($param, 'system'); # saves system configuration data
    $plugin->save_config($param, 'blog:1'); # saves blog configuration data

=head2 $plugin->load_config($param[, $scope])

Handles loading configuration data from the plugindata table.

=head2 $plugin->load_tmpl($file[, ...])

Used to load a HTML::Template object relative to the plugin's directory.
It will scan both the plugin's directory and a directory named 'tmpl'
underneath it. It will passthrough parameters that follow the $file
parameter into the HTML::Template constructor.

=head1 MT::PluginSettings

The MT::PluginSettings package is also declared with this module. It
is used to define a group of settings and their defaults for the plugin.
These settings are processed whenever configuration data is requested
from the plugin.

Example:

    $plugin->{settings} = new MT::PluginSettings([
        ['option1', { Default => 'default_setting' }],
        ['option2', { Default => 'system_default', Scope => 'system' }],
        ['option2', { Scope => 'blog' }],
    ]);

Settings can be assigned a default value and an applicable 'scope'.
Currently, recognized scopes are "system" and "blog".

here is what exactly you are searching for:
کد:
$plugin->set_config_value($key, $value);
    $value = $plugin->get_config_value($key);
يکم سرم اين دوروزه شلوغ بود تازه رسيدم اينو ببينم!
عجب چيز تريپسي يههههه اين راهنمائه !
84.gif

از کجا اوردي اينو عزيز؟
 

azizaa

مدیر بازنشسته
تاریخ عضویت
16 نوامبر 2004
نوشته‌ها
422
لایک‌ها
0
it is (and actually it was) always a part of MT!
as I told you these are the POD documents inside the perl files. just open the lib folder in the MT directory then you can find plugin.pm in the MT folder. scroll down to the end of the code then you can see all of this document there. it's the ame for all the other files.
THIS IS POD FORMAT
 
بالا