View mt-tool-speed-rebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
package MT::Tool::SpeedRebuild; | |
use strict; | |
use warnings; | |
use File::Spec; | |
use FindBin; | |
use lib map File::Spec->catdir( $FindBin::Bin, File::Spec->updir, $_ ), qw/lib extlib/; | |
use base qw( MT::Tool ); | |
use MT::FileMgr; | |
use MT::Util qw( log_time ); |
View mt-tool-rebuild-file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
package MT::Tool::RebuildFile; | |
use strict; | |
use warnings; | |
use File::Spec; | |
use FindBin; | |
use lib map File::Spec->catdir( $FindBin::Bin, File::Spec->updir, $_ ), qw/lib extlib/; | |
use base qw( MT::Tool ); | |
use MT::Util qw( log_time ); | |
sub usage { '--file /path/to/file or or --template_id n' } |
View mt-data-api-proxy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'DataAPICacheDir', '/tmp/api_cache' ); | |
define( 'DataAPIUploadCacheDir', '/tmp/upload' ); | |
define( 'DataAPICacheTtl', 1200 ); | |
define( 'DataAPICacheWithAuth', TRUE ); | |
define( 'DataAPIURL', 'http://localhost/mt/mt-data-api.cgi' ); | |
define( 'SendHTTPHeaderMethod', '' ); | |
$cache_ttl = DataAPICacheTtl; | |
$cache_with_auth = DataAPICacheWithAuth; | |
$cache_dir = DataAPICacheDir; |
View zipsearch.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $app; | |
$q = $app->param( 'q' ); | |
$q = $app->db()->escape( $q ); | |
$q = preg_replace( '/[^0-9]/', '', $q ); | |
if ( $q ) { | |
$terms = array( 'name' => $q, | |
'class' => 'postalcode' ); | |
$extra = array( 'limit' => 1 ); | |
$postalcode = $app->load( 'CustomObject', $terms, $extra ); |
View PowerCMS config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Trigger1: | |
params: | |
- __mode=view | |
- _type=entrygroup | |
- saved=1 | |
template_id: 93 | |
Trigger2: | |
params: | |
- __mode=view | |
- _type=campaigngroup |
View data URI scheme in MTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:Asset id="1"> | |
<mt:AssetThumbnailFile width="32" square="1" convert2base64="1" setvar="src"> | |
<mt:Var name="src" get_content_length="1" setvar="image_size"> | |
<mt:If name="image_size" lt="32768"> | |
<img src="data:<mt:AssetMimeType>;base64,<mt:Var name="src">" width="32" height="32" alt="<mt:AssetLabel escape="html">" /> | |
<mt:else> | |
<img src="<mt:AssetThumbnailURL>" width="32" height="32" alt="<mt:AssetLabel escape="html">" /> | |
</mt:If> | |
</mt:Asset> |
View mt-rebuild-queue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use MT; | |
my $mt = MT->new; | |
require MT::TheSchwartz::FuncMap; | |
require MT::TheSchwartz::Job; | |
require MT::FileInfo; | |
require MT::WeblogPublisher; | |
my $funcmap = MT::TheSchwartz::FuncMap->load( { funcname => 'MT::Worker::Publish' } ); | |
return unless $funcmap; | |
my @jobs = MT::TheSchwartz::Job->load( { funcid => $funcmap->funcid, }, | |
{ 'sort' => 'priority', |
View mt-tools-template.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
package MT::Tool::Foo; | |
use strict; | |
use warnings; | |
use File::Spec; | |
use FindBin; | |
use lib map File::Spec->catdir( $FindBin::Bin, File::Spec->updir, $_ ), qw/lib extlib/; | |
use base qw( MT::Tool ); | |
sub usage { '--debug 1' } |
View mt-plugin-http-https-transfer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HttpHttpsTransfer extends MTPlugin { | |
var $registry = array( | |
'config_settings' => array( | |
'HttpHttpsTransferPathBegin' => array( 'default' => '/entry_form/' ), | |
), | |
'callbacks' => array( | |
'post_init' => 'post_init', | |
), | |
); |
View mt-plugin-rewritearchiver.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RewriteArchiver extends MTPlugin { | |
var $registry = array( | |
'config_settings' => array( | |
'RewriteArchiverRewriteTo' => array( 'default' => '/archiver.html' ), | |
), | |
'callbacks' => array( | |
'post_init' => 'rewrite_archiver', | |
), | |
); |
NewerOlder