0
$this->setFilter("caption", "markup_post_text");
0
$this->respondTo("delete_post", "delete_file");
0
$this->respondTo("filter_post", "filter_post");
0
+ $this->respondTo("new_post_options", "alt_text_field");
0
+ $this->respondTo("edit_post_options", "alt_text_field");
0
if (!file_exists(INCLUDES_DIR."/caches/phpthumb/"))
0
mkdir(INCLUDES_DIR."/caches/phpthumb/");
0
public function feed_content($post) {
0
- return self::image_tag_for($post
->filename, 500, 500)."<br /><br />".$post->caption;
0
+ return self::image_tag_for($post
, 500, 500)."<br /><br />".$post->caption;
0
public function delete_file($post) {
0
if ($post->feather != "photo") return;
0
public function filter_post($post) {
0
if ($post->feather != "photo") return;
0
- $post->image = $this->image_tag_for($post
->filename);
0
+ $post->image = $this->image_tag_for($post
);
0
- public function image_tag_for($filename, $max_width = 500, $max_height = null, $more_args = "q=100") {
0
+ public function image_tag_for($post, $max_width = 500, $max_height = null, $more_args = "q=100") {
0
+ $filename = $post->filename;
0
$ext = pathinfo($filename, PATHINFO_EXTENSION);
0
$config = Config::current();
0
- return '<a href="'.$config->chyrp_url.$config->uploads_path.$filename.'"><img src="'.$config->chyrp_url.'/feathers/photo/lib/phpThumb.php?src='.$config->chyrp_url.$config->uploads_path.urlencode($filename).'&w='.$max_width.'&h='.$max_height.'&f='.$ext.'&'.$more_args.'" alt="'.$filename.'" /></a>';
0
+ return '<a href="'.$config->chyrp_url.$config->uploads_path.$filename.'"><img src="'.$config->chyrp_url.'/fsdffeathers/photo/lib/phpThumb.php?src='.$config->chyrp_url.$config->uploads_path.urlencode($filename).'&w='.$max_width.'&h='.$max_height.'&f='.$ext.'&'.$more_args.'" alt="'.fallback($post->alt_text, $filename, true).'" /></a>';
0
+ public function alt_text_field($post = null) {
0
+ if (isset($post) and $post->feather != "photo") return;
0
+ if (isset($_GET['feather']) and $_GET['feather'] != "photo") return;
0
+ <label for="option_alt_text"><?php echo __("Alt-Text", "photo"); ?></label>
0
+ <input class="text" type="text" name="option[alt_text]" value="<?php echo fix(fallback($post->alt_text, "", true)); ?>" id="alt_text" />