• [MOD] Histogram 4 0 5 1
Currently:  

Author Topic: [MOD] Histogram  (Read 221396 times)

0 Members and 1 Guest are viewing this topic.

Offline mohab

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [MOD] Histogram [MOD] check new images
« Reply #60 on: May 12, 2006, 08:56:08 PM »
Also das Histogram Mod funzt sehr fein doch nun hab ich ein gröberes problem.
in zusamenhang mit them autothumb Mod
autothumb versucht thumbs von den hist_****.png bilder zu erstellen
was nicht sinn der sach ist
gibt es eine möglichkeit das zu umgehen.

Ob der thread jetzt in Check new Images mod oder in hist reingehört ?
Das problem hab ich erst seit Hist mod instaliert ist und natürlich kommen dann auch
die hist bilder auf die start seite als last added imag.
lg mohab

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Histogram
« Reply #61 on: May 12, 2006, 10:06:01 PM »
Deshalb ist es besser die Histogramme nicht im Kategorieordner, sondern in einem extra Ordner zu speichern. Um das abzuändern wäre folgendes zu erledigen.

1. einen neuen Ordner zum Speichern der Histogramme anlegen z.B.: 
/data/histo

2. im Code für das Histogramm in der details.php finde :
Code: [Select]
$hist_path = "data/media/".$cat_id."/";
und ändere in
Code: [Select]
$hist_path = "data/histo/";

damit wäre das Problem erledigt ...  :wink:

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Chicco

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • The Picture World
Re: [MOD] Histogram
« Reply #62 on: May 18, 2006, 09:31:58 AM »
Ich probier es nun nochmals auf English (Gott steh mir bei)

Is it then possible like that which in the Admin panel with the function deletion of pictures to delete the appropriate histogram? sowas like histo+ {image_name} or other…. Otherwise one has a daily terribly many dead pictures quasi on its server to lie about or must always laboriously by ftp the appropriate picture separately delete….

Sorry for my English


Wissen ist MACHT! Nix zu wissen macht aber auch nix! ;-)

Gruß
Ch¿cco

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [MOD] Histogram
« Reply #63 on: May 25, 2006, 11:14:11 PM »
Deshalb ist es besser die Histogramme nicht im Kategorieordner, sondern in einem extra Ordner zu speichern. Um das abzuändern wäre folgendes zu erledigen.

1. einen neuen Ordner zum Speichern der Histogramme anlegen z.B.: 
/data/histo

2. im Code für das Histogramm in der details.php finde :
Code: [Select]
$hist_path = "data/media/".$cat_id."/";
und ändere in
Code: [Select]
$hist_path = "data/histo/";

damit wäre das Problem erledigt ...  :wink:

mawenzi


not working for me, I have this error

Code: [Select]
Warning: imagecreatefromjpeg(data/histo/DSC_9510.jpg): failed to open stream: No such file or directory in /home/myanimw/public_html/4images/histo.php on line 14

Warning: imagesx(): supplied argument is not a valid Image resource in /home/myanimw/public_html/4images/histo.php on line 15

Warning: Wrong parameter count for max() in /home/myanimw/public_html/4images/histo.php on line 30

Warning: Wrong parameter count for max() in /home/myanimw/public_html/4images/histo.php on line 31

Warning: Wrong parameter count for max() in /home/myanimw/public_html/4images/histo.php on line 32

Warning: Division by zero in /home/myanimw/public_html/4images/histo.php on line 48

Warning: Division by zero in /home/myanimw/public_html/4images/histo.php on line 49

Warning: Division by zero in /home/myanimw/public_html/4images/histo.php on line 50

Warning: Division by zero in /home/myanimw/public_html/4images/histo.php on line 51

Warning: Division by zero in /home/myanimw/public_html/4images/histo.php on line 52

Warning: Division by zero in /home/myanimw/public_html/4images/histo.php on line 53

Warning: Division by zero in /home/myanimw/public_html/4images/histo.php on line 54

here is my histo.php

