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.


Messages - Trev

Pages: [1] 2
1
Mods & Plugins (Releases & Support) / Re: [Mod] Random image / Zufallsbild
« on: February 09, 2009, 03:39:49 PM »
Hi Nicky

Ja, das weiß ich :-)
Kann ich es evtl prozentual ausgeben?

Grüße von
Trev

Hey Du magst wohl auch Basketball?

2
Mods & Plugins (Releases & Support) / Re: [Mod] Random image / Zufallsbild
« on: February 09, 2009, 10:29:45 AM »
Hallo

ich habe anstatt die Thumbnails zu benutzen, die eigentlichen Bilder als Vorscheu genommen. Meine Bilder sind nicht sehr groß (400px breit und so 6okb)
Momentan werden die Fotos ja skaliert (150x125 oder so).
Aber ich habe ja auch breite und hohe Bilder und mit dem Randomimage Script wird ja das Bild dann verzerrt - zu breit oder zu hoch.
Wie kann ich es ändern?

Danke

3
Mods & Plugins (Releases & Support) / Re: [Mod] Random image / Zufallsbild
« on: February 02, 2009, 08:58:37 AM »
Hallo Nicky,

vielen Dank für den Kategorie Namen, dieser wird angezeigt, doch leider wird der Thumbnail nicht angezeigt!
Könntest Du mal schauen?

Dankeschön.

(Gelöst, es fehlte das
$cat_id = $row['cat_id'];)

4
Hmmm,

hat keiner eine Antwort auf meine Frage (siehe oben) ???

Bidde....  :oops:

LG

5
Hi all, hope you are fine !

I downloaded the random-image mod and would like to know:

how can I set this up to show the category of the picture?

