Changeset 2747

Show
Ignore:
Timestamp:
07/10/08 17:16:23 (17 months ago)
Author:
bchoate
Message:

Updated POD.

Location:
branches/release-41/lib/MT
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • branches/release-41/lib/MT/Blocklist.pm

    r2359 r2747  
    4242 
    43431; 
     44 
     45__END__ 
     46 
     47=head1 NAME 
     48 
     49MT::Blocklist - MT object class for storing rules for filtering content. 
     50 
     51=head1 METHODS 
     52 
     53=head2 MT::Blocklist->block_these($blog_id, $action, @urls) 
     54 
     55Adds the specified URLs to the blocklist table with the specified I<$action> 
     56and for the specified I<$blog_id>. 
     57 
     58=head1 LICENSE 
     59 
     60The license that applies is the one you agreed to when downloading 
     61Movable Type. 
     62 
     63=head1 AUTHOR & COPYRIGHT 
     64 
     65Except where otherwise noted, MT is Copyright 2001-2008 Six Apart. 
     66All rights reserved. 
     67 
     68=cut 
  • branches/release-41/lib/MT/Core.pm

    r2541 r2747  
    10031003 
    100410041; 
     1005__END__ 
     1006 
     1007=head1 NAME 
     1008 
     1009MT::Core - Core component for Movable Type functionality. 
     1010 
     1011=head1 METHODS 
     1012 
     1013=head2 MT::Core::trans($phrase) 
     1014 
     1015Stub method that returns the phrase it is given. 
     1016 
     1017=head2 MT::Core->name() 
     1018 
     1019Returns a string identifying this component. 
     1020 
     1021=head2 MT::Core->id() 
     1022 
     1023Returns the identifier for this component. 
     1024 
     1025=head2 MT::Core::load_junk_filters() 
     1026 
     1027Routine that returns the core junk filter registry elements (these 
     1028live in the L<MT::JunkFilter> package). 
     1029 
     1030=head2 MT::Core::load_core_tasks() 
     1031 
     1032Routine that returns the core L<MT::TaskMgr> registry elements. 
     1033 
     1034=head2 MT::Core->remove_temporary_files() 
     1035 
     1036Utility method for removing any temporary files that MT generates. 
     1037 
     1038=head2 MT::Core->remove_expired_sessions() 
     1039 
     1040Utility method for clearing expired MT user session records. 
     1041 
     1042=head2 MT::Core->remove_expired_search_caches() 
     1043 
     1044Utility method for removing expired search cache records. 
     1045 
     1046=head2 MT::Core::load_default_templates() 
     1047 
     1048Routine that returns the default template set registry elements. 
     1049 
     1050=head2 MT::Core::load_captcha_providers() 
     1051 
     1052Routine that returns the CAPTCHA provider registry elements. 
     1053 
     1054=head2 MT::Core::load_core_commenter_auth() 
     1055 
     1056Routine that returns the core registry elements for commenter 
     1057authentication methods. 
     1058 
     1059=head2 MT::Core::load_core_tags() 
     1060 
     1061Routine that returns the core registry elements for the MT 
     1062template tags are enabled for the entire system (excludes 
     1063application-specific tags). 
     1064 
     1065=head2 MT::Core::load_upgrade_fns() 
     1066 
     1067Routine that returns the core registry elements for the MT 
     1068schema upgrade framework. 
     1069 
     1070=head2 MT::Core::load_backup_instructions 
     1071 
     1072Routine that returns the core registry elements for the MT 
     1073Backup/Restore framework. 
     1074 
     1075=head2 MT::Core->l10n_class 
     1076 
     1077Returns the localization package for the core component. 
     1078 
     1079=head2 $core->init_registry() 
     1080 
     1081=head2 MT::Core::load_archive_types() 
     1082 
     1083Routine that returns the core registry elements for the 
     1084publishable archive types. See L<MT::ArchiveType>. 
     1085 
     1086=head2 MT::Core::PerformanceLoggingPath 
     1087 
     1088A L<MT::ConfigMgr> get/set method for the C<PerformanceLoggingPath> 
     1089configuration setting. If the user has not designated a path, this 
     1090will return a default location, which is programatically determined. 
     1091 
     1092=head2 MT::Core::ProcessMemoryCommand 
     1093 
     1094A L<MT::ConfigMgr> get/set method for the C<ProcessMemoryCommand> 
     1095configuration setting. If the user has not assigned this themselves, 
     1096it will return a default command, determined by the operating system 
     1097Movable Type is running on. 
     1098 
     1099=head2 MT::Core::SecretToken 
     1100 
     1101A L<MT::ConfigMgr> get/set method for the C<SecretToken> 
     1102configuration setting. If the user has not assigned this themselves, 
     1103it will return a random token value, and save it to the database for 
     1104future use. 
     1105 
     1106=head2 MT::Core::DefaultUserTagDelimiter 
     1107 
     1108A L<MT::ConfigMgr> get/set method for the C<DefaultUserTagDelimiter> 
     1109configuration setting. Translates the keyword values 'comma' and 
     1110'space' to the ASCII code for those characters. 
     1111 
     1112=head2 MT::Core::NewUserAutoProvisioning 
     1113 
     1114A L<MT::ConfigMgr> get/set method for the C<NewUserAutoProvisioning> 
     1115configuration setting. Even if the user has enabled this setting, 
     1116it will force a value of '0' unless the C<DefaultSiteRoot> and 
     1117C<DefaultSiteURL> configuration settings are also assigned. 
     1118 
     1119=head2 MT::Core::UserSessionCookieName 
     1120 
     1121A L<MT::ConfigMgr> get/set method for the C<UserSessionCookieName> 
     1122configuration setting. If the user has not specifically assigned 
     1123this setting, a default value is returned, affected by the 
     1124C<SingleCommunity> setting. If C<SingleCommunity> is enabled, it 
     1125returns a cookie name that is the same for all blogs. If it is 
     1126off, it returns a cookie name that is blog-specific (contains the 
     1127blog id in the cookie name). 
     1128 
     1129=head2 UserSessionCookiePath 
     1130 
     1131A L<MT::ConfigMgr> get/set method for the C<UserSessionCookiePath> 
     1132configuration setting. If the user has not specifically assigned 
     1133this setting, a default value is returned, affected by the 
     1134C<SingleCommunity> setting. If C<SingleCommunity> is enabled, it 
     1135returns a path that is the same for all blogs ('/'). If it is 
     1136off, it returns a value that will yield the blog's relative 
     1137URL path. 
     1138 
     1139=head1 LICENSE 
     1140 
     1141The license that applies is the one you agreed to when downloading 
     1142Movable Type. 
     1143 
     1144=head1 AUTHOR & COPYRIGHT 
     1145 
     1146Except where otherwise noted, MT is Copyright 2001-2008 Six Apart. 
     1147All rights reserved. 
     1148 
     1149=cut 
  • branches/release-41/lib/MT/DateTime.pm

    r1745 r2747  
    245245=head1 NAME 
    246246 
    247 MT::DateTime 
     247MT::DateTime - A utility package for handling date/time values for Movable 
     248Type. 
    248249 
    249250=head1 METHODS 
    250251 
     252=head2 MT::DateTime->new(%attr) 
     253 
     254Constructs a new C<MT::DateTime> object using the values in C<%attr>. 
     255C<%attr> may contain: 
     256 
     257=over 4 
     258 
     259=item * year 
     260 
     261A 4-digit year. 
     262 
     263=item * month 
     264 
     265Month number, where January is 0. 
     266 
     267=item * day 
     268 
     269Day number, from 1 to 31. 
     270 
     271=item * hour 
     272 
     273Hour in 24 hour notation (0-23). 
     274 
     275=item * minute 
     276 
     277Minutes (0-59). 
     278 
     279=item * second 
     280 
     281Seconds (0-59). 
     282 
     283=item * time_zone 
     284 
     285Timezone, in '+HH:MM', '-HH:MM', '+HH', or '-HH' notation. 
     286 
     287=back 
     288 
    251289=head2 compare( a => $a, b => $b, blog => $blog ) 
    252290 
    253 Compares two timestamp strings and returns negative valye, 0, or positive value 
    254 depending on whether the "a" argument is less than, equal to, or greater than 
    255 the "b" argument. 
    256  
    257 You can specify scalar value to "a" and "b".  They are treated as timestamp values 
    258 (e.g. 20080405123456).  You can also specify either epoch string (e.g the string 
    259 returned from time method), or MT::DateTime object.  In those cases, you must 
    260 specify both value and type in a hash, for example: 
    261  
    262 MT::DateTime->compare( blog => $blog, 
    263     a => '20041231123456', b => { value => time(), type => 'epoch' } ); 
     291Compares two timestamp strings and returns negative valye, 0, or 
     292positive value depending on whether the "a" argument is less than, 
     293equal to, or greater than the "b" argument. 
     294 
     295You can specify scalar value to "a" and "b".  They are treated as 
     296timestamp values (e.g. 20080405123456).  You can also specify either 
     297epoch string (e.g the string returned from time method), or C<MT::DateTime> 
     298object.  In those cases, you must specify both value and type in a hash, 
     299for example: 
     300 
     301    MT::DateTime->compare( blog => $blog, 
     302        a => '20041231123456', b => { value => time(), type => 'epoch' } ); 
     303 
     304=head2 $datetime->week_year() 
     305 
     306Returns the year for the start of the week for the object. 
     307 
     308=head2 $datetime->week_number() 
     309 
     310Returns the week number calculated for the object. 
     311 
     312=head2 $datetime->year() 
     313 
     314Returns the year component of the object. 
     315 
     316=head2 $datetime->month() 
     317 
     318Returns the month component of the object. 
     319 
     320=head2 $datetime->day() 
     321 
     322Returns the day component of the object. 
     323 
     324=head2 $datetime->hour() 
     325 
     326Returns the hours component of the object. 
     327 
     328=head2 $datetime->minute() 
     329 
     330Returns the minutes component of the object. 
     331 
     332=head2 $datetime->second() 
     333 
     334Returns the seconds component of the object. 
     335 
     336=head2 $datetime->time_zone() 
     337 
     338Returns the time zone component of the object. 
     339 
     340=head2 $datetime->day_of_year() 
     341 
     342Returns the day number of the year of the object. 
     343 
     344=head2 $datetime->week() 
     345 
     346Returns a list containing the year of the week (C<week_year>) and 
     347the week number (C<week_number>). 
     348 
     349=head2 MT::DateTime->weeks_in_year($year) 
     350 
     351Returns the number of weeks that are in the specified C<$year>. Returns 
     352either 52 or 53, depending on the year. 
     353 
     354=head2 $datetime->ymd2rd( [ $year, $month, $day ]) 
     355 
     356Converts the given C<$year>, C<$month>, C<$day> (or, if unspecified, 
     357uses the year, month, day elements from C<$datetime>) into a 'Rata Die' 
     358days value. 
     359 
     360=head2 $datetime->tz_offset_as_seconds( [$offset] ) 
     361 
     362Converts the given C<$offset> (or, if absent, uses the time_zone 
     363component of C<$datetime>) into an expression of seconds. I.e., 
     364an C<$offset> of '-1:30' would yield -5400. 
    264365 
    265366=head1 AUTHOR & COPYRIGHT 
  • branches/release-41/lib/MT/FileMgr.pm

    r1779 r2747  
    152152On error, returns C<undef>; see L<ERROR HANDLING>, below. 
    153153 
    154 =head2 content_is_updated() 
     154=head2 content_is_updated($file, $content) 
    155155 
    156 Return one (1). 
     156Returns true if the contents of I<$file> differs from the value in 
     157I<$content>. 
     158 
     159=head2 $fmgr->file_mod_time($file) 
     160 
     161Returns the modification timestamp for I<$file>. 
    157162 
    158163=head2 $fmgr->is_handle($file) 
  • branches/release-41/lib/MT/Image.pm

    r2649 r2747  
    466466=head1 USAGE 
    467467 
    468 =head2 MT::Image->new(%arg) 
     468=head2 MT::Image->new( %arg ) 
    469469 
    470470Constructs a new I<MT::Image> object. Returns the new object on success; on 
     
    491491=back 
    492492 
    493 =head2 $img->scale(%arg) 
     493=head2 $img->scale( %arg ) 
    494494 
    495495Creates a thumbnail from the image represented by I<$img>; on success, returns 
     
    519519 
    520520=back 
     521 
     522=head2 MT::Image->inscribe_square( %arg ) 
     523 
     524Calculates a square of dimensions that are capable of holding an image 
     525of the height and width indicated. This method receives I<%arg>, which 
     526may contain: 
     527 
     528=over 4 
     529 
     530=item * Height 
     531 
     532=item * Width 
     533 
     534=back 
     535 
     536The square will be the smaller value of the Height and Width parameter. 
     537 
     538The method returns a hash containing the following information: 
     539 
     540=over 4 
     541 
     542=item * Size 
     543 
     544The size of the calculated square, in pixels. 
     545 
     546=item * X 
     547 
     548The horizontal space to crop from the image, in pixels. 
     549 
     550=item * Y 
     551 
     552The vertical space to crop from the image, in pixels. 
     553 
     554=back 
     555 
     556This information is suited for the L<crop> method. 
     557 
     558=head2 $img->make_square() 
     559 
     560Takes an image which may or may not be a square in dimension and forces 
     561it into a square shape (trimming the longer side, as necesary). 
    521562 
    522563=head2 $img->get_dimensions(%arg) 
     
    529570between 1 to 100). 
    530571 
     572=head2 MT::Image->check_upload( %arg ) 
     573 
     574Utility method used to handle image upload and storage, along with some 
     575constraining factors. The I<%arg> hash may contain the following elements: 
     576 
     577=over 4 
     578 
     579=item * Fh 
     580 
     581A filehandle for the uploaded file. 
     582 
     583=item * Fmgr 
     584 
     585A handle to a L<MT::FileMgr> object that will be used for writing the 
     586file into place. 
     587 
     588=item * Local 
     589 
     590A path and filename for the location to write the uploaded file. 
     591 
     592=item * Max (optional) 
     593 
     594A number that specifies the maximum physical file size for the uploaded 
     595image (specified in bytes). 
     596 
     597=item * MaxDim (optional) 
     598 
     599A number that specifies the maximum dimension allowed for the uploaded 
     600image (specified in pixels). 
     601 
     602=back 
     603 
     604If the uploaded image is valid and passes the file size and image 
     605dimension requirements (assuming those parameters are given), 
     606the return value is a list consisting of the following elements: 
     607 
     608=over 4 
     609 
     610=item * $width 
     611 
     612The width of the uploaded image, in pixels. 
     613 
     614=item * $height 
     615 
     616The height of the uploaded image, in pixels. 
     617 
     618=item * $id 
     619 
     620A string identifying the type of image file (returned by L<Image::Size>, 
     621so typically "GIF", "JPG", "PNG"). 
     622 
     623=item * $write_coderef 
     624 
     625A Perl coderef that, when invoked writes the image to the specified 
     626location. 
     627 
     628=back 
     629 
     630If any error occurs from this routine, it will return 'undef', and 
     631assign the error message, accessible using the L<errstr> class method. 
     632 
    531633=head1 AUTHOR & COPYRIGHT 
    532634 
  • branches/release-41/lib/MT/Tool.pm

    r2659 r2747  
    178178requested by the user (that is, how many times the C<-v> option was used). 
    179179 
     180=head2 $tool-E<gt>set_up_app() 
     181 
     182This helper method creates a MT instance and configures it to look like 
     183a L<MT::App> instance (although, it isn't), and invokes the 'init_app' 
     184callback using this instance. 
     185 
     186=head2 $class-E<gt>show_help 
     187 
     188Displays command-line help provided by the C<MT::Tool> subclass L<help> 
     189method. 
     190 
     191=head2 $class-E<gt>show_usage 
     192 
     193Displays commnad-line usage instructions provided by the C<MT::Tool> 
     194subclass L<usage> method. 
     195 
    180196=head1 SEE ALSO 
    181197