Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - satine88

Pages: 1 [2] 3 4 5
16
Discussion & Troubleshooting / categorie image random
« on: November 14, 2009, 12:25:50 PM »
Hello,
Is it possible to set the home page just the thumbnail that
would represent each class (not [MOD] Category Image v1.0.2), but
a mod or images are displayed randomly.

I remove the block classes and put the new system.

Is this possible?
Thank you

17
Hello,
When I go on some page (top.php) I have this error:

Code: [Select]
Parse error: syntax error, unexpected '}' in /homez.312/iphonefo/www/includes/template.php(101) : eval()'d code on line 151

on line 151 :
Code: [Select]
       '='.preg_quote($this->start).'if(not?)?\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',


I read:
http://www.4homepages.de/forum/index.php?topic=23072.0
but I did not find the error

Template.php :
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: template.php                                         *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.7                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

class 
Template {

  var 
$no_error 0;
  var 
$val_cache = array();
  var 
$missing_val_cache = array();
  var 
$template_cache = array();
  var 
$template_path;
  var 
$template_extension "html";
  var 
$start "{";
  var 
$end "}";

  function 
Template($template_path "") {
    if (!@
is_dir($template_path)) {
      
$this->error("Couldn't open Template-Pack ".$template_path1);
    }
    
$this->template_path $template_path;
  }

  function 
register_vars($var_name$value "") {
    if (!
is_array($var_name)) {
      
$this->val_cache[$var_name] = $value;
    }
    else {
      
$this->val_cache array_merge($this->val_cache$var_name);
    }
  }

  function 
un_register_vars($var_list) {
    
$vars explode(","$var_list);
    foreach (
$vars as $val) {
      unset(
$this->val_cache[trim($val)]);
    }
  }

  function 
cache_templates($template_list) {
    
$template_list explode(","$template_list);
    foreach (
$template_list as $val) {
      
$val trim($val);
      if (!isset(
$this->template_cache[$val])) {
        
$this->get_template($val);
      }
    }
  }

  function 
get_template($template) {
    if (!isset(
$this->template_cache[$template])) {
      
$path $this->template_path."/".$template.".".$this->template_extension;
      
$line = @implode("", @file($path));
      if (empty(
$line)) {
        
$this->error("Couldn't open Template ".$path1);
      }

      if (
defined('EXEC_PHP_CODE') && EXEC_PHP_CODE == 0) {
        
$line preg_replace("/<[\?|%]+(php|=)?(.*)[\?|%]+>/siU"""$line);
        
$line preg_replace("/<script\s+language\s?=\s?[\"|']?php[\"|']?>
(.*)<\/script>/siU", "", $line);
      }

      $line = $this->compile_template($line);

      $this->template_cache[$template] = $line;
    }
    return $this->template_cache[$template];
  }

  function parse_template($template) {
    $template = $this->get_template($template);

    // Don't show error notices
    $old = error_reporting(E_ALL ^ E_NOTICE);

    extract($this->val_cache);
    ob_start();
    //echo $template;
    eval("?>".$template."<?php return 1;");

    
$str = ob_get_contents();
    ob_end_clean();

    // Reset error_reporting
    error_reporting(
$old);

    return 
$str;
  }

  function compile_template(
$template)
  {
    // Replace <?xml by printing them via php to avoid error messages when short_open_tags is on
    
$template = preg_replace('/<\?xml/i', "<?php echo '<?xml'?>
", $template);

    // Compile variables in PHP code
    preg_match_all(
        "/<[\?|%]+(php|=)?(.*)[\?|%]+>/siU",
        $template,
        $regs,
        PREG_SET_ORDER
    );

    for ($i = 0; isset($regs[$i]); $i++) {
      // Fix single quotes
      $parsed = preg_replace_callback(
        "/=\s*'(.*)".preg_quote($this->start)."([A-Z0-9_]+)".preg_quote($this->end)."(.*)';/Usi",
        array(&$this, '_fix_php_quotes'),
        $regs[$i][0]
      );

      $parsed = preg_replace_callback(
        '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',
        array(&$this, '_compile_php_var'),
        $parsed
      );

      $template = str_replace($regs[$i][0], $parsed, $template);
    }

    // Compile variables
    $template = preg_replace_callback(
        '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',
        array(&$this, '_compile_var'),
        $template
    );

    // Compile condition tags
    $template = preg_replace_callback(
        '='.preg_quote($this->start).'if(not?)?\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',
        array(&$this, '_compile_condition_start'),
        $template
    );

    $template = preg_replace_callback(
        '='.preg_quote($this->start).'endif(not?)?\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',
        array(&$this, '_compile_condition_end'),
        $template
    );

    return $template;
  }

  function _compile_php_var(&$matches) {
    return '{$' . trim($matches[1]) . '}';
  }

  function _fix_php_quotes(&$matches) {
    return '= "' . str_replace('"', '\\"', $matches[1])
           . $this->start.$matches[2].$this->end
           . str_replace('"', '\\"', $matches[3]) . '";';
  }

  function _compile_var(&$matches) {
    $name = trim($matches[1]);

    if (!isset($this->val_cache[$name])) {
        return $matches[0];
    }

    // Header and Footer are parsed in print_template()
    if ($name == 'header' || $name == 'footer') {
        return $matches[0];
    }

    return '<?php echo $' . $name . '?>';
  }

  function _compile_condition_start(&$matches) {
    $name = trim($matches[2]);

    if (!isset($this->val_cache[$name])) {
        return $matches[0];
    }

    if ($matches[1] == 'not' || $matches[1] == 'no') {
        return '<?php if (empty($' . $name . ') || $' . $name . ' === REPLACE_EMPTY){ ?>';
    }

    return '<?php if (!empty($' . $name . ') && $' . $name . ' !== REPLACE_EMPTY){ ?>';
  }

  function _compile_condition_end(&$matches) {
    $name = trim($matches[2]);

    if (!isset($this->val_cache[$name])) {
        return $matches[0];
    }

        return '<?php ?>';
  }

  function parse_array($array) {
    static $keys;

    foreach ($array as $key => $val) {
      if (is_array($val)) {
        $array[$key] = $this->parse_array($val);
      }
      else {
        if (!isset($keys) || count($keys) != count($this->val_cache)) {
          $keys = array_keys($this->val_cache);
          array_walk($keys, array(&$this, '_prepare_key'));
        }

        $array[$key] = str_replace($keys, $this->val_cache, $val);
      }
    }
    return $array;
  }

  function _prepare_key(&$item) {
    $item = $this->start.$item.$this->end;
  }

  function print_template($template) {
    if (strpos($template, $this->start.'header'.$this->end) !== false) {
      $header = $this->parse_template("header");
      $template = str_replace($this->start.'header'.$this->end, $header, $template);
    }

if (strpos($template, $this->start.'header_categorie'.$this->end) !== false) {
      $header = $this->parse_template("header_categorie");
      $template = str_replace($this->start.'header_categorie'.$this->end, $header, $template);
    }

if (strpos($template, $this->start.'header_details'.$this->end) !== false) {
      $header = $this->parse_template("header_details");
      $template = str_replace($this->start.'header_details'.$this->end, $header, $template);
    }

if (strpos($template, $this->start.'header_error'.$this->end) !== false) {
      $header = $this->parse_template("header_error");
      $template = str_replace($this->start.'header_error'.$this->end, $header, $template);
    }

if (strpos($template, $this->start.'header_home'.$this->end) !== false) {
      $header = $this->parse_template("header_home");
      $template = str_replace($this->start.'header_home'.$this->end, $header, $template);
    }

if (strpos($template, $this->start.'header_register'.$this->end) !== false) {
      $header = $this->parse_template("header_register");
      $template = str_replace($this->start.'header_register'.$this->end, $header, $template);
    }

if (strpos($template, $this->start.'header_search'.$this->end) !== false) {
      $header = $this->parse_template("header_search");
      $template = str_replace($this->start.'header_search'.$this->end, $header, $template);
    }

if (strpos($template, $this->start.'header_top'.$this->end) !== false) {
      $header = $this->parse_template("header_top");
      $template = str_replace($this->start.'header_top'.$this->end, $header, $template);
    }

if (strpos($template, $this->start.'contact'.$this->end) !== false) {
      $header = $this->parse_template("contact");
      $template = str_replace($this->start.'contact'.$this->end, $header, $template);
    }

    if (strpos($template, $this->start.'footer'.$this->end) !== false) {
      $footer = $this->parse_template("footer");
      $template = str_replace($this->start.'footer'.$this->end, $footer, $template);
    }

    print $this->clean_template($template);
  }

  function clean_template($template) {
    $search_array = array(
      '='.preg_quote($this->start).'([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',
      '='.preg_quote($this->start).'if(not?)?\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',
      '='.preg_quote($this->start).'endif(not?)?\s+([A-Z0-9_]+)'.preg_quote($this->end).'=Usi',
    );
    $replace_array = array(
      "",
      "",
      ""
    );
    $template = preg_replace($search_array, $replace_array, $template);

    return $template;
  }

  function error($errmsg, $halt = 0) {
    if (!$this->no_error) {
      global $user_info;
      //if (isset($user_info['user_level']) && $user_info['user_level'] == ADMIN){
        echo "<br /><font color='#FF0000'><b>Template Error</b></font>: ".$errmsg."<br />";
      /*} else {
        echo "<br /><font color='#FF0000'><b>An unexpected error occured. Please try again later.</b></font><br />";
      }*/
      if ($halt) {
        exit;
      }
    }
  }
} // end of class
?>

can you help me?

18
Discussion & Troubleshooting / Feed Rss and 4image
« on: November 04, 2009, 06:18:17 PM »
Hello,
Sorry to bother you, but you know how to make a feed with just the
New images have just added?

Thank you

19
Hello,
I want to display text in a page of a category (but not in others), is this possible?
Thank you

20
Bonjour,
Je souhaiterai afficher du texte dans un page d'une catégorie (mais pas dans les autres), est-ce possible ?
Merci

21
Discussion & Troubleshooting / Hosting Hostmonster
« on: September 27, 2009, 11:24:53 PM »
Hello,
Does anyone use the hosting Hostmonster?

Do you know if the script works with 4images hosting Hostmonster?

Thank you

22
Discussion & Troubleshooting / Page "xxx" in metatag
« on: August 17, 2009, 12:02:21 PM »
hello,
Does anyone know how to add the words "Page xxx" as a metatag
page, as if 10 pages, they all bear the same titles.

Thank you for your help

23
Français / "Page x" dans le metatag titre ?
« on: August 16, 2009, 09:20:18 PM »
Bonjour,
Est-ce que quelqu'un sais comment ajouter les mots "Page xxx" dans le metatag d'une page, car si on 10 pages, elles porteront toutes les mêmes titres.

Merci pour votre aide :)

24
Discussion & Troubleshooting / Error in search.php
« on: July 04, 2009, 07:03:18 PM »
Hello,
I have a problem with the script

Test :

Search with "new year"

http://www.fond-ecran-gratuit.biz/search.htm

Code: [Select]
Notice: Undefined variable: report_url in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/functions.php on line 431
/includes/functions.php on line 431 :

   "report_image_url" => $report_url,

This mod : http://www.4homepages.de/forum/index.php?topic=11447.0 (step 2)



Thanks :)