Here is my code:
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: random_full.php                                      *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.0 for 4images 1.6.1                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (http://www.4homepages.de/4images/lizenz.php) für       *
 *    weitere Informationen.                                              *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (http://www.4homepages.de/4images/lizenz_e.php) for further         *
 *    information.                                                        *
 *                                                                        *
 *************************************************************************/

// PATH TO YOUR 4images Gallery
define('ROOT_PATH''./4images/');

include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');


$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

$sql "SELECT COUNT(*) as total_images
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL."
        "
;
$row $site_db->query_firstrow($sql);
$total_images $row['total_images'];

mt_srand((double)microtime() * 1000000);
$number = ($total_images 1) ? mt_rand(0$total_images 1) : 0;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_media_file, a.image_comments 
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL.
        LIMIT 
$number, 1";
$row $site_db->query_firstrow($sql);
$image_id $row['image_id'];
$cat_id $row['cat_id'];
$image_name $row['image_name'];
$image_comments $row['image_comments'];
$full_src = (is_remote($row['image_media_file'])) ? $row['image_media_file'] : ROOT_PATH.MEDIA_DIR."/".$cat_id."/".$row['image_media_file'];

echo 
"<img src=\"".$full_src."\" height=\"125\" width=\"150\" border=\"2\" alt=\"$image_name\"></a><br>\n";
echo 
'<font size="-2" face="Arial, Helvetica, sans-serif"><br>';

echo 
"$image_name\n";

?>

Thanks a lot

Trev

6
Discussion & Troubleshooting / Random Image... with Category
« on: January 28, 2009, 08:18:31 PM »
UPDATE: OOOPPPS --- I have posted this in to the Mods section, but can´t delete this out of this section. Sorry!

Message was:
Hi all, hope you are fine !

I downloaded the random-image mod and would like to know:

how can I set this up to show the category of the picture?

Here is my code:
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: random_full.php                                      *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.0 for 4images 1.6.1                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (http://www.4homepages.de/4images/lizenz.php) für       *
 *    weitere Informationen.                                              *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (http://www.4homepages.de/4images/lizenz_e.php) for further         *
 *    information.                                                        *
 *                                                                        *
 *************************************************************************/

// PATH TO YOUR 4images Gallery
define('ROOT_PATH''./4images/');

include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');


$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

$sql "SELECT COUNT(*) as total_images
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL."
        "
;
$row $site_db->query_firstrow($sql);
$total_images $row['total_images'];

mt_srand((double)microtime() * 1000000);
$number = ($total_images 1) ? mt_rand(0$total_images 1) : 0;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_media_file, a.image_comments 
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL.
        LIMIT 
$number, 1";
$row $site_db->query_firstrow($sql);
$image_id $row['image_id'];
$cat_id $row['cat_id'];
$image_name $row['image_name'];
$image_comments $row['image_comments'];
$full_src = (is_remote($row['image_media_file'])) ? $row['image_media_file'] : ROOT_PATH.MEDIA_DIR."/".$cat_id."/".$row['image_media_file'];

echo 
"<img src=\"".$full_src."\" height=\"125\" width=\"150\" border=\"2\" alt=\"$image_name\"></a><br>\n";
echo 
'<font size="-2" face="Arial, Helvetica, sans-serif"><br>';

echo 
"$image_name\n";

?>

Thanks a lot

Trev

7
Discussion & Troubleshooting / Re: Warning: Illegal offset type
« on: October 07, 2008, 06:30:50 PM »
You are right... my Host just updated PHP to 5.2 and now it works...

Thanks for all the tips... they where very helpful!
Cheers
Trev

8
Discussion & Troubleshooting / Re: Warning: Illegal offset type
« on: October 07, 2008, 12:49:19 PM »
Yes of course... would you be so kind and take a look?
Thanks!

Link: http://www.schmacke.batz.de/docs.zip

Hmm is there any other way to attach a file?

9
Discussion & Troubleshooting / Re: Warning: Illegal offset type
« on: October 06, 2008, 05:10:57 PM »
Yes I have allready done that. But same result. Nothing changes.

The funny thing is, I´ve got 4images on two different servers (smae host though) and both scripts don´t propably work. Same error message on both servers.....

10
Discussion & Troubleshooting / Re: Warning: Illegal offset type
« on: October 06, 2008, 04:52:26 PM »
No only on the Index page. It doesn´t show the undercategories.
Yep define('GET_CACHES', 1); is set on the page.



11
Discussion & Troubleshooting / Re: Warning: Illegal offset type
« on: October 06, 2008, 11:45:41 AM »
Hi there...

oh dear thats because I wanted to get the number of the lines to easy the reading.
It´s not possible to do that using the code.... sorry.
Just forget those formatting lines.

Can you help me on this one though?

Kann auch deutsch antworten.

Cheers

12
Discussion & Troubleshooting / Warning: Illegal offset type
« on: October 06, 2008, 10:41:34 AM »
Hi!

I´m having a problem with these failure messages:

Warning: Illegal offset type in d:\home\web34\fkev02\ftproot\www.xx-xx.de\4images\includes\functions.php on line 1172
Warning: Illegal offset type in d:\home\web34\fkev02\ftproot\www.xx-xx.de\4images\includes\functions.php on line 1175
Warning: Illegal offset type in d:\home\web34\fkev02\ftproot\www.xx-xx.de\4images\includes\functions.php on line 1172
Warning: Illegal offset type in d:\home\web34\fkev02\ftproot\www.xx-xx.de\4images\includes\functions.php on line 1175
Warning: Illegal offset type in d:\home\web34\fkev02\ftproot\www.xx-xx.de\4images\includes\functions.php on line 1172
Warning: Illegal offset type in d:\home\web34\fkev02\ftproot\www.xx-xx.de\4images\includes\functions.php on line 1175
Warning: Illegal offset type in d:\home\web34\fkev02\ftproot\www.xx-xx.de\4images\includes\functions.php on line 1108


Here is the code of my Functions.php:

Code: [Select]
  $num_subs = sizeof($visible_cat_cache);
  $sub_cat_list = "";
  $i = 1;
  foreach ($visible_cat_cache as $subcat_id) {
    if ($i <= $num_subs && $i <= $config['num_subcats']) {
      $sub_url = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$subcat_id);
[color=red] Line 1108: [/color]    $sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";
      if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= ", ";
      }
      if ($i == $config['num_subcats'] && $i < $num_subs) {
        $sub_cat_list .= " ...\n";
      }
    }
    $i++;
  }
  return $sub_cat_list;
}

function get_categories($cat_id = 0) {
  global $site_template, $site_db, $site_sess, $config, $lang;
  global $cat_cache, $cat_parent_cache, $new_image_cache, $subcat_ids;

  $cattable_width = ceil((intval($config['cat_table_width'])) / $config['cat_cells']);
  if ((substr($config['cat_table_width'],-1)) == "%") {
    $cattable_width .= "%";
  }

  if (!isset($cat_parent_cache[$cat_id])) {
    return "";
  }

  $visible_cat_cache = array();
  foreach ($cat_parent_cache[$cat_id] as $key => $val) {
    if (check_permission("auth_viewcat", $val)) {
      $visible_cat_cache[$key] = $val;
    }
  }

  if (empty($visible_cat_cache)) {
    return "";
  }

  $total = sizeof($visible_cat_cache);
  $table_columns = (intval($config['cat_cells'])) ? intval($config['cat_cells']) : 2;
  if ($total <= $table_columns) {
    $table_rows = 1;
  }
  else {
    $table_rows = $total / $table_columns;
    if ($total >= $table_columns && !is_integer($table_rows)) {
      $table_rows = intval($table_rows) + 1;
    }
  }

  $categories = "\n<table width=\"".$config['cat_table_width']."\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n<tr>\n<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
  $categories .= "<table border=\"0\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_cellspacing']."\">\n";
  $count = 0;
  $count2 = 0;
  foreach ($visible_cat_cache as $key => $category_id) {
    $categories .= "<tr>\n<td valign=\"top\">\n";

    $is_new = (isset($new_image_cache[$category_id]) && $new_image_cache[$category_id] > 0) ? 1 : 0;
    $num_images = (isset($cat_cache[$category_id]['num_images'])) ? $cat_cache[$category_id]['num_images'] : 0;

    $subcat_ids = array();
    get_subcat_ids($category_id, $category_id, $cat_parent_cache);

    if (isset($subcat_ids[$category_id])) {
      foreach ($subcat_ids[$category_id] as $val) {
[color=red][font=Verdana]1172: [/font][/color]       if (isset($new_image_cache[$val]) && $new_image_cache[$val] > 0) {
          $is_new = 1;
        }
        if (isset($cat_cache[$val]['num_images'])) {
          $num_images += $cat_cache[$val]['num_images'];
        }
      }
    }


Till now it worked out fine... but what is this failure? It mus be something to do with Categories
Can someone help me?

Cheers

13
Meinst Du?
Schau mal: Lösungsansätze oder gar Lösung?
http://vikjavev.no/highslide/forum/viewtopic.php?t=1340&highlight=iframe+search

Könnte das jemanden helfen? Ich komme da nicht weiter...

Wenn nicht, welche Slideshow meinst Du?

14
Mods & Plugins (Requests & Discussions) / Re: Details umgehen?
« on: February 25, 2008, 03:23:11 PM »
Prima, danke!

15
Hallo,

ich habe meine 4images iframed.
Der Mod klappt auch supi, bis auf, wenn man das Bild auf Originalgröße klickt, wird das Bild nicht außerhalb des iframes gezeigt.
Ich möchte auf Grund von Layoutproblemen, es erreichen, dass es außerhalb des iframes angezeigt wird.

Geht das? Kann mir jemand erklären wie?

Vielen Dank!

Pages: [1] 2