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

Pages: [1] 2 3 4 5 ... 14
1
Discussion & Troubleshooting / Description not appearing
« on: November 20, 2018, 09:39:00 PM »
Hello,

I changed the hosting of the site. Now I have PHP7, so, I uploaded the db_mysqli.php file of the last version and change config.php to mysqli.
Everything is working fine but image description don't appear on images. But on control panel is fine. I have 1.7.13 version.

Anyone knows what's wrong?


SOLVED

This code:

/*
  MOD MEDIA SITES
  BEGIN INSERT
*/
    $text = media_sites_bbcode($text);
/*
  MOD MEDIA SITES
  END INSERT
*/


... was blocking description!

2
Mods & Plugins (Requests & Discussions) / Shopping cart
« on: April 21, 2016, 10:53:43 PM »
Hello,

I need the registered users of my sites to be able to add one or more images to a shopping cart and then to be able to buy that images.
Is there a plugin for what I want?

Thanks for your attention.

3
Discussion & Troubleshooting / Can't add more than 80 images.
« on: February 11, 2016, 12:48:20 PM »
Hello.

I can't add more than 80 images on checkimages.php.
When I do that it appears: no images added, with or without thumbnails.

Does anyone knows what to do to fix this?

4
Mods & Plugins (Requests & Discussions) / Shopping cart
« on: September 22, 2015, 11:11:07 PM »
Hello,

I need the registered users of my sites to be able to add one or more images to a shopping cart and then to be able to buy that images.
Is there a plugin for what I want?

Thanks for your attention.

5
Mods & Plugins (Requests & Discussions) / Re: Password for Categories
« on: September 22, 2015, 11:00:45 PM »
That's just perfect!
Thanks for your atention :)

6
Mods & Plugins (Requests & Discussions) / Password for Categories
« on: September 18, 2015, 06:32:55 PM »
Hello,

Is there a way to protect a category with a password?
For example: I want the images of a category to be protected with a password that I give manually to a user.

7
Sorry, I didn't explain me well.
For me, the edit and erase buttons on image pages are not appearing since some weeks ago.

8
admin_links is not working for me. I can't see EDIT or ERASE buttons on images pages.

Any suggestion?

9
Discussion & Troubleshooting / Re: Admin_links
« on: October 12, 2014, 08:44:05 PM »
I have {if admin_links}{admin_links}{endif admin_links} on both files and nothing appears...

10
Discussion & Troubleshooting / Admin_links
« on: October 12, 2014, 07:03:07 PM »
admin_links is not working for me. I can't see EDIT or ERASE buttons on images pages.
What are the files used for this tag's?

11
I am looking for a MOD similar to this:
http://codecanyon.net/item/like-2-unlock-for-jquery/2822035

Any idea?

12
Hello.

How can I change this:
for image --->http://www.your-site.com/img-imagename-andnumber.htm
category --->http://www.your-site.com/cat-categoryname-andnumber.htm

To this?
for image --->http://www.your-site.com/imagename.htm
category --->http://www.your-site.com/categoryname.htm


Here's "my" MOD:

Code: [Select]
 
=================================================
1. at the end of .htaccess, add following code :
=================================================
#Mod_bmollet : category name in URL
RewriteRule ^cat-(.*)-([0-9]+).htm categories.php?cat_id=$2&%{QUERY_STRING}
#Mod_bmollet : Image name in URL
RewriteRule ^img-(.*)-([0-9]+).htm details.php?image_id=$2&%{QUERY_STRING}

#Mod_bmollet : This is to make search function work  ( redirect links from search results )
RewriteRule ^img([0-9]+).search.htm details.php?image_id=$1&%{QUERY_STRING}

=======================================================================

=========================================
2. add this code to include/sessions.php
=========================================
//Mod_bmollet
/**
 * Get the category url
 * @param int $cat_id The id of the category
 * @param string $cat_url The current status of the URL
 */
function get_category_url($cat_id,$cat_url = '')
{
global $site_db;
$sql = "SELECT cat_name,cat_parent_id FROM ".CATEGORIES_TABLE." WHERE cat_id = '".$cat_id."'";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
$row['cat_name'] = strtr($row['cat_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
$cat_url  = '-'.str_replace('+','-',urlencode($row['cat_name'])).'-'.$cat_id.$cat_url;
// if you want full path of category in url, put next line in comment
return $cat_url;
if( $row['cat_parent_id'] != 0)
{
return get_category_url($row['cat_parent_id'],$cat_url);
}
else
{
return $cat_url;
}
}
//Mod_bmollet
/**
 * Get the image url
 * @param int $image_id The id of the image
 */
function get_image_url($image_id)
{
global $site_db;
$sql = "SELECT cat_id,image_name FROM ".IMAGES_TABLE." WHERE image_id = '".$image_id."'";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
$row['image_name'] = strtr($row['image_name'], "éèêàëâúóíáABCDEFGHIJKLMNOPQRSTUVWXYZ","eeeaeauoiaabcdefghijklmnopqrstuvwxyz");
// if you want comlpete path to image in url, remove comment from following line
//return get_category_url($row['cat_id']).'-'.str_replace('+','-',urlencode($row['image_name'])).'-'.$image_id;
return '-'.str_replace('+','-',urlencode($row['image_name'])).'-'.$image_id;
}
========================================================================

========================================================================
3. In include/sessions.php replace function url(...) by following code.
========================================================================
/* ORIGINAL CODE
  function url($url, $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 = "&") {
    global $l, $user_info;
    $dummy_array = explode("#", $url);
    $url = $dummy_array[0];
    $url = str_replace('&', '&', $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', 'img'.$matches1[1].'.'.$matches2[1].'.htm', $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', 'img'.get_image_url($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;
            }
          }
        }
      }
      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;
  }
========================================================================


========================================================================
4. In include/sessions.php following functions are useful for URL's like
   yoursite.com/maincategory/subcategory/imagename.htm
   
   This is not necessairy if you want url's (like we used on our sites) like this :
   for image --->http://www.your-site.com/img-imagename-andnumber.htm
   category --->http://www.your-site.com/cat-categoryname-andnumber.htm
========================================================================
//Mod_bmollet
/**
 * Get the category id
 * @param array $path An array with the path of the category
 * @param int $parent_id The parent id of the first item in the $path
 */
function get_category_id($path,$parent_id = 0)
{
$cat_name = array_shift($path);
global $site_db;
$sql = "SELECT cat_id FROM ".CATEGORIES_TABLE." WHERE cat_parent_id = $parent_id AND cat_name = '".mysql_real_escape_string($cat_name)."'";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
if( count($path) != 0)
{
return get_category_id($path,$row['cat_id']);
}
else
{
return $row['cat_id'];
}
}
//Mod_bmollet
/**
 * Get the image id
 * @param array $path An array with the path of the image
 */
function get_image_id($path)
{
global $site_db;
$image_name = array_pop($path);
$cat_id = get_category_id($path);
$sql = "SELECT image_id FROM ".IMAGES_TABLE." WHERE image_name = '".mysql_real_escape_string($image_name)."' AND cat_id = $cat_id";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
return $row['image_id'];
}
========================================================================


13
Hello.

I want to share pictures and videos on facebook. I can share it, directly on facebook or using a button on 4images but sometimes a thumbnail don't appear.
What should I do?

14
Hello.

I want to share pictures and videos on facebook. I can share it, directly on facebook or using a button on 4images but sometimes a thumbnail don't appear.
What should I do?

15
Don't call me sir please. It makes me feel older than I am :)
Autothumbnails for video files with ffmpeg is not a easy thing to apply for 4images.
Wich server do you have?

Pages: [1] 2 3 4 5 ... 14