Merge remote branch 'zshall/master'
This commit is contained in:
BIN
ext/mail/banner.png
Normal file
BIN
ext/mail/banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
9
ext/mail/mail.css
Normal file
9
ext/mail/mail.css
Normal file
@@ -0,0 +1,9 @@
|
||||
.headerTop { background-color:#FFCC66; border-top:0px solid #000000; border-bottom:1px solid #FFFFFF; text-align:center; }
|
||||
.adminText { font-size:10px; color:#996600; line-height:200%; font-family:verdana; text-decoration:none; }
|
||||
.headerBar { background-color:#FFFFFF; border-top:0px solid #333333; border-bottom:10px solid #FFFFFF; }
|
||||
.title { font-size:20px; font-weight:bold; color:#CC6600; font-family:arial; line-height:110%; }
|
||||
.subTitle { font-size:11px; font-weight:normal; color:#666666; font-style:italic; font-family:arial; }
|
||||
.defaultText { font-size:12px; color:#000000; line-height:150%; font-family:trebuchet ms; }
|
||||
.footerRow { background-color:#FFFFCC; border-top:10px solid #FFFFFF; }
|
||||
.footerText { font-size:10px; color:#996600; line-height:100%; font-family:verdana; }
|
||||
a { color:#FF6600; color:#FF6600; color:#FF6600; }
|
45
ext/mail/main.php
Normal file
45
ext/mail/main.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Name: Mail System
|
||||
* Author: Zach Hall <zach@sosguy.net>
|
||||
* Link: http://seemslegit.com
|
||||
* License: GPLv2
|
||||
* Description: Provides an interface for sending and receiving mail.
|
||||
*/
|
||||
|
||||
class Mail extends SimpleExtension {
|
||||
public function onSetupBuilding($event) {
|
||||
$sb = new SetupBlock("Mailing Options");
|
||||
$sb->add_text_option("mail_sub", "<br>Subject prefix: ");
|
||||
$sb->add_text_option("mail_img", "<br>Banner Image URL: ");
|
||||
$sb->add_text_option("mail_style", "<br>Style URL: ");
|
||||
$sb->add_longtext_option("mail_fot", "<br>Footer (Use HTML)");
|
||||
$sb->add_label("<br><i>Should measure 550x110px. Use an absolute URL</i>");
|
||||
$event->panel->add_block($sb);
|
||||
}
|
||||
|
||||
public function onInitExt($event) {
|
||||
global $config;
|
||||
$config->set_default_string("mail_sub", $config->get_string("site_title")." - ");
|
||||
$config->set_default_string("mail_img", make_http("ext/mail/banner.png"));
|
||||
$config->set_default_string("mail_style", make_http("ext/mail/mail.css"));
|
||||
$config->set_default_string("mail_fot", "<a href='".make_http(make_link())."'>".$config->get_string("site_title")."</a>");
|
||||
}
|
||||
}
|
||||
class MailTest extends SimpleExtension {
|
||||
public function onPageRequest($event) {
|
||||
if($event->page_matches("mail/test")) {
|
||||
global $page;
|
||||
$page->set_mode("data");
|
||||
echo "Alert: uncomment this page's code on /ext/mail/main.php starting on line 33, and change the email address. Make sure you're using a server with a domain, not localhost.";
|
||||
/*
|
||||
echo "Preparing to send message:<br>";
|
||||
echo "created new mail object. sending now... ";
|
||||
$email = new Email("example@localhost.com", "hello", "hello world", "this is a test message.");
|
||||
$email->send();
|
||||
echo "sent.";
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user