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

Pages: 1 2 [3] 4
31
Discussion & Troubleshooting / Re: IPTC and Exif are not displayed
« on: September 15, 2011, 01:59:23 PM »
Yes , i have checked ..it was enabled.


32
Discussion & Troubleshooting / Re: IPTC and Exif are not displayed
« on: September 02, 2011, 12:34:47 PM »
Hi,

Version 1.7.10.

when i install locally ,the IPTC and EXIF images are displaying but unfortunately it is not displaying in Live site.


I have used Microsoft Default pictures to test.

Thanks

Br,
satz

33
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

34
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

35
Mods & Plugins (Releases & Support) / Re: [Mod] Image Overlay Text
« on: July 23, 2011, 09:59:07 AM »
finally i have done this modifications for me and i want to share . i am newbie to 4images and php .

So please backup your files before do modifications.

About  mod:: Image Overlay Text or images  ads ,fully controllable thro admin.

@Developers==> if you find any mistakes please correct it

1.) open admin/settings.php find:

show_form_footer
($lang['save_changes'], ""2);

insert above code:

  show_table_separator
($setting_group[8], 2"setting_group_8");
  
show_setting_row("is_ads","radio");
  
show_setting_row("display_ads","textarea");


2.) find lang/english/admin.php "?>" add before:

/*-- Setting-Group 8 --*/
$setting_group[8]="Ads";
$setting['is_ads']="Want to display ads?";
$setting['display_ads']="HTML to place the ads over Image";


3.) find in details.php:

$site_template
->register_vars("comment_form"$comment_form);
  unset(
$comment_form);
// end if allow_comments


add After:

// mod ads
$ads="";
if(
$config['is_ads']){

  
$site_template->register_vars(array(
    
"ads" => $ads,
    
"display_ads" => $config['display_ads'],
	
));
  
  
$ads $site_template->parse_template("ads");
  
$site_template->register_vars("ads"$ads);
  unset(
$ads);
}
// mod ad


4.) create a new folder in your root and call it "js", copy the "jquery.min.js" from attachment in the new "js" folder.
4.1) open templates/yourtemplates/header.html and place the below code in between <head> </head> tag.
Code: [Select]
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript">
$(window).load(function(){
//for each description div...
$('div.description').each(function(){
//...set the opacity to 0...
$(this).css('opacity', 0);
//..set width same as the image...
$(this).css('width', $(this).siblings('img').width());
//...get the parent (the wrapper) and set it's width same as the image width... '
$(this).parent().css('width', $(this).siblings('img').width());
//...set the display to block
$(this).css('display', 'block');
});

$('div.wrapper').hover(function(){
//when mouse hover over the wrapper div
//get it's children elements with class descriptio
//and show it using fadeTo
$(this).children('.description').stop().fadeTo(500, 0.7);
},function(){
//when mouse out of the wrapper div
//use fadeTo to hide the div
$(this).children('.description').stop().fadeTo(500, 0);
});

});
</script>

5.) Open Templates\yourtemplates\style.css and place the below code at the end:
Code: [Select]
div.wrapper{
position:relative; /* important(so we can absolutely position the description div */
}
div.description{
position:absolute; /* absolute position (so we can position it where we want)*/
bottom:0px; /* position will be on bottom */
left:0px;
display:none; /* hide it
/* styling bellow */
background-color:black;
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size:15px;
color:red;
}
div.description_content{
padding:10px;
}

6.) goto templates/yourtemplates/details.html find:
Code: [Select]
{image}replace with the below one:
Code: [Select]
{if ads}
  {ads}
{endif ads}
{ifno ads}
 {image}
{endifno ads}

download the attached ads.html
and place it in templates/yourtemplates/ads.html

screenshots ==> when the mouse point the image,then the ad will be displayed

36
Sathish Thank you, i have done this already in Sessions.php but i need to redirect my indexed links to the new Permalink structure. so if someone is following the old link structure from search engines may ends up in the new one.

hi redirect to permalink structure is possible but there is loads of manual work we have to do.for each dynamic link have redirect.

Google and other major search engines has introduced canonical tag to overcome the duplicate links.

i have done little modification for details page alone  and i hope it will help you.

i am a newbie to 4images and novice to PHP[i am just learning here]

copy the below code into session.php  before ?>


if($image_id>0)
{
$site_template->register_vars(array(
      
"has_imageid"   => true,
      
"domain" =>"<link rel=\"canonical\"  href=\"".$script_url."/wallpaper".get_image_url($image_id).".htm\">"
        
));
}



goto templates/yourtemplates/header.html and paste the below code between <head> </head>
{if has_imageid}
{
domain}
{endif 
has_imageid}



