";
+
+ enviaMail($email_autor_post, "[".$desc_blog."] Nuevo mensaje en: ".$titulo_post."", $msg, EMAIL_ADMIN);
+ }
+
+ function obtenerComentarios($idArticulo="") {
+ $this->ejecutarConsulta("select * from ".tabla_prefijo."comentarios WHERE id_post=".$idArticulo." AND spam=0 order by fecha ASC");
+ return $this->mid_consulta;
+ }
+
+ function contarComentarios($idArticulo="") {
+ $this->ejecutarConsulta("select * from ".tabla_prefijo."comentarios WHERE id_post=".$idArticulo." AND spam=0");
+ return $this->contarRegistros();
+ }
+
+ function mostrarGravatar($email="") {
+ $emailg = $email;
+ $default = URL_CODICE."/images/noGravatar.jpg";
+ $size = 30;
+ $grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($emailg)."&default=".urlencode($default)."&size=".$size;
+ return "";
+ }
+
+}
+?>
\ No newline at end of file
diff --git a/classes/configuration.class.php b/classes/configuration.class.php
index 32b48ec..b73e807 100644
--- a/classes/configuration.class.php
+++ b/classes/configuration.class.php
@@ -45,9 +45,10 @@ class configuration extends Conexion_Mysql {
initLang($this->lang);
$this->urlFriendly = $this->get_option("url_friendly");
- $this->richText = $this->get_option("rich_text");
- $this->offset_city = $this->get_option("offset_city");
- $this->offset_time = $this->get_option("offset_time");
+ $this->richText = $this->get_option("rich_text");
+ $this->offsetCity = $this->get_option("offset_city");
+ $this->offsetTime = $this->get_option("offset_time");
+ $this->allowComments = $this->get_option("allow_comments");
} else {
if($isFeed) {
header("HTTP/1.0 503 Service Unavailable");
diff --git a/classes/gelato.class.php b/classes/gelato.class.php
index 2ea15a4..2b152cb 100644
--- a/classes/gelato.class.php
+++ b/classes/gelato.class.php
@@ -19,7 +19,7 @@ class gelato extends Conexion_Mysql {
function gelato() {
parent::Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
- $this->conf = new configuration();
+ $this->conf = new configuration();
}
function saveSettings($fieldsArray) {
diff --git a/classes/textile.class.php b/classes/textile.class.php
index f6c5607..4c6d30d 100644
--- a/classes/textile.class.php
+++ b/classes/textile.class.php
@@ -1,4081 +1,1135 @@
-arrays of replacement blocks
- * of text that are temporary removed from the input text to avoid
- * processing. Different functions use this replacement
- * functionality, and each shifts its own replacement array into
- * position 0 and removes it when finished. This avoids having
- * several replacement variables and/or functions clobbering
- * eachothers' replacement blocks.
- *
- * @private
- */
- var $repl = array();
-
- /**
- * The @c array containing temporary strings used in
- * replacement callbacks. *JHR*
- *
- * @private
- */
- var $tmp = array();
-
- /**
- * Instantiates a new Textile object. Optional options
- * can be passed to initialize the object. Attributes for the
- * options key are the same as the get/set method names
- * documented here.
- *
- * @param $options The @c array specifying the options to use for
- * this object.
- *
- * @public
- */
- function Textile($options = array()) {
- $this->options = $options;
- $this->options['filters'] = ($this->options['filters'] ? $this->options['filters'] : array());
- $this->options['charset'] = ($this->options['charset'] ? $this->options['charset'] : 'utf-8');
- $this->options['char_encoding'] = (isset($this->options['char_encoding']) ? $this->options['char_encoding'] : 1);
- $this->options['do_quotes'] = (isset($this->options['do_quotes']) ? $this->options['do_quotes'] : 1);
- $this->options['trim_spaces'] = (isset($this->options['trim_spaces']) ? $this->options['trim_spaces'] : 0);
- $this->options['smarty_mode'] = (isset($this->options['smarty_mode']) ? $this->options['smarty_mode'] : 1);
- $this->options['preserve_spaces'] = (isset($this->options['preserve_spaces']) ? $this->options['preserve_spaaces'] : 0);
- $this->options['head_offset'] = (isset($this->options['head_offset']) ? $this->options['head_offset'] : 0);
-
- if (is_array($this->options['css'])) {
- $this->css($this->options['css']);
- }
- $this->options['macros'] = ($this->options['macros'] ? $this->options['macros'] : $this->default_macros());
- if (isset($this->options['flavor'])) {
- $this->flavor($this->options['flavor']);
- } else {
- $this->flavor('xhtml1/css');
- }
- $this->_create_re();
- } // function Textile
-
- // getter/setter methods...
-
- /**
- * Used to set Textile attributes. Attribute names are the same
- * as the get/set method names documented here.
- *
- * @param $opt A @c string specifying the name of the option to
- * change or an @c array specifying options and values.
- * @param $value The value for the provided option name.
- *
- * @public
- */
- function set($opt, $value = NULL) {
- if (is_array($opt)) {
- foreach ($opt as $opt => $value) {
- $this->set($opt, $value);
- }
- } else {
- // the following options have special set methods
- // that activate upon setting:
- if ($opt == 'charset') {
- $this->charset($value);
- } elseif ($opt == 'css') {
- $this->css($value);
- } elseif ($opt == 'flavor') {
- $this->flavor($value);
- } else {
- $this->options[$opt] = $value;
- }
- }
- } // function set
-
- /**
- * Used to get Textile attributes. Attribute names are the same
- * as the get/set method names documented here.
- *
- * @param $opt A @c string specifying the name of the option to get.
- *
- * @return The value for the provided option.
- *
- * @public
- */
- function get($opt) {
- return $this->options[$opt];
- } // function get
-
- /**
- * Gets or sets the "disable html" control, which allows you to
- * prevent HTML tags from being used within the text processed.
- * Any HTML tags encountered will be removed if disable html is
- * enabled. Default behavior is to allow HTML.
- *
- * @param $disable_html If provided, a @c bool indicating whether or
- * not this object should disable HTML.
- *
- * @return A true value if this object disables HTML; a false value
- * otherwise.
- *
- * @public
- */
- function disable_html($disable_html = NULL) {
- if ($disable_html != NULL) {
- $this->options['disable_html'] = $disable_html;
- }
- return ($this->options['disable_html'] ? $this->options['disable_html'] : 0);
- } // function disable_html
-
- /**
- * Gets or sets the relative heading offset, which allows you to
- * change the heading level used within the text processed. For
- * example, if the heading offset is '2' and the text contains an
- * 'h1' block, an \
block will be output.
- *
- * @param $head_offset If provided, an @c integer specifying the
- * heading offset for this object.
- *
- * @return An @c integer containing the heading offset for this
- * object.
- *
- * @public
- */
- function head_offset($head_offset = NULL) {
- if ($head_offset != NULL) {
- $this->options['head_offset'] = $head_offset;
- }
- return ($this->options['head_offset'] ? $this->options['head_offset'] : 0);
- } // function head_offset
-
- /**
- * Assigns the HTML flavor of output from Textile. Currently
- * these are the valid choices: html, xhtml (behaves like "xhtml1"),
- * xhtml1, xhtml2. Default flavor is "xhtml1".
- *
- * Note that the xhtml2 flavor support is experimental and incomplete
- * (and will remain that way until the XHTML 2.0 draft becomes a
- * proper recommendation).
- *
- * @param $flavor If provided, a @c string specifying the flavor to
- * be used for this object.
- *
- * @return A @c string containing the flavor for this object.
- *
- * @public
- */
- function flavor($flavor = NULL) {
- if ($flavor != NULL) {
- $this->options['flavor'] = $flavor;
- if (preg_match('/^xhtml(\d)?(\D|$)/', $flavor, $matches)) {
- if ($matches[1] == '2') {
- $this->options['_line_open'] = '';
- $this->options['_line_close'] = '';
- $this->options['_blockcode_open'] = '';
- $this->options['_blockcode_close'] = '';
- $this->options['css_mode'] = 1;
- } else {
- // xhtml 1.x
- $this->options['_line_open'] = '';
- $this->options['_line_close'] = ' ';
- $this->options['_blockcode_open'] = '
';
- $this->options['css_mode'] = preg_match('/\/css/', $flavor);
- }
- if ($this->options['css_mode'] && !isset($this->options['css'])) { $this->_css_defaults(); }
- }
- return $this->options['flavor'];
- } // function flavor
-
- /**
- * Gets or sets the css support for Textile. If css is enabled,
- * Textile will emit CSS rules. You may pass a 1 or 0 to enable
- * or disable CSS behavior altogether. If you pass an associative array,
- * you may assign the CSS class names that are used by
- * Textile. The following key names for such an array are
- * recognized:
- *
- *
- *
class_align_right
- *
- * defaults to 'right'
- *
- *
class_align_left
- *
- * defaults to 'left'
- *
- *
class_align_center
- *
- * defaults to 'center'
- *
- *
class_align_top
- *
- * defaults to 'top'
- *
- *
class_align_bottom
- *
- * defaults to 'bottom'
- *
- *
class_align_middle
- *
- * defaults to 'middle'
- *
- *
class_align_justify
- *
- * defaults to 'justify'
- *
- *
class_caps
- *
- * defaults to 'caps'
- *
- *
class_footnote
- *
- * defaults to 'footnote'
- *
- *
id_footnote_prefix
- *
- * defaults to 'fn'
- *
- *
- *
- * @param $css If provided, either a @c bool indicating whether or
- * not this object should use css or an associative @c array
- * specifying class names to use.
- *
- * @return Either an associative @c array containing class names
- * used by this object, or a true or false value indicating
- * whether or not this object uses css.
- *
- * @public
- */
- function css($css = NULL) {
- if ($css != NULL) {
- if (is_array($css)) {
- $this->options['css'] = $css;
- $this->options['css_mode'] = 1;
- } else {
- $this->options['css_mode'] = $css;
- if ($this->options['css_mode'] && !isset($this->options['css'])) { $this->_css_defaults(); }
- }
- }
- return ($this->options['css_mode'] ? $this->options['css'] : 0);
- } // function css
-
- /**
- * Gets or sets the character set targetted for publication.
- * At this time, Textile only changes its behavior
- * if the 'utf-8' character set is assigned.
- *
- * Specifically, if utf-8 is requested, any special characters
- * created by Textile will be output as native utf-8 characters
- * rather than HTML entities.
- *
- * @param $charset If provided, a @c string specifying the
- * characater set to be used for this object.
- *
- * @return A @c string containing the character set for this object.
- *
- * @public
- */
- function charset($charset = NULL) {
- if ($charset != NULL) {
- $this->options['charset'] = $charset;
- if (preg_match('/^utf-?8$/i', $this->options['charset'])) {
- $this->char_encoding(0);
- } else {
- $this->char_encoding(1);
- }
- }
- return $this->options['charset'];
- } // function charset
-
- /**
- * Gets or sets the physical file path to root of document files.
- * This path is utilized when images are referenced and size
- * calculations are needed (the getimagesize() function is used to read
- * the image dimensions).
- *
- * @param $docroot If provided, a @c string specifying the document
- * root to use for this object.
- *
- * @return A @c string containing the docroot for this object.
- *
- * @public
- */
- function docroot($docroot = NULL) {
- if ($docroot != NULL) {
- $this->options['docroot'] = $docroot;
- }
- return $this->options['docroot'];
- } // function docroot
-
- /**
- * Gets or sets the 'trim spaces' control flag. If enabled, this
- * will clear any lines that have only spaces on them (the newline
- * itself will remain).
- *
- * @param $trim_spaces If provided, a @c bool indicating whether or
- * not this object should trim spaces.
- *
- * @return A true value if this object trims spaces; a false value
- * otherwise.
- *
- * @public
- */
- function trim_spaces($trim_spaces = NULL) {
- if ($trim_spaces != NULL) {
- $this->options['trim_spaces'] = $trim_spaces;
- }
- return $this->options['trim_spaces'];
- } // function trim_spaces
-
- /**
- * Gets or sets a parameter that is passed to filters.
- *
- * @param $filter_param If provided, a parameter that this object
- * should pass to filters.
- *
- * @return The parameter this object passes to filters.
- *
- * @public
- */
- function filter_param($filter_param = NULL) {
- if ($filter_param != NULL) {
- $this->options['filter_param'] = $filter_param;
- }
- return $this->options['filter_param'];
- } // function filter_param
-
- /**
- * Gets or sets the 'preserve spaces' control flag. If enabled, this
- * will replace any double spaces within the paragraph data with the
- * \  HTML entity (wide space). The default is 0. Spaces will
- * pass through to the browser unchanged and render as a single space.
- * Note that this setting has no effect on spaces within \