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

Pages: [1]
1
Discussion & Troubleshooting / Slow Queries
« on: October 02, 2008, 08:36:10 AM »
My server goes down many times by 4images slow queries.
This is an example of my mysql log:

Code: [Select]
# Query_time: 106  Lock_time: 57  Rows_sent: 14  Rows_examined: 149
use *_img;
SELECT cat_id, COUNT(image_id) AS new_images
  FROM 4images_images
  WHERE image_active = 1 AND image_date >= 1222467568
  GROUP BY cat_id

What should I do?

2
This mode is useful for Iranian users.

Sample: http://gallery.dementor.ir/

1-   First download "jalali.php" from below and copy it to "includes" folder on 4images root.
2-   Backup "includes/functions.php" and then open it.
3-   

Find this: (Line 705)
Code: [Select]
function format_date($format, $timestamp) {
  global $user_info;
  $timezone_offset = (defined("TIME_OFFSET")) ? TIME_OFFSET : 0;
  return date($format, $timestamp + (3600 * $timezone_offset));
}

Replace with:
Code: [Select]
function format_date($format, $timestamp) {
  global $user_info;
  $timezone_offset = (defined("TIME_OFFSET")) ? TIME_OFFSET : 0;
  $myformat = array('Y m d', ', G:H', 'D');
  $firststep = date($myformat[0], $timestamp + (3600 * $timezone_offset));
  $secstep = explode(" ", $firststep);
  require_once 'jalali.php';
  list( $jy, $jm, $jd ) = gregorian_to_jalali($secstep[0], $secstep[1], $secstep[2]);
  $myday = date($myformat[2], $timestamp + (3600 * $timezone_offset));
  return giveday($myday) . ' ' . $jd . ' ' . givemonth($jm) . ' ' . $jy.date($myformat[1], $timestamp + (3600 * $timezone_offset));
}

3
Language Packs / [Language] Persian for v1.7.4
« on: January 14, 2007, 07:00:36 PM »
Persian language pack with fixed utf-8 problem

4
Discussion & Troubleshooting / Re: Problem with utf-8 just in 1.7.3
« on: October 21, 2006, 08:29:33 PM »
but my problem fixed with admin suggestion.
use pspad to save utf-8 files: http://www.pspad.com/index_en.html

5
You can use RSS and RSS Reader for website !!
search in google

6
Discussion & Troubleshooting / Problem with utf-8 just in 1.7.3
« on: September 24, 2006, 09:40:33 AM »
I had 1.7.2 with utf-8 and no problem, but when I upgrade to 1.7.3 in header shows, an error (Cannot add header information - headers already sent by…).
I never modify any php files; just overwrite all new files on older files.
I do another test. Install a 1.7.3 on other place for the first time. Everything was good until that I changed language Charest (and its file) to utf-8!
Whenever that I set utf-8 error appear in header, and when I set to every Charest except utf-8, everything goes well.
In addition, login and logout have problem with utf-8.
I download Arabic language and install it and everything was good. Because it was set to UTF8 not utf-8 and its file does not save as utf-8 format. My language (Persian) just works with utf-8.
What should I do?

Pages: [1]