Above changes will give you a URL Like <link rel="canonical" href= "http://www.yourdomain.com/wallpaper-someting-1.html">

37
Hi Budduke,

Thanks for your valuable reply.

currently am testing the mods in local  host.i am receiving the same error what lucifix received in your site.

I will wait for Newer one as facebook updated their SDK versions to 3.

I am just begginer in PHP and i am learning thro the open source.


38
@ V@no,

i used your optimized code for session.php and im extremely glad that with that help i reduced my server load to half. now i want to modify the permalink structure in .htaccess, i changed the structure on a demo site and it worked but i need help in one thing n that is Redirection of old permalink structure to the new one

right now i have this structure in .htaccess

RewriteRule ^img-(.*)-([0-9]+)\.htm$ details.php?image_id=$2&%{QUERY_STRING}

so when i change it to

RewriteRule ^Wallpaper-(.*)-([0-9]+)\.html$ details.php?image_id=$2&%{QUERY_STRING}


how do i redirect the old one to the new structure for Search engine bots and backlinks ? so if someone come from google's search result they go through the new structure instead of a finding a 404 error

regards
Yousaf

open /include/sessions.php and replace the below code with the old one.  


I didnt test the code and i hope it will work for you

/* ORIGINAL CODE
  function url($url, $amp = "&amp;") {
    global $l;
    $dummy_array = explode("#", $url);
    $url = $dummy_array[0];

    if ($this->mode == "get" && !preg_match("/".SESSION_NAME."=/i", $url)) {
      $url .= preg_match("/\?/", $url) ? "$amp" : "?";
      $url .= SESSION_NAME."=".$this->session_id;
    }

    if (!empty($l)) {
      $url .= preg_match("/\?/", $url) ? "$amp" : "?";
      $url .= "l=".$l;
    }

    $url .= (isset($dummy_array[1])) ? "#".$dummy_array[1] : "";
    return $url;
  }
*/
  