Code: [Select]
<?php
//      Histogram creation
//      Created by Anton Sparrius (Spaz) 6/9/05  anton_spaz@yahoo.com
//      Free to use and change, provided you keep these lines :)
//



                        
if (file_exists($hist_path.$hist_file)) {
                          
$im=imagecreatefromPNG($hist_path $hist_file);
                          
imagePNG($im);
                          
imagedestroy($im);
                        } else {
                        
$im=imagecreatefromjpeg($hist_path.$hist_image);
                        for(
$i=0;$i<imagesx($im);$i+=2)
                        {
                                for(
$j=0;$j<imagesy($im);$j++)
                                {
                                        
$rrggbb=imagecolorsforindex ($imimagecolorat($im,$i,$j));
                                        
$r[$rrggbb['red']]+=1;
                                        
$g[$rrggbb['green']]+=1;
                                        
$b[$rrggbb['blue']]+=1;
                                }
                        }
                        for (
$i=0;$i<256;$i++)
                        {
                                
$max[$i]=($r[$i]+$g[$i]+$b[$i])/3;
                        }
                        
$max_value=max($max)/150;
                        
$m[0]=max($r);
                        
$m[1]=max($b);
                        
$m[2]=max($g);
                        
$max_rgb=max($m)/150;

                        
$im_out imageCreate (280164);
                        
$background imageColorAllocate($im_out,70,70,70);
                        
$hist=ImageColorAllocate($im_out,0,0,0);
                        
$white=ImageColorAllocate($im_out,143,143,134);
                        
$red=ImageColorAllocate($im_out,255,0,0);
                        
$green=ImageColorAllocate($im_out,0,255,0);
                        
$blue=ImageColorAllocate($im_out,0,0,255);
                        
$ry=107;
                        
$gy=107;
                        
$by=107;

                        for(
$i=0;$i<256;$i++)
                        {
                                
imageLine($im_out$i+14157$i+14157-($max[$i]/$max_value),$white);
                                
imageLine($im_out$i+13$ry$i+14157-($r[$i]/$max_rgb), $red);
                                
imageLine($im_out$i+13$gy$i+14157-($g[$i]/$max_rgb), $green);
                                
imageLine($im_out$i+13$by$i+14157-($b[$i]/$max_rgb), $blue);
                                
$ry=157-($r[$i]/$max_rgb);
                                
$gy=157-($g[$i]/$max_rgb);
                                
$by=157-($b[$i]/$max_rgb);
                        }
                        
imageLine($im_out,13,158,270,158,$hist);
                        
imageLine($im_out,13,6,270,6,$hist);
                        
imageLine($im_out,13,6,13,158,$hist);
                        
imageLine($im_out,270,6,270,158,$hist);

                        
imagePNG($im_out,$hist_path $hist_file);
                        
imageDestroy($im);
                        
imagedestroy($im_out);
                        
$im=imagecreatefromPNG($hist_path $hist_file);
                        
imagePNG($im);
                        
imagedestroy($im);
                        }
?>


and here part from details.php

Code: [Select]
//--- Start Histogramm 27.02.2006 ----------------------
$hist_image = $image_row['image_media_file'] ;
$hist_file= "hist_".substr($hist_image,0,strlen($hist_image)-4).".png";
$hist_path = "data/histo/";

$ext = substr($hist_image, strpos($hist_image, ".")+1, strlen($hist_image));
$AutorisedImageType = array ("jpg", "jpeg", "JPG", "JPEG");  // Dateitypen für die das Histogramm gezeigt werden soll

if (in_array($ext, $AutorisedImageType)) {
   $histogramm_image = "<img src='histo.php?hist_image=".$hist_image."&hist_file=".$hist_file."&hist_path=".$hist_path."' border=\"1\">";
} else {
   $histogramm_image = REPLACE_EMPTY;
}

$site_template->register_vars(array(
   "histogramm" => "Histogram:",
   "histogramm_image" => $histogramm_image
));
//--- Ende Histogramm 27.02.2006 ------------------------

it's something wrong???

Offline l1some

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Histogram
« Reply #64 on: June 04, 2006, 01:25:01 AM »
Got this mod working with 4images 1.7.1-inter/with phpnuke 7.4 WORKS GREAT!!

Offline SAD

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Туристические ФотоАльбомы
Re: [MOD] Histogram
« Reply #65 on: June 08, 2006, 09:11:36 AM »
Quote
Warning: imagesx(): supplied argument is not a valid Image resource in /home/myanimw/public_html/4images/histo.php on line 15

in histo.php add after
Code: [Select]
//      Free to use and change, provided you keep these lines :)
//

this
Code: [Select]
if (isset($HTTP_GET_VARS['hist_image']) || isset($HTTP_POST_VARS['hist_image'])) {
  $hist_image = (isset($HTTP_GET_VARS['hist_image'])) ? stripslashes(trim($HTTP_GET_VARS['hist_image'])) : stripslashes(trim($HTTP_POST_VARS['hist_image']));
}
else {
  $hist_image = "";
}

if (isset($HTTP_GET_VARS['hist_path']) || isset($HTTP_POST_VARS['hist_path'])) {
  $hist_path = (isset($HTTP_GET_VARS['hist_path'])) ? stripslashes(trim($HTTP_GET_VARS['hist_path'])) : stripslashes(trim($HTTP_POST_VARS['hist_path']));
}
else {
  $hist_path = "";
}

