Mostly just adding the Link to comments.

This commit is contained in:
green-ponies (jgen) 2012-02-07 21:52:11 -05:00
parent 0cdc303397
commit 2d443f0be9
16 changed files with 40 additions and 9 deletions

View File

@ -2,6 +2,7 @@
/* /*
* Name: Comment Word Ban * Name: Comment Word Ban
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: For stopping spam and other comment abuse * Description: For stopping spam and other comment abuse
* Documentation: * Documentation:

View File

@ -2,6 +2,7 @@
/* /*
* Name: Bulk Add * Name: Bulk Add
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: Bulk add server-side images * Description: Bulk add server-side images
* Documentation: * Documentation:
@ -30,7 +31,9 @@ class BulkAdd extends SimpleExtension {
$this->theme->display_admin_block(); $this->theme->display_admin_block();
} }
/**
* Generate the necessary DataUploadEvent for a given image and tags.
*/
private function add_image($tmpname, $filename, $tags) { private function add_image($tmpname, $filename, $tags) {
assert(file_exists($tmpname)); assert(file_exists($tmpname));

View File

@ -29,6 +29,9 @@ class ET extends SimpleExtension {
} }
} }
/**
* Collect the information and return it in a keyed array.
*/
private function get_info() { private function get_info() {
global $config, $database; global $config, $database;
global $_event_listeners; // yay for using secret globals \o/ global $_event_listeners; // yay for using secret globals \o/

View File

@ -2,6 +2,7 @@
/* /*
* Name: Featured Image * Name: Featured Image
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: Bring a specific image to the users' attentions * Description: Bring a specific image to the users' attentions
* Documentation: * Documentation:

View File

@ -2,7 +2,8 @@
/* /*
* Name: Handle Flash * Name: Handle Flash
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Description: Handle Flash files * Link: http://code.shishnet.org/shimmie2/
* Description: Handle Flash files. (No thumbnail is generated for flash files)
*/ */
class FlashFileHandler extends DataHandlerExtension { class FlashFileHandler extends DataHandlerExtension {

View File

@ -2,7 +2,8 @@
/* /*
* Name: Handle SVG * Name: Handle SVG
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Description: Handle SVG files * Link: http://code.shishnet.org/shimmie2/
* Description: Handle SVG files. (No thumbnail is generated for SVG files)
*/ */
class SVGFileHandler implements Extension { class SVGFileHandler implements Extension {

View File

@ -2,6 +2,7 @@
/* /*
* Name: IP Ban * Name: IP Ban
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: Ban IP addresses * Description: Ban IP addresses
* Documentation: * Documentation:

View File

@ -1,8 +1,9 @@
<?php <?php
/* /*
* Name: Logging (Database) * Name: Logging (Database)
* Author: Shish * Author: Shish <webmaster@shishnet.org>
* Description: Keep a record of SCore events * Link: http://code.shishnet.org/shimmie2/
* Description: Keep a record of SCore events (in the database).
* Visibility: admin * Visibility: admin
*/ */

View File

@ -2,6 +2,7 @@
/* /*
* Name: News * Name: News
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: Show a short amount of text in a block on the post list * Description: Show a short amount of text in a block on the post list
* Documentation: * Documentation:

View File

@ -2,6 +2,7 @@
/* /*
* Name: Image Scores (Numeric) * Name: Image Scores (Numeric)
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: Allow users to score images * Description: Allow users to score images
* Documentation: * Documentation:

View File

@ -2,6 +2,7 @@
/* /*
* Name: Random Image * Name: Random Image
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: Do things with a random image * Description: Do things with a random image
* Documentation: * Documentation:

View File

@ -2,6 +2,7 @@
/* /*
* Name: Image Ratings * Name: Image Ratings
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: Allow users to rate images "safe", "questionable" or "explicit" * Description: Allow users to rate images "safe", "questionable" or "explicit"
*/ */

View File

@ -2,6 +2,7 @@
/* /*
* Name: Regen Thumb * Name: Regen Thumb
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Description: Regenerate a thumbnail image * Description: Regenerate a thumbnail image
* Documentation: * Documentation:

View File

@ -2,6 +2,7 @@
/* /*
* Name: Site Description * Name: Site Description
* Author: Shish <webmaster@shishnet.org> * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* License: GPLv2 * License: GPLv2
* Visibility: admin * Visibility: admin
* Description: A description for search engines * Description: A description for search engines

View File

@ -1,7 +1,8 @@
<?php <?php
/* /**
* Name: Tag List * Name: Tag List
* Author: Shish * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* Description: Show the tags in various ways * Description: Show the tags in various ways
*/ */
@ -107,13 +108,18 @@ class TagList extends SimpleExtension {
return make_link("post/list/$u_tag/1"); return make_link("post/list/$u_tag/1");
} }
/**
* Get the minimum number of times a tag needs to be used
* in order to be considered in the tag list.
* @retval int
*/
private function get_tags_min() { private function get_tags_min() {
if(isset($_GET['mincount'])) { if(isset($_GET['mincount'])) {
return int_escape($_GET['mincount']); return int_escape($_GET['mincount']);
} }
else { else {
global $config; global $config;
return $config->get_int('tags_min'); return $config->get_int('tags_min'); // get the default.
} }
} }
@ -170,6 +176,8 @@ class TagList extends SimpleExtension {
$tags_min = $this->get_tags_min(); $tags_min = $this->get_tags_min();
$starts_with = $this->get_starts_with(); $starts_with = $this->get_starts_with();
// check if we have a cached version
$cache_key = "data/tag_cloud-" . md5("tc" . $tags_min . $starts_with) . ".html"; $cache_key = "data/tag_cloud-" . md5("tc" . $tags_min . $starts_with) . ".html";
if(file_exists($cache_key)) {return file_get_contents($cache_key);} if(file_exists($cache_key)) {return file_get_contents($cache_key);}
@ -205,6 +213,8 @@ class TagList extends SimpleExtension {
$tags_min = $this->get_tags_min(); $tags_min = $this->get_tags_min();
$starts_with = $this->get_starts_with(); $starts_with = $this->get_starts_with();
// check if we have a cached version
$cache_key = "data/tag_alpha-" . md5("ta" . $tags_min . $starts_with) . ".html"; $cache_key = "data/tag_alpha-" . md5("ta" . $tags_min . $starts_with) . ".html";
if(file_exists($cache_key)) {return file_get_contents($cache_key);} if(file_exists($cache_key)) {return file_get_contents($cache_key);}
@ -239,6 +249,8 @@ class TagList extends SimpleExtension {
global $database; global $database;
$tags_min = $this->get_tags_min(); $tags_min = $this->get_tags_min();
// check if we have a cached version
$cache_key = "data/tag_popul-" . md5("tp" . $tags_min) . ".html"; $cache_key = "data/tag_popul-" . md5("tp" . $tags_min) . ".html";
if(file_exists($cache_key)) {return file_get_contents($cache_key);} if(file_exists($cache_key)) {return file_get_contents($cache_key);}

View File

@ -1,7 +1,8 @@
<?php <?php
/* /*
* Name: Database Upgrader * Name: Database Upgrader
* Author: Shish * Author: Shish <webmaster@shishnet.org>
* Link: http://code.shishnet.org/shimmie2/
* Description: Keeps things happy behind the scenes * Description: Keeps things happy behind the scenes
* Visibility: admin * Visibility: admin
*/ */