function url($url$amp "&amp;") {
    global 
$l$user_info;
    
$dummy_array explode("#"$url);
    
$url $dummy_array[0];
    
$url str_replace('&amp;''&'$url);
    if (!
defined('IN_CP')) {
      if (
strstr($url'index.php')) {
        
$url str_replace('index.php'''$url);
      }
      elseif (
strstr($url'search.php')) {
        if (
strstr($url'page=')) {
          
preg_match('#page=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('search.php''search.'.$matches[1].'.htm'$url);
            
$query str_replace('page='.$matches[1].'&'''$query);
            
$query str_replace('&page='.$matches[1], ''$query);
            
$query str_replace('page='.$matches[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('search.php''search.htm'$url);
        }
      }
      elseif (
strstr($url'lightbox.php')) {
        if (
strstr($url'page=')) {
          
preg_match('#page=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('lightbox.php''lightbox.'.$matches[1].'.htm'$url);
            
$query str_replace('page='.$matches[1].'&'''$query);
            
$query str_replace('&page='.$matches[1], ''$query);
            
$query str_replace('page='.$matches[1], ''$query);
            if (!empty(
$query)) {
                
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('lightbox.php''lightbox.htm'$url);
        }
      }
      elseif (
strstr($url'categories.php')) {
        if (
strstr($url'cat_id=') && strstr($url'page=')) {
          
preg_match('#cat_id=([0-9]+)&?#'$url$matches1);
          
preg_match('#page=([0-9]+)&?#'$url$matches2);
          if (isset(
$matches1[1]) && isset($matches2[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('categories.php''cat'.$matches1[1].'.'.$matches2[1].'.htm'$url);
            
$query str_replace('cat_id='.$matches1[1].'&'''$query);
            
$query str_replace('&cat_id='.$matches1[1], ''$query);
            
$query str_replace('cat_id='.$matches1[1], ''$query);
            
$query str_replace('page='.$matches2[1].'&'''$query);
            
$query str_replace('&page='.$matches2[1], ''$query);
            
$query str_replace('page='.$matches2[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
        elseif (
strstr($url'cat_id=')) {
          
preg_match('#cat_id=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$cat_url get_category_url($matches[1]);
            
$url   str_replace('categories.php''cat'.$cat_url.'.htm'$url);
            
$query str_replace('cat_id='.$matches[1].'&'''$query);
            
$query str_replace('&cat_id='.$matches[1], ''$query);
            
$query str_replace('cat_id='.$matches[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
        else {
          
$url str_replace('categories.php''cat.htm'$url);
        }
      }
      elseif (
strstr($url'details.php?image_id=')) {
        if (
strstr($url'image_id=') && strstr($url'mode=')) {
          
preg_match('#image_id=([0-9]+)&?#'$url$matches1);
          
preg_match('#mode=([a-zA-Z0-9]+)&?#'$url$matches2);
          if (isset(
$matches1[1]) && isset($matches2[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('details.php''wallpaper'.$matches1[1].'.'.$matches2[1].'.html'$url);
            
$query str_replace('image_id='.$matches1[1].'&'''$query);
            
$query str_replace('&image_id='.$matches1[1], ''$query);
            
$query str_replace('image_id='.$matches1[1], ''$query);
            
$query str_replace('mode='.$matches2[1].'&'''$query);
            
$query str_replace('&mode='.$matches2[1], ''$query);
            
$query str_replace('mode='.$matches2[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
        else {
          
preg_match('#image_id=([0-9]+)&?#'$url$matches);
          if (isset(
$matches[1])) {
            
$split explode('?'$url);
            
$url $split[0];
            
$query = @$split[1];
            
$url   str_replace('details.php''Wallpaper'.get_image_url($matches[1]).'.html'$url);
            
$query str_replace('image_id='.$matches[1].'&'''$query);
            
$query str_replace('&image_id='.$matches[1], ''$query);
            
$query str_replace('image_id='.$matches[1], ''$query);
            if (!empty(
$query)) {
              
$url .= '?' $query;
            }
          }
        }
      }
      elseif (
strstr($url'postcards.php?image_id=')) {
        
preg_match('#image_id=([0-9]+)&?#'$url$matches);
        if (isset(
$matches[1])) {
          
$split explode('?'$url);
          
$url $split[0];
          
$query = @$split[1];
          
$url   str_replace('postcards.php''postcard.img'.$matches[1].'.htm'$url);
          
$query str_replace('image_id='.$matches[1].'&'''$query);
          
$query str_replace('&image_id='.$matches[1], ''$query);
          
$query str_replace('image_id='.$matches[1], ''$query);
          if (!empty(
$query)) {
            
$url .= '?' $query;
          }
        }
      }
    }
    if (
$this->mode == "get" && strstr($url$this->session_id)) {
      
$url .= strpos($url'?') !== false '&' '?';
      
$url .= SESSION_NAME."=".$this->session_id;
    }
    if (!empty(
$l)) {
      
$url .= strpos($url'?') ? '&' '?';
      
$url .= "l=".$l;
    }
    
$url str_replace('&'$amp$url);
    
$url .= isset($dummy_array[1]) ? "#".$dummy_array[1] : "";
    return 
$url;
  }





39
This looks very promising... but I have a question:

What would happened when you signup with facebook account and your username is already taken?

I have also noticed that there is error with logout link. When you want to logout from gallery some FB code show up.
first question: It will add numbers to the end of the name until it gets a username that does not already exist.

second one: do you have php warnings being suppressed? I do know it makes a call to facebook to see if you are attached or not but I rechecked the code to make sure I removed that array that you say is showing up. Can you provide me with a link to see if it is the same thing?

Thx for you answers, here is attached screenshot of that error that i was talking about...




I am receiving the same error while logout.


40
@ sathishIPL,
It looks like it is logging into facebook correctly, just not into 4images.
You need to recheck the inserts to make sure you placed everything in the correct places.
If you can zip your changed files and send them to me I can take a look at them.


Thanks budduke !!!!

I will check my modifications and will get back to u.

One morething if you look my URL http://www.website.com/index.php?fb_status=1   ...If i login or logout [ it seems something wrong in the Session?] the URL remains the same ..



UPDATE::: successfully implemented ..thnks duke.
Problem with including fbstatus.php. .
As we include in global.php it should affect all files !

41
hi budduke,

could you please see attached screenshot?  it seems the site has not been logged via Facebook.



Is Facebook SDK has been changed?


42
Discussion & Troubleshooting / Re: Google Canonical
« on: July 15, 2011, 12:29:06 PM »
Quote
site.com/stuff/cat-nokia-7710-themes-27.htm?page=2
site.com/stuff/cat-nokia-7710-themes-27.htm?page=3

I mean how this pages are coming to you .It might come if you click the pagination in the comment system?

by clicking the next page in the comment?


43
Discussion & Troubleshooting / Re: Google Canonical
« on: July 15, 2011, 11:58:49 AM »
Quote
......site.com/stuff/cat-nokia-7710-themes-27.htm
site.com/stuff/cat-nokia-7710-themes-27.htm?page=2
site.com/stuff/cat-nokia-7710-themes-27.htm?page=3

I hope the above urls with page=2 and page=3 might be from comment pagination?

44
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

45
Hi Thanks for the reply,

It should be like youtube ,only dynamic text ads.

Pages: 1 2 [3] 4