Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Beta 2.09

  • Loading branch information...
commit 8e31184fb5d621a162e8bc57953d93091f650b1a 1 parent 760d554
@lborgman lborgman authored
Showing with 125 additions and 0 deletions.
  1. +51 −0 tests/in/bug988109.php
  2. +74 −0 util/fun.el
View
51 tests/in/bug988109.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to provide an HTML container for comments.
+ *
+ * Available variables:
+ * - $content: The array of content-related elements for the node. Use
+ * render($content) to print them all, or
+ * print a subset such as render($content['comment_form']).
+ * - $classes: String of classes that can be used to style contextually through
+ * CSS. It can be manipulated through the variable $classes_array from
+ * preprocess functions. The default value has the following:
+ * - comment-wrapper: The current template type, i.e., "theming hook".
+ * - $title_prefix (array): An array containing additional output populated by
+ * modules, intended to be displayed in front of the main title tag that
+ * appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ * modules, intended to be displayed after the main title tag that appears in
+ * the template.
+ *
+ * The following variables are provided for contextual information.
+ * - $node: Node object the comments are attached to.
+ * The constants below the variables show the possible values and should be
+ * used for comparison.
+ * - $display_mode
+ * - COMMENT_MODE_FLAT
+ * - COMMENT_MODE_THREADED
+ *
+ * Other variables:
+ * - $classes_array: Array of html class attribute values. It is flattened
+ * into a string within the variable $classes.
+ *
+ * @see template_preprocess_comment_wrapper()
+ * @see theme_comment_wrapper()
+ */
+?>
+<div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
+ <?php if ($content['comments'] && $node->type != 'forum'): ?>
+ <?php print render($title_prefix); ?>
+ <h2 class="title"><?php print t('Comments'); ?></h2>
+ <?php print render($title_suffix); ?>
+ <?php endif; ?>
+
+ <?php print render($content['comments']); ?>
+
+ <?php if ($content['comment_form']): ?>
+ <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
+ <?php print render($content['comment_form']); ?>
+ <?php endif; ?>
+</div>
View
74 util/fun.el
@@ -0,0 +1,74 @@
+;;; fun.el ---
+;;
+;; Filename: fun.el
+;; Description:
+;; Author:
+;; Maintainer:
+;; Created: 2012-01-15T23:25:49+0100
+;; Version:
+;; Last-Updated:
+;; By:
+;; Update #: 0
+;; URL:
+;; Keywords:
+;; Compatibility:
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+;;
+;;
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Change Log:
+;;
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 3, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Code:
+
+(defun cat-command ()
+ "A command for cats.
+From Eric Schulte on Emacs Devel 2012-01-15."
+ (interactive)
+ (require 'animate)
+ (let ((mouse "
+ ___00
+ ~~/____'>
+ \" \"")
+ (h-pos (floor (/ (window-height) 2)))
+ (contents (buffer-string))
+ (mouse-buffer (generate-new-buffer "*mouse*")))
+ (save-excursion
+ (switch-to-buffer mouse-buffer)
+ (insert contents)
+ (setq truncate-lines t)
+ (animate-string mouse h-pos 0)
+ (dotimes (_ (window-width))
+ (sit-for 0.01)
+ (dotimes (n 3)
+ (goto-line (+ h-pos n 2))
+ (move-to-column 0)
+ (insert " "))))
+ (kill-buffer mouse-buffer)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; fun.el ends here
Please sign in to comment.
Something went wrong with that request. Please try again.