25
Discussion & Troubleshooting / Error : to add images
« on: November 08, 2008, 05:39:00 PM »
Hello
When I want to add images, I have this error

Error :
Code: [Select]
Warning: copy(./../data/media/66/big/11.jpg) [function.copy]: failed to open stream: Permission denied in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/admin/checkimages.php on line 492

Warning: rename(./../data/media/66/11.jpg,./../data/media/66/11.jpg.bak) [function.rename]: Permission denied in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/image_utils.php on line 180
Working on data/media/66/11.jpg file:
Error copying original file into data/media/66/big/ folder.
Error resizing image.
Image ajoutée: 11

26
Discussion & Troubleshooting / add user_loginform on a other site
« on: November 04, 2008, 06:31:33 PM »
Hello,
I want to insert user_loginform.htmln and search engine on a
other site, how?

Know what you insert code?

Thank you

27
Discussion & Troubleshooting / bug in search :(
« on: October 27, 2008, 08:21:32 PM »
Hello,
I have a bug, in search :
Code: [Select]
Notice: Undefined index: user_name in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/page_header.php on line 422

Notice: Undefined index: user_name in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/page_header.php on line 422

Notice: Undefined index: user_name in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/page_header.php on line 422

Notice: Undefined index: user_name in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/page_header.php on line 422

Notice: Undefined index: user_name in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/page_header.php on line 422

Notice: Undefined index: user_name in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/page_header.php on line 422

Notice: Undefined index: user_name in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/page_header.php on line 422

Notice: Undefined index: user_name in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/page_header.php on line 422

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.username FROM (wallbiz_images i, wallbiz_categories c) LEFT JOIN forumphpbb_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.image_id IN (36) AND c.cat_id = i.cat_id AND i.cat_id IN () ORDER BY image_name ASC, image_id ASC LIMIT 0, 12
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY image_name ASC, image_id ASC LIMIT 0, 12' at line 6

DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.username FROM (wallbiz_images i, wallbiz_categories c) LEFT JOIN forumphpbb_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND i.image_id IN (36) AND c.cat_id = i.cat_id AND i.cat_id IN () ORDER BY image_name ASC, image_id ASC LIMIT 999
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY image_name ASC, image_id ASC LIMIT 999' at line 6

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/5079565f25315af9bcd81d8cc489f6ec/web/includes/db_mysql.php on line 116


http://www.fond-ecran-gratuit.biz/search.htm

Can you help me ?

Thanks :)


28
Français / Une image : plusieurs tailles pour télécharger
« on: August 31, 2008, 12:25:35 PM »
Bonjour,
Je suis à la recherche d'un mod pour que l'image soit téléchargeble en différente taille :

exemple : une image peut être télécharger à une taille :
800 x 600 px
1.600 x 1.200 px

Sa existe ?

@++ ;)

29
Requests for paid modifications / Jobbörse / Template 4images : $$ ?
« on: August 29, 2008, 01:09:22 PM »
Good morning,

I would like to know, how much does it cost me a template for the script 4images if I give you a design html / css?


30
Français / Fatal error: Allowed memory size of
« on: August 17, 2008, 10:17:23 AM »
Bonjour,
Quand je souhaite ajouter de nouvelles images, j'ai parfois cette erreur :

Code: [Select]
Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 10788 bytes) in /home/www/8e9db6b241ff405fa7c20f606b063d7a/web/includes/image_utils.php on line 80
Est-ce que quelqu'un sais à quoi ça correspond ?

Merci pour votre aide

Pages: 1 [2] 3 4 5