public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Banned Phrases"); $sb->add_label("One per line, lines that start with slashes are treated as regex<br/>"); $sb->add_longtext_option("banned_words"); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Downtime"); $sb->add_bool_option("downtime", "Disable non-admin access: "); $sb->add_longtext_option("downtime_message", "<br>"); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Random Images List"); // custom headers $sb->add_int_option("random_images_list_count", "Amount of Random images to display "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Site Description"); $sb->add_text_option("site_description", "Description: "); $sb->add_text_option("site_keywords", "<br>Keywords: "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Word Filter"); $sb->add_longtext_option("word_filter"); $sb->add_label("<br>(each line should be search term and replace term, separated by a comma)"); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { global $config; $sb = new SetupBlock("Holiday Theme"); $sb->add_bool_option("holiday_aprilfools", "Enable April Fools"); $event->panel->add_block($sb); }
public function onSetupBuilding($event) { $sb = new SetupBlock("Blocks"); $sb->add_label("See <a href='" . make_link("ext_doc/blocks") . "'>the docs</a> for formatting"); $sb->add_longtext_option("blocks_text"); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Google Analytics"); $sb->add_text_option("google_analytics_id", "Analytics ID: "); $sb->add_label("<br>(eg. UA-xxxxxxxx-x)"); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Sitemap"); $sb->add_bool_option("sitemap_generatefull", "Generate full sitemap"); $sb->add_label("<br>(Enabled: every image and tag in sitemap, generation takes longer)"); $sb->add_label("<br>(Disabled: only display the last 50 uploads in the sitemap)"); $event->panel->add_block($sb); }
public function onSetupBuilding($event) { $sb = new SetupBlock("Archive Handler Options"); $sb->add_text_option("archive_tmp_dir", "Temporary folder: "); $sb->add_text_option("archive_extract_command", "<br>Extraction command: "); $sb->add_label("<br>%f for archive, %d for temporary directory"); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Amazon S3"); $sb->add_text_option("amazon_s3_access", "Access key: "); $sb->add_text_option("amazon_s3_secret", "<br>Secret key: "); $sb->add_text_option("amazon_s3_bucket", "<br>Bucket: "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Blotter"); $sb->add_int_option("blotter_recent", "<br />Number of recent entries to display: "); $sb->add_text_option("blotter_color", "<br />Color of important updates: (ABCDEF format) "); $sb->add_choice_option("blotter_position", array("Top of page" => "subheading", "In navigation bar" => "left"), "<br>Position: "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Custom HTML Headers"); // custom headers $sb->add_longtext_option("custom_html_headers", "HTML Code to place within <head></head> on all pages<br>"); // modified title $sb->add_choice_option("sitename_in_title", array("none" => 0, "as prefix" => 1, "as suffix" => 2), "<br>Add website name in title"); $event->panel->add_block($sb); }
/** * @test */ public function compileCodeShouldCallExpressionTransformer() { $transformer = \Mockery::mock('PhpSpock\\Specification\\ExpressionTransformer'); $transformer->shouldReceive('transform')->with('$foo = 1')->andReturn('baz'); $block = new SetupBlock(); $block->setExpressionTransformer($transformer); $block->setExpressions(array('$foo = 1')); $this->assertEquals('baz;', $block->compileCode()); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sort_by = array(); $sort_by['Alphabetical'] = 'a'; $sort_by['Tag Count'] = 't'; $sb = new SetupBlock("Browser Search"); $sb->add_bool_option("disable_search_suggestions", "Disable search suggestions: "); $sb->add_label("<br>"); $sb->add_choice_option("search_suggestions_results_order", $sort_by, "Sort the suggestions by:"); $event->panel->add_block($sb); }
public function onSetupBuilding($event) { $sb = new SetupBlock("Image Resize"); $sb->add_bool_option("resize_enabled", "Allow resizing images: "); $sb->add_label("<br>Preset/Default Width: "); $sb->add_int_option("resize_default_width"); $sb->add_label(" px"); $sb->add_label("<br>Preset/Default Height: "); $sb->add_int_option("resize_default_height"); $sb->add_label(" px"); $sb->add_label("<br>(enter 0 for no default)"); $event->panel->add_block($sb); }
public function receive_event(Event $event) { if ($event instanceof TextFormattingEvent) { $event->formatted = $this->filter($event->formatted); $event->stripped = $this->filter($event->stripped); } if ($event instanceof SetupBuildingEvent) { $sb = new SetupBlock("Word Filter"); $sb->add_longtext_option("word_filter"); $sb->add_label("<br>(each line should be search term and replace term, separated by a comma)"); $event->panel->add_block($sb); } }
public function onSetupBuilding(SetupBuildingEvent $event) { $counters = array(); foreach (glob("ext/home/counters/*") as $counter_dirname) { $name = str_replace("ext/home/counters/", "", $counter_dirname); $counters[ucfirst($name)] = $name; } $sb = new SetupBlock("Home Page"); $sb->add_longtext_option("home_links", 'Page Links (Use BBCode, leave blank for defaults)'); $sb->add_longtext_option("home_text", "<br>Page Text:<br>"); $sb->add_choice_option("home_counter", $counters, "<br>Counter: "); $event->panel->add_block($sb); }
public function onSetupBuilding($event) { $counters = array(); foreach (glob("ext/home/counters/*") as $counter_dirname) { $name = str_replace("ext/home/counters/", "", $counter_dirname); $counters[ucfirst($name)] = $name; } $sb = new SetupBlock("Home Page"); $sb->add_longtext_option("home_links", 'Page Links - Example: [/post/list|Posts]<br>'); $sb->add_longtext_option("home_text", "<br>Page Text:<br>"); $sb->add_choice_option("home_counter", $counters, "<br>Counter: "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $privs = array(); $privs['Safe Only'] = 's'; $privs['Safe and Unknown'] = 'su'; $privs['Safe and Questionable'] = 'sq'; $privs['Safe, Questionable, Unknown'] = 'squ'; $privs['All'] = 'sqeu'; $sb = new SetupBlock("Image Ratings"); $sb->add_choice_option("ext_rating_anon_privs", $privs, "Anonymous: "); $sb->add_choice_option("ext_rating_user_privs", $privs, "<br>Users: "); $sb->add_choice_option("ext_rating_admin_privs", $privs, "<br>Admins: "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Pools"); $sb->add_int_option("poolsMaxImportResults", "Max results on import: "); $sb->add_int_option("poolsImagesPerPage", "<br>Images per page: "); $sb->add_int_option("poolsListsPerPage", "<br>Index list items per page: "); $sb->add_int_option("poolsUpdatedPerPage", "<br>Updated list items per page: "); $sb->add_bool_option("poolsInfoOnViewImage", "<br>Show pool info on image: "); $sb->add_bool_option("poolsShowNavLinks", "<br>Show 'Prev' & 'Next' links when viewing pool images: "); $sb->add_bool_option("poolsAutoIncrementOrder", "<br>Autoincrement order when post is added to pool:"); //$sb->add_bool_option("poolsAdderOnViewImage", "<br>Show pool adder on image: "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Banned Phrases"); $sb->add_label("One per line, lines that start with slashes are treated as regex<br/>"); $sb->add_longtext_option("banned_words"); $failed = array(); foreach ($this->get_words() as $word) { if ($word[0] == '/') { if (preg_match($word, "") === false) { $failed[] = $word; } } } if ($failed) { $sb->add_label("Failed regexes: " . join(", ", $failed)); } $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Tagger"); $sb->add_int_option("ext_tagger_search_delay", "Delay queries by "); $sb->add_label(" milliseconds."); $sb->add_label("<br/>Limit queries returning more than "); $sb->add_int_option("ext_tagger_tag_max"); $sb->add_label(" tags to "); $sb->add_int_option("ext_tagger_limit"); $event->panel->add_block($sb); }
public function receive_event(Event $event) { global $config, $database, $page, $user; if (is_null($this->theme)) { $this->theme = get_theme_object($this); } if ($event instanceof SetupBuildingEvent) { $sb = new SetupBlock("Downtime"); $sb->add_bool_option("downtime", "Disable non-admin access: "); $sb->add_longtext_option("downtime_message", "<br>"); $event->panel->add_block($sb); } if ($event instanceof PageRequestEvent) { if ($config->get_bool("downtime")) { $this->check_downtime($event); $this->theme->display_notification($page); } } }
public function receive_event(Event $event) { global $config, $database, $page, $user; if (is_null($this->theme)) { $this->theme = get_theme_object($this); } if ($event instanceof DisplayingImageEvent) { $this->theme->links_block($page, $this->data($event->image)); } if ($event instanceof SetupBuildingEvent) { $sb = new SetupBlock("Link to Image"); $sb->add_text_option("ext_link-img_text-link_format", "Text Link Format: "); $event->panel->add_block($sb); } if ($event instanceof InitExtEvent) { //just set default if empty. $config->set_default_string("ext_link-img_text-link_format", '$title - $id ($ext $size $filesize)'); } }
public function compileCode() { return ' try { ' . parent::compileCode() . ' } catch(\\Exception $e) { $__specification_Exception = $e; } '; }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Mailing Options"); $sb->add_text_option("mail_sub", "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 onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Pools"); $sb->add_int_option("poolsMaxImportResults", "Max results on import: "); $sb->add_int_option("poolsImagesPerPage", "<br>Images per page: "); $sb->add_int_option("poolsListsPerPage", "<br>Index list items per page: "); $sb->add_int_option("poolsUpdatedPerPage", "<br>Updated list items per page: "); $sb->add_bool_option("poolsInfoOnViewImage", "<br>Show pool info on image: "); //$sb->add_bool_option("poolsAdderOnViewImage", "<br>Show pool adder on image: "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Forum"); $sb->add_int_option("forumTitleSubString", "Title max long: "); $sb->add_int_option("forumThreadsPerPage", "<br>Threads per page: "); $sb->add_int_option("forumPostsPerPage", "<br>Posts per page: "); $sb->add_int_option("forumMaxCharsPerPost", "<br>Max chars per post: "); $event->panel->add_block($sb); }
public function onSetupBuilding(SetupBuildingEvent $event) { $sb = new SetupBlock("Image Rotate"); $sb->add_bool_option("rotate_enabled", "Allow rotating images: "); $sb->add_label("<br>Default Orientation: "); $sb->add_int_option("rotate_default_deg"); $sb->add_label(" deg"); $event->panel->add_block($sb); }