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 - batu544

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 23
91
Mods & Plugins (Releases & Support) / Re: MOD WIKIPEDIA
« on: June 04, 2010, 02:26:32 PM »
Hi all -
              when I tried to install this mod for categories.. I got the following error message in my server error log..
Code: [Select]
[Fri Jun 04 07:46:42 2010] [error] [client 207.46.xxx.xxxx] PHP Warning:  simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: I/O warning : failed to load external entity &quot;http://de.wikipedia.org/w/api.php?format=xml&amp;action=parse&amp;page=Amanda%20Bynes&quot; in /home/xxxxxx/public_html/includes/functions.php on line 1959
[Fri Jun 04 07:46:42 2010] [error] [client 207.46.xxx.xxx] PHP Warning:  simplexml_load_file(http://de.wikipedia.org/w/api.php?format=xml&amp;action=parse&amp;page=Amanda%20Bynes) [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: failed to open stream: no suitable wrapper could be found in /home/xxxxxxx/public_html/includes/functions.php on line 1959
[Fri Jun 04 07:46:42 2010] [error] [client 207.46.xxx.xxx] PHP Warning:  simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: URL file-access is disabled in the server configuration in /home/xxxxxx/public_html/includes/functions.php on line 1959


Could anyone please let me know, how to fix this issue ?

Thanks,
batu544

92
Discussion & Troubleshooting / Re: image codes for sites
« on: June 04, 2010, 09:07:31 AM »
Hi,
    Here you go..
[Mod] Display image codes on details page (image permalink)

http://www.4homepages.de/forum/index.php?topic=17912.0


but, as always.. please search before creating a topic..  :)


Thanks,
batu544

93
Chit Chat / Re: For moderators.... MOD marked as SPAM..
« on: June 04, 2010, 08:55:54 AM »
Hi V@no,
                 There is a small mistake in that mod.. only a typo error :)    In the subject line I typed the image as iamge .. but I have not done correction, because I fear, it may again flagged as SPAM.. so could you please correct it..  :)


Thanks,
batu544

94
Chit Chat / Re: For moderators.... MOD marked as SPAM..
« on: June 03, 2010, 08:30:34 PM »
Which MOD, I saw your MOD annotation on the fly, and this is not marked as SPAM, or what  Mod you mean?


The topic title is [MOD] Random iamge on home page with flash and the link to that topic is  ==> http://www.4homepages.de/forum/index.php?topic=27350.0


I can't see this mod in this forum.. I just noted this topic url just after posting the mod..

Thanks,
batu544

95
Hi,
    Before using this little change could anyone please let me know what is the use of   resize_image_gd_thumb function ?

Quote
Code: [Select]
function resize_image_gd_thumb($src, $dest, $quality, $width, $height, $image_info) {
  global $convert_options;

$xpos = 0;
$ypos = 0;

      if ($width > $height) {
        $xpos = ceil((($width - $height) / 2) - ($width - $height));
      } elseif ($height > $width) {
        $ypos = ceil((($height - $width) / 2)- ($height - $width));
      } else {
        $xpos = 0;
        $ypos = 0;
      }

  $types = array(1 => "gif", 2 => "jpeg", 3 => "png");
  if ($convert_options['convert_gd2']) {
    $thumb = imagecreatetruecolor(150, 150);
  }
  else {
    $thumb = imagecreate(150, 150);
  }
  $image_create_handle = "imagecreatefrom".$types[$image_info[2]];
  if ($image = $image_create_handle($src)) {
    if ($convert_options['convert_gd2']) {
      imagecopyresampled($thumb, $image, $xpos, $ypos, 0, 0, $width, $height, ImageSX($image), ImageSY($image));
    }
    else {
      imagecopyresized($thumb, $image, $xpos, $ypos, 0, 0, $width, $height, ImageSX($image), ImageSY($image));
    }

    if ($image_info[2] == 3) {
      $quality = 9;
    }

    $image_handle = "image".$types[$image_info[2]];
    $image_handle($thumb, $dest, $quality);
    imagedestroy($image);
    imagedestroy($thumb);
  }
  return (file_exists($dest)) ? 1 : 0;
}

function create_thumbnail($src, $dest, $quality, $dimension, $resize_type) {
  global $convert_options;

  if (file_exists($dest)) {
    @unlink($dest);
  }
  $image_info = (defined("IN_CP")) ? getimagesize($src) : @getimagesize($src);
  if (!$image_info) {
    return false;
  }

if ($image_info[0] > $image_info[1]) {
$width = ceil($image_info[0] / ($image_info[1]/150));
$height = 150;
} elseif ($image_info[1] > $image_info[0]) {
$width = 150;
$height = ceil($image_info[1] / ($image_info[0]/150));
} else {
$width = 150;
$height = 150;
}

  $resize_handle = "resize_image_".$convert_options['convert_tool']."_thumb";
  if ($resize_handle($src, $dest, $quality, $width, $height, $image_info)) {
    @chmod($dest, CHMOD_FILES);
    return true;
  }
  else {
    return false;
  }
}
I don't see any use of this function and I feel its unnecessary..


Please correct me, if I am wrong..


Thanks,
batu544

Edit: ..  My mistake.. Its working fine.  :mrgreen:  ( my php knowledge is a BIG zero.. )



96
Chit Chat / For moderators.... MOD marked as SPAM..
« on: June 03, 2010, 06:11:56 PM »
Hi,
    I just posted one mod and don't know why it automatically flagged as SPAM.. Could any moderator please mark that mod as clean ?

After that, this post can be deleted..

Thanks,
batu544

97
Hi,
    Here again an another random image mod .. :)  . This mod is different from the other random image mods in the following ways..

1. It uses a .swf file to show the random images.
2. Image transition happens in couple of nice effects.
3. All the play and pause control appears inside the .swf player, so, it will save some space on your website . :)
4. If you want you can view the random images on full screen also.

Well.. now starts the steps..

Step 1 :

1.1.  Download the attached imagerotator.swf and swfobject.js file. ( unzip the imagerotator.zip file)
 
Step 2 :

2.1      In the below code change all www.yourdomain.com to your actual domain name and save it as xml.php.

Code: [Select]
<?php
header
("Content-type: text/xml; charset=utf-8");
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: xml.php                                              *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.x                                                *
 *                                                                        *
 *    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 / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH''./');

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;
}

// NUMBER OF IMAGES TO DISPLAY 
$num_images 10;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_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."
        ORDER BY RAND()
        LIMIT 
$num_images";
$result $site_db->query($sql);
echo 
"<?xml version='1.0' encoding='UTF-8'?>
\n";
echo "<playlist version=\"1\" xmlns=\"http://xspf.org/ns/0/\">\n";
echo " <trackList>\n";
while ($row = $site_db->fetch_array($result)){
  $image_id = $row['image_id'];
  $cat_id = $row['cat_id'];
  $image_name = $row['image_name'];
  $thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : MEDIA_DIR."/".$cat_id."/".$row['image_thumb_file'];
  echo " <track>\n";
  echo " <title>$image_name</title>\n";
  echo " <creator>www.yourdomain.com</creator>\n";
  echo " <location>http://www.yourdomain.com/$thumb_src</location>\n";
  echo " <info>http://www.yourdomain.com/details.php?image_id=$image_id</info>\n";
  echo " </track>\n\n\n";
}
echo " </trackList>\n";
echo "</playlist>\n";

?>



Step 3 :

   3.1        Now upload all three files into your root folder.

   3.2  Open your templates/your-folder/home.html file and place the following code to show the random images.. Change the www.yourdomain.com with your actual domain name.

Code: [Select]
<div id="container">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this rotator.
</div>
 <script type="text/javascript" src="./swfobject.js"></script>
 <script type="text/javascript">
var s1 = new SWFObject("./imagerotator.swf","rotator","336","280","9");
s1.addVariable("file","http://www.yourdomain.com/xml.php");
s1.addVariable("width","340");
s1.addVariable("height","280");
s1.addVariable("backcolor","0x000000");
s1.addVariable("screencolor","0xFFFFFF");
s1.addVariable("overstretch","none");
s1.addVariable("usefullscreen","false");
s1.write("container");
</script>

   
All the variable are mentioned in the above code are self explanatory.. You can change those as per your requirement.

For more variable details you can follow this url ==> http://developer.longtailvideo.com/trac/wiki/ImageRotatorVars


Demo : bhwallpapers.com



Now you are done.. :)


Thanks,
batu544

98
Hi budduke,
                   Its great to know that its doable :) . I think image ratio approach will be a good option. May be following ratio details will help you..

Code: [Select]
"wide" => "1.6",
"normal" => "1.33",
"iphone" => "0.67",
"normal5.4" => "1.25",
"HD" => "1.78",
"multi4.3" => "2.67",
"multi16.5" => "3.2",
"other" => "0"

Thanks,
batu544

99
Hi budduke,
                              After a long time I tried to put this MOD in my gallery and made all the changes in my test gallery. After doing the changes, I tried to resize one wide screen (1280x800) image and one normal (1600x1200) image to a lower size image and the output size came up like below..

1280x800 resized :
Resize option selected actual resized image
1024x7681024x640
800x600800x500
1280x7201152x720

1600x1200 size image ;
Resize option selected actual resized image
800x600800x600
1024x7681024x768
1280x8001066x800
1400x10501400x1050

After seeing this, I thought, it would be great if we only resize the a widescreen image to other small wide-screen format image and normal (4:3) resolution image to other smaller size images.

So, now the questions are ..

1. Is it possible to make the changes in the code, to display only different widescreen resolutions on the screen, if the image is actually a widescreen image and  display only normal resolution options, if the image is a normal resolution image ?

2. Right now if we are selecting to open the resize image in a new window then the address bar looks like

www.yourdomain.com/download.php?action=resize&image_id=4609&multi_download_select=8  

Is it possible to make some changes ( may be in .htaccess or some other file ) so that the url will be like ..

www.yourdomain.com/r-image-name-image_id-1280x800.htm   ?

1280x800 will be different for different size images...



Any help on this is appreciated... !! :)


Thanks,
batu544

100
Chit Chat / Re: Very good example how powerfull 4images could be !
« on: June 02, 2010, 08:19:15 AM »
Hi,
    yes, they are using 4image in there website. I am not sure what do you mean my showcase.. but I think here you can find some website names which uses 4image..

http://www.4homepages.de/resources/



thanks,
batu544

101
hi,
    Please provide your website link.. let me see the error in actuals.. may be I can help you after that..

Thanks,
batu544

102
scrat,
          Please let us know, what exactly you did ?

Thanks,
batu544

103
Hi,
     Please search in the forum, before posting .. Its already discussed somewhere in this forum.

Thanks,
batu544

104
Mods & Plugins (Requests & Discussions) / Thumbnail of fixed size
« on: May 31, 2010, 02:10:41 PM »
Hi,
   Is it possible to create fixed size thumbnails ? Right now whenever I am creating a thumbnail its creating it with 150 width or 150 height depending on the image size. and If I am uploading a image of wide resolution, then the thumbnail is also generating like that..( the height of the thumbnail is less than the other thumbnails )
    but I want to creat the thumbnails of a constant size 200x200 size.If the image is extra wide or height is more than the width, then it should create the thumbnails by just cropping the extra widths from center..
   
    It will be a great help, if someone can help me on this..
   

Thanks,
batu544

105
Sumale.nin,

                I am not sure .. but I think the below code should work fine for png, gif and jpg extensions..

Code: [Select]
<?php

$img 
$_GET['img'];
$watermark imagecreatefrompng('watermark.png');

$watermark_width imagesx($watermark);
$watermark_height imagesy($watermark);
$image imagecreatetruecolor($watermark_width$watermark_height);
//$image = imagecreatefromjpeg("$img");
$image = @imageCreateFromString(file_get_contents("$img"));
$size getimagesize("$img");
$dest_x $size[0] - $watermark_width 5;
$dest_y $size[1] - $watermark_height 5;

header("Content-Type: ".$size['mime']);

imagecopy($image$watermark$dest_x$dest_y00$watermark_width$watermark_height);

//imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, 100);
//imagejpeg($image);
   
switch ($size[2]) {
      case 
1:
         
imageGIF($image);
         break;
      case 
2:
         
imageJPEG($imageNULL100);
         break;
      case 
3:
         
imagePNG($image);
         break;
         }

imagedestroy($image);
imagedestroy($watermark);
return 
true ;
?>


MrAndrew ,

   Never mind, one or two points are influenced by your code..  :)



Thanks,
batu544

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 23