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

Pages: [1]
1
Mods & Plugins (Requests & Discussions) / [MOD]HTML Sitemap
« on: March 17, 2012, 04:04:20 PM »
Hi All,

An another MOD from me, HTML Sitemap for 4images Gallery.

Installation::3 Minutes

1.Go to Yourwebsite/lang/main.php and look for ?>

And paste the below code above ?>
//-----------------------------------------------------
//--- Html Sitemap --------------------------------------
//-----------------------------------------------------

$lang['htmlsitemap_title']="Sitemap";
$lang['htmlsitemap_images']="Images Sitemap";
$lang['hrmlsitemap_cat']="Categories Sitemap";


2.Download the htmlsitemap.php and upload the file to the root directory

3.go to yourwebsite/templates/your templates/error.html and save the file as htmlsitemap.html [copy the error.html and save it as htmlsitemap.html]

3.a
find {lang_error} in htmlsitemap.html and replace with
 {lang_htmlsitemap


3.b find below code in htmlsitemap.html
<p>{error_msg}</p>
and repalce with below code
<!--HTML Sitemap -->
	
	
	
	
	
<
table border="0" width="500">
	
	
	
	
	
	
<
tr align="left">
	
	
	
	
	
	
	
<
th>{lang_htmlsitemap_images}</th>
	
	
	
	
	
	
	
<
th>{lang_htmlsitemap_cats}</th>
	
	
	
	
	
	
</
tr>
	
	
	
	

	
	
	
	
	
	
	
<
tr>
	
	
	
	
	
	
	
	
<
td width=250>
	
	
	
	
	
	
	
	
	
<
table width="250">
	

	
	
	
	
	
	
	
	
	
	
	
<
tr>
	
	
	
	
	
	
	
	
	
	
	
	
<
td>
	
	
	
	
	
	
	
	
	
	
	
	
	
{
htmlsitemap}
	
	
	
	
	
	
	
	
	
	
	
	
</
td>
	
	
	
	
	
	
	
	
	
	
	
</
tr>
	
	
	
	
	
	
	
	
	
</
table>
	
	
	
	
	
	
	
	
</
td>
	
	
	
	
	
	
	
	
<
td width="250" valign="top">
	
	
	
	
	
	
	
	
	
<
table BORDER="0">
	

	
	
	
	
	
	
	
	
	
	
	
<
tr>
	
	
	
	
	
	
	
	
	
	
	
	
<
td width="250" >
	
	
	
	
	
	
	
	
	
	
	
	
	
{
htmlsitemap_cat}
	
	
	
	
	
	
	
	
	
	
	
	
</
td>
	
	
	
	
	
	
	
	
	
	
	
</
tr>
	
	
	
	
	
	
	
	
	
</
table>
	
	
	
	
	
	
	
	
</
td>
	
	
	
	
	
	
	
</
tr>
	
	
	
	
	
</
table>


NOTE: htmlsitemap is nothing but copy of your error.html

thats it and now submit the sitemap to google wemaster tool

Currently it is hitting the database twice[ images and categories ].I will try to optimize it

 


2
Hi All,

The gif resizer class was not written by me.

It was taken from here
http://www.phpclasses.org/package/7353-PHP-Resize-animations-in-files-of-the-GIF-format.html.

I have just integrated into the 4images.

Goto Includes/image_utils.php

find the function resize_image_gd

function resize_image_gd($src$dest$quality$width$height$image_info) {
  global 
$convert_options;

  
$types = array(=> "gif"=> "jpeg"=> "png");
  if (
$convert_options['convert_gd2']) {
    
$thumb imagecreatetruecolor($width$height);
  }
  else {
    
$thumb imagecreate($width$height);
  }
  
$image_create_handle "imagecreatefrom".$types[$image_info[2]];
  if (
$image $image_create_handle($src)) {
    if (
$convert_options['convert_gd2']) {
      
imagecopyresampled($thumb$image0000$width$heightImageSX($image), ImageSY($image));
    }
    else {
      
imagecopyresized($thumb$image0000$width$heightImageSX($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)) ? 0;
}


Replace with the below code


function resize_image_gd($src$dest$quality$width$height$image_info) {
  global 
$convert_options;

  
$types = array(=> "gif"=> "jpeg"=> "png");
  if(
$types[$image_info[2]]=="gif"){
	
//require_once "gifresizer.php";
	
//Including our class
	
require(
ROOT_PATH.'includes/gifresizer.php');
	
$gr = new gifresizer;
	
//New Instance Of GIFResizer
	
$gr->temp_dir THUMB_TEMP_PATH//Used for extracting GIF Animation Frames
	
$gr->resize($src,$dest,$width,$height); //Resizing the animation into a new file.
  
}
  else{
  if (
$convert_options['convert_gd2']) {
    
$thumb imagecreatetruecolor($width$height);
  }
  else {
    
$thumb imagecreate($width$height);
  }
  
  
$image_create_handle "imagecreatefrom".$types[$image_info[2]];
  if (
$image $image_create_handle($src)) {
    if (
$convert_options['convert_gd2']) {
      
imagecopyresampled($thumb$image0000$width$heightImageSX($image), ImageSY($image));
    }
    else {
      
imagecopyresized($thumb$image0000$width$heightImageSX($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)) ? 0;
}


and download the gifresizer.php

Upload into the yourdomain/includes/gifresizer.php

It will resize your Gif Images without loss of animations.

Br,
Satz


3
Hi All,

This is my second MOD.

Hope i will contribute to 4images what am learning here.

DEMO::: http://satz.0fees.net/details.php?image_id=1


Please follow the below steps
step 1 : open templates/your templates/header.tml and insert the below code  after <head> section
<script src="./js/jquery.js" type="text/javascript"></script>


Step 1.1 : open templates/your templates/header.html  and insert  below code before </head> section

<script language="javascript" type="text/javascript">
// when the DOM is ready
$(function () {
  var 
img = new Image();
  
  
// wrap our new image in jQuery, then:
  
$(img)
    
// once the image has loaded, execute this code
    
.load(function () {
      
// set the image hidden by default    
      
$(this).hide();
    
      
// with the holding div #loader, apply:
      
$('#loader')
        
// remove the loading class (so no background spinner), 
        
.removeClass('loading')
        
// then insert our image
        
.append(this);
    
      
// fade our image in to create a nice effect
      
$(this).fadeIn();
    })
    
    
// if there was an error loading the image, react accordingly
    
.error(function () {
      
// notify the user that the image could not be loaded
    
})
    
    
// *finally*, set the src attribute of the new image to our image
    
.attr({
src:'{media_src}'
,alt:'{image_name}',
title:'{image_name}'});
 
});

</
script>


step 2: open templates\your templates\details.html  and find {image}

replce with below code
<div id="loader" class="loading">



</
div>



Step 3: open templates/your templates/style.css and add the below code at the end.
 #loader {
               
displayblock;
	
	
	
padding:8px;
	
	
	
border:solid;
	
	
	
border-color#dddddd #aaaaaa #aaaaaa #dddddd;
	
	
	
border-width1px 2px 2px 1px;
	
	
	
background-color:white;

        }

        
#loader.loading {
            
backgroundurl('images/spinner.gif'no-repeat center center;
        }



upload the spinner.gif into templates/your templates/images

create a new folder called Js in your domain root and upload the jquery.js into the js folder.
Additionally you can create a loader gif image in
 http://www.ajaxload.info/





4
Discussion & Troubleshooting / Microformats- search Engines RDF,MICROFORMAT
« on: December 22, 2011, 09:26:26 AM »
Hi all,

Have any one used hreview in Microformats?

It will used in 4images to display the ratings and votes while searching in google or yahoo or bing.

I have tried but am not able to complete it.

Does any one used or link to good tutorials? I have read google tutorial , but its vague and not able to understand it completely.

Thank you...!

Best Regards,
Satz

5
Discussion & Troubleshooting / Protect Images using PHP and .htaccess
« on: December 06, 2011, 02:20:34 PM »
Hi All,

How to protect a images in the folder?

for example anyone who knows 4images structure can access the exact image URL path to store the image

http://yourdomain/data/1/someimage.jpg

by typing the above image url ,user can download the images.

I know its not possible to protect the images in web directories 100%.

but by using php and .htaccess ,we can protect 90%.


Please guide me.


Thank you...!

br,
Satz

6
Discussion & Troubleshooting / IPTC and Exif are not displayed
« on: September 01, 2011, 12:15:32 PM »
Hi,

IPTC and Exif are details are not displayed.

How to display it ?

Please guide me.

Br,
Satz

7
Hi,

Please guide me how to disable lighbox for certain categories .

Where is  function add_to_lightbox () called?

I hope iis it in Show_Image().

Br,
Satz

8
Hi  all,

How to disable download button for particular category?

have to kill the session as well for the particular category.

the session will allow registered users to download the image by entering the raw URL like http://localhost/download.php?imageid=3

The main IDEA behind this i need to integrate PAYPAL for particular category.

 Users will have to pay  and download the image for particular category.If the payment is success then the session and download button should be enabled.

If it failed ,i need to destroy session and disable the download button


can we able to pass the session id to papal IPN ?


give me some ideas and suggestions.

Thank You....!

Best regards,
Sathish

9
Mods & Plugins (Releases & Support) / [Mod] Image Overlay Text
« on: May 14, 2011, 04:58:13 PM »
Hi all,

I am new to 4images and trying to add text ad on images, kindly help me on this.

Thank You......!


Best Regards,
SathishKumar





10
Mods & Plugins (Requests & Discussions) / Intergration Of Vanilla forum
« on: September 10, 2008, 07:54:44 AM »
Is there Any Possible to intergrate vanilla  forum and 4images?


Pages: [1]