if (isset($HTTP_GET_VARS['hist_file']) || isset($HTTP_POST_VARS['hist_file'])) {
  $hist_file = (isset($HTTP_GET_VARS['hist_file'])) ? stripslashes(trim($HTTP_GET_VARS['hist_file'])) : stripslashes(trim($HTTP_POST_VARS['hist_file']));
}
else {
  $hist_file = "";
}
Sergey


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Histogram
« Reply #66 on: June 08, 2006, 10:16:59 AM »
@Sergey
... I think you already found an answer  ...  :wink:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline ahbut

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: [MOD] Histogram
« Reply #67 on: July 03, 2006, 06:14:05 AM »
sorry, due to hardly any english on this topic, I did install the mod, but not showing anything.
isn't there suppose to have a background image in the image folder as well for this to work??
or the hist.php, suppose to draw everything??
if there's a background image required, anyone have it that I can download off??

Offline troopers

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • weltimperator.de
Re: [MOD] Histogram
« Reply #68 on: August 21, 2006, 04:46:25 PM »
With SAD's soloution it works fine.

thx a lot :D
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weltimperator.de

Offline Eosbirdy

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Histogram
« Reply #69 on: September 20, 2006, 09:08:04 PM »
     
Hallo Mawenzi,

ich habe versucht das Histogram Mod komplett so einzubinden wie es hier beschrieben ist. Ich bekomme keine Fehlermeldungen, aber es werden keine Histogram Bilder angezeigt. Bei dem Aufruf des Bildes in meiner Galerie steht zwar als text Histogramm mit einem kleinen Viereck wie als aob er das Bild nicht findet.
Hier mein Link:

http://www.rainer-vogel.de/galerie/details.php?image_id=36

Ich habe komplett die histo.php im Ordner /data/histo. Die details.html im Template Ordner und die details.php im Root. Den Quellcode habe ich aus deinen vorhergehenden Postings komplett übernommen. Würdest du mir bitte helfen?

Danke schonmal, Birdy.

Offline udo w.

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] Histogram
« Reply #70 on: September 21, 2006, 02:45:15 PM »
Hallo zusammen,

ich hab genau das gleiche Problem...
Beim Bearbeiten der "histo.php ist mir auch aufgefallen, der der Eintrag "$filepath" nicht vorhanden ist ...  :?:

Hängt es vielleicht damit zusammen?

Grüßle
Udo

Offline Eosbirdy

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Histogram
« Reply #71 on: September 21, 2006, 07:03:31 PM »
Habe jetzt alles wieder ein und ausgebaut. Ich bin schon fast am verzeifeln. Warum zeigt er mir nichts an??  8O Wer könnte mir denn mal die details.html, die histo.php und die details.php von einer lauffähigen Seite zu mailen? Wie gesagt bei mir zeigt er nur den Text "Histogram" und ein kleines Viereck an.
Würde mich freuen über eine Antwort. Gut Udo, das ich nicht der einzige bin wo es nicht klappert.. :roll: :roll:

Offline udo w.

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: [MOD] Histogram
« Reply #72 on: September 21, 2006, 09:13:45 PM »
Habe jetzt alles wieder ein und ausgebaut. Ich bin schon fast am verzeifeln. Warum zeigt er mir nichts an??  8O Wer könnte mir denn mal die details.html, die histo.php und die details.php von einer lauffähigen Seite zu mailen? Wie gesagt bei mir zeigt er nur den Text "Histogram" und ein kleines Viereck an.
Würde mich freuen über eine Antwort. Gut Udo, das ich nicht der einzige bin wo es nicht klappert.. :roll: :roll:

Ich hab fast den ganzen Tag damit verbracht, das Histogramm ans laufen zu bekommen - und?  weißes Blatt mit rotem Kreuz.... :thumbdown:
Keine Ahnung, was ich noch anstellen soll.... :cry: :cry: :cry:
Vielleicht hat ja wirklich jemand erbarmen und schickt uns seine Daten... :)

Udo

Offline izone

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: [MOD] Histogram
« Reply #73 on: September 22, 2006, 10:48:56 AM »
@ mawenzi  or/amd V@no

I've installed this mod and it works great, thank you!

The only part that I still cann't make it works is this one:

Quote
1. einen neuen Ordner zum Speichern der Histogramme anlegen z.B.: 
/data/histo

2. im Code für das Histogramm in der details.php finde :

Code:
$hist_path = "data/media/".$cat_id."/";
und ändere in

Code:
$hist_path = "data/histo/";

damit wäre das Problem erledigt ... 

As some other here has problem with it. Could you please give us some more help on this?

When I make these changes the histogram picture wont show att all! Is there any more places which must changes?

I and many other here will appreciate it much more!

Best Regards!

Offline izone

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: [MOD] Histogram
« Reply #74 on: September 23, 2006, 10:40:06 AM »
 8O

Nobody knows how to fix it? :cry: