xoops forums

Forum Index


Board index » All Posts (amin_ts)




amin_ts

Just popping in
Posted on: 2015/7/7 6:19
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#1

Date persian

Hello

when I upgrade my XOOPS from 2.5.6 to 2.5.7.1 then Home page web site show blank page because my local language is persian and Suppert xoops for persian langauge (xoops.ir) didn't publish persian version core xoops for 2.5.7.1 then I upgrade xoops from main version.

when I replaced file locale.php from /language/english/locale.php with file locale.php in language/persian/locale.php , site open normally but date web site changed from persian to english .

please help me for make necessary change in this file locale.php in persian langauge:

language/persian/locale.php:
<?php
/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code 
 which is considered copyrighted (c) material of the original comment or credit authors.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

/**
 * Xoops locale
 *
 * @copyright       The XOOPS project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @since           2.3.0
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id: locale.php 8066 2011-11-06 05:09:33Z beckmi $
 * @todo            To be handled by i18n/l10n
 */
// defined('XOOPS_ROOT_PATH') or die('Restricted access');

setlocale(LC_ALL,'fa_IR');
// lang file in the persian language directory
include_once dirname(__FILE__) . '/locale.lang.php';
// config file in the persian language directory
include_once dirname(__FILE__) . '/locale.config.php';

//start add file for jalali calendar config and language files
include_once dirname(__FILE__) . '/date/jdf.php';
//end add file for jalali calendar config and language files
class XoopsLocal extends XoopsLocalAbstract
{
// start add jalali calendar for persian language 
    /*
    * Function to display formatted times in user timezone
    */
    
function formatTimestamp($time$format "l"$timeoffset null)
    {
        global 
$xoopsConfig$xoopsUser;

        
$format_copy $format;
        
$format strtolower($format);

        if (
$format == 'rss' || $format == 'r') {
            
$TIME_ZONE '';
            if (isset(
$GLOBALS['xoopsConfig']['server_TZ'])) {
                
$server_TZ abs(intval($GLOBALS['xoopsConfig']['server_TZ'] * 3600.0));
                
$prefix = ($GLOBALS['xoopsConfig']['server_TZ'] < 0) ? ' -' ' +';
                
$TIME_ZONE $prefix date('Hi'$server_TZ);
            }
            
$date gmdate('D, d M Y H:i:s'intval($time)) . $TIME_ZONE;
            return 
$date;
        }

        if ((
$format == 'elapse' || $format == 'e') && $time time()) {
            
$elapse time() - $time;
            if (
$days floor($elapse / (24 3600))) {
                
$num $days sprintf(_DAYS$days) : _DAY;
            } elseif (
$hours floor(($elapse % (24 3600)) / 3600)) {
                
$num $hours sprintf(_HOURS$hours) : _HOUR;
            } elseif (
$minutes floor(($elapse 3600) / 60)) {
                
$num $minutes sprintf(_MINUTES$minutes) : _MINUTE;
            } else {
                
$seconds $elapse 60;
                
$num $seconds sprintf(_SECONDS$seconds) : _SECOND;
            }
            
$ret sprintf(_ELAPSE$num);
            return 
$ret;
        }
        
// disable user timezone calculation and use default timezone,
        // for cache consideration
        
if ($timeoffset === null) {
            
$timeoffset = ($xoopsConfig['default_TZ'] == '') ? '0.0' $xoopsConfig['default_TZ'];
        }
        
$usertimestamp xoops_getUserTimestamp($time$timeoffset);
        switch (
$format) {
            case 
's':
                
$datestring _SHORTDATESTRING;
                break;

            case 
'm':
                
$datestring _MEDIUMDATESTRING;
                break;

            case 
'mysql':
                
$datestring 'Y-m-d H:i:s';
                break;

            case 
'l':
                
$datestring _DATESTRING;
                break;

            case 
'c':
            case 
'custom':
                static 
$current_timestamp$today_timestamp$monthy_timestamp;
                if (!isset(
$current_timestamp)) {
                    
$current_timestamp xoops_getUserTimestamp(time(), $timeoffset);
                }
                if (!isset(
$today_timestamp)) {
                    
$today_timestamp mktime(000date('m'$current_timestamp), date('d'$current_timestamp), date('Y'$current_timestamp));
                }

                if (
abs($elapse_today $usertimestamp $today_timestamp) < 24 60 60) {
                    
$datestring = ($elapse_today 0) ? _TODAY _YESTERDAY;
                } else {
                    if (!isset(
$monthy_timestamp)) {
                        
$monthy_timestamp[0] = mktime(00000date('Y'$current_timestamp));
                        
$monthy_timestamp[1] = mktime(00000date('Y'$current_timestamp) + 1);
                    }
                    if (
$usertimestamp >= $monthy_timestamp[0] && $usertimestamp $monthy_timestamp[1]) {
                        
$datestring _MONTHDAY;
                    } else {
                        
$datestring _YEARMONTHDAY;
                    }
                }
                break;

            default:
                if (
$format != '') {
                    
$datestring $format_copy;
                } else {
                    
$datestring _DATESTRING;
                }
                break;
        }

    
// Start hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org
    
if (_JDF_USE_HEGIRADATE && $format != 'mysql' ){
         return 
jdate($datestring,$usertimestamp);
       } else {
             return 
ucfirst(date($datestring,$usertimestamp));
           }
    
// End hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org
    
}
// end add jalali calendar for persian language 
    
function number_format($number)
    {
        switch (
_NUM_TYPE) {
            case 
"figure":
                if (
_JDF_USE_PERSIANNUM){
                    return 
Convertnumber2farsi($number);
                } else {
                    return 
$number;
                }
                break;
            case 
"word":
                return (
$number 0) ? XoopsLocal::num2Words($number) : _NUMWORDS_ZERO;
                break;
            default:
                return 
$number;
                break;
        }    
    }
    function 
num2Words($no)
    {
        global 
$_numWords;
        if(
$no == 0)
            return 
' ';
        else {
            
$novalue='';
            
$highno=$no;
            
$remainno=0;
            
$value=100;
            
$value1=1000;        
            while(
$no>=100)    {
                if((
$value <= $no) &&($no  $value1)) {
                    
$novalue=$_numWords["$value"];
                    
$highno = (int)($no/$value);
                    
$remainno $no $value;
                    break;
                }
                
$value$value1;
                
$value1 $value 1000;
            }
            if(
array_key_exists("$highno",$_numWords)) {
                return 
$_numWords["$highno"]." ".$novalue." ".XoopsLocal::num2Words($remainno);
            } else { 
                
$unit=$highno%10;
                
$ten =(int)($highno/10)*10;             
                return 
$_numWords["$ten"]." ".$_numWords["$unit"]." ".$novalue." ".XoopsLocal::num2Words($remainno);
            }
        }
    }    
    function 
money_format($format$number)
    {
        
setlocale(LC_MONETARY,'fa_IR');
        return 
money_format($format$number);
    }
    
// reserved for future versions
    // Core and module developers can use this syntax in the future versions: XoopsLocal::strtotime($inputtime)
    
function strtotime($inputtime)
    {
        return 
strtotime(inputTimeToGregorian($inputtime));
    }

}
?>



and locale.php in English language is:

<?php
/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

/**
 * Xoops locale
 *
 * @copyright       The XOOPS project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @since           2.3.0
 * @author          Taiwen Jiang <phppp@users.sourceforge.net>
 * @version         $Id: locale.php 12537 2014-05-19 14:19:33Z beckmi $
 * @todo            To be handled by i18n/l10n
 */
defined('XOOPS_ROOT_PATH') || die('Restricted access');

setlocale(LC_ALL'en_US');

// !!IMPORTANT!! insert '' before any char among reserved chars: "a","A","B","c","d","D","e","F","g","G","h","H","i","I","j","l","L","m","M","n","O","r","s","S","t","T","U","w","W","Y","y","z","Z"
// insert double '' before 't','r','n'
define("_TODAY","Today G:i");
define("_YESTERDAY","Y\es\t\e\rday G:i");
define("_MONTHDAY","n/j G:i");
define("_YEARMONTHDAY","Y/n/j G:i");
define("_ELAPSE","%s ago");
define("_TIMEFORMAT_DESC","Valid formats: "s" - " _SHORTDATESTRING "; "m" - " _MEDIUMDATESTRING "; "l" - " _DATESTRING ";<br />" ""c" or "custom" - format determined according to interval to present; "e" - Elapsed; "mysql" - Y-m-d H:i:s;<br />" "specified string - Refer to <a href="http://php.net/manual/en/function.date.php" rel="external">PHP manual</a>.");

/**
 * A Xoops Local
 *
 * @package     kernel
 * @subpackage  Language
 *
 * @author      Taiwen Jiang <phppp@users.sourceforge.net>
 * @copyright   copyright (c) 2000-2009 XOOPS.org
 */
class XoopsLocal extends XoopsLocalAbstract
{
    
/**
     * Number Formats
     *
     * @param  unknown_type $number
     * @return unknown
     */
    
function number_format($number)
    {
        return 
number_format($number2'.',',');
    }

    
/**
     * Money Format
     *
     * @param  string $format
     * @param  string $number
     * @return money  format
     */
    
function money_format($format$number)
    {
        
setlocale(LC_MONETARY'en_US');

        return 
money_format($format$number);
    }
}


amin_ts

Just popping in
Posted on: 2014/12/23 6:20
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#2

Re: blank page

I cleared cashe but home page is blank yet!
PHP version 5.3.29

my other web sites open normally after upgrading to 2.5.7.1 with this version of PHP


amin_ts

Just popping in
Posted on: 2014/12/22 17:57
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#3

blank page

My home page of web site show blank page for guest users after upgrade from 2.5.6 fo 2.5.7.1
other page of web site open noramlly for guest user and home page web site open normall for members and administrator user


amin_ts

Just popping in
Posted on: 2013/10/8 18:31
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#4

Re: TDMDownloads fixed for optimum memory using

I used last version of TDMDownloads (1.63 beta) and i have more 700 file in this module, in first module work very good but index page and visit of any category (visitcat.php) have problem and give blank page recently.

my xoops is : 2.5.6



amin_ts

Just popping in
Posted on: 2013/5/18 15:08
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#5

static page module for xoops 2.5.6

please suggest me static page module for xoops 2.5.6


amin_ts

Just popping in
Posted on: 2012/9/18 8:24
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#6

protector 3.51 & blank page

Xoops system site: 2.5.4
protector : 3.51

home page of my site for guest user give blank page but other page of site open for all users.
when i disable protector module, home page of site open for guest user.
please help me for solve this problem.



amin_ts

Just popping in
Posted on: 2012/7/4 17:26
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#7

Re: smartfaq 1.11 & Xoops 2.5.5

I upgrade module smartFAQ from 1.08 to 1.09 but my problem with this module do not solve yet and after send question system give this error:

Corrupted Content Error
The page you are trying to view cannot be shown because an error in the data transmission was detected.Please contact the website owners to inform them of this problem.




amin_ts

Just popping in
Posted on: 2012/6/24 16:17
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#8

smartfaq 1.11 & Xoops 2.5.5

System site: xoops 2.5.5
module : smartfaq 1.11

when user send request FAQ after click on submit , system give this error message:
=====================
A problem has occurred on our server!
Page is currently unavailable

We are working on a fix
Please come back soon ...

Error : Handler does not exist
Module: smartfaq
Name: category

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

please help to solve this problem.


amin_ts

Just popping in
Posted on: 2011/12/9 9:08
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#9

Re: change comment form

please help and guide me


amin_ts

Just popping in
Posted on: 2011/12/9 9:04
amin_ts
amin_ts (Show more)
Just popping in
Posts: 70
Since: 2005/3/6 1
#10

blank page in submit form publisher module

system xoops:2.5.3
publisher module : 1
when i click on submit article in publisher module in admin page, redirect to blank page.
I have not any error message in blank page when i turn on debug error



TopTop
(1) 2 3 4 ... 7 »