|
|
| |
Forums ⇒ Languages and alternative language support ⇒ i18n - l10n (languages) :: Archives ⇒ date problem in new download pro module :: Archived
date problem in new download pro module :: ArchivedWant a language pack or convertor? Have feedback on either of these? Are you a developer of one of these? Here is the place to post. Read the announcements here first!
Go to page 1, 2 Next
| Topic Archived |
View previous topic :: View next topic |
| Author |
Message |
senzacionale 500+ Posts Club


Offline Joined: Sep 26, 2004 Posts: 582 Location: Slovenija
|
Posted: Thu Jun 16, 2005 12:37 pm Post subject: date problem in new download pro module |
|
| Code:: |
'LAST_DATE' => ($dl_stats['dl'] > 0) ? generate_date($dl_stats['date'], 'F j, Y') : '',
|
date is like October 16, 2005
How i can change that date will be like Oktober not October. I look in akamu's old post
| Quote:: |
Ok as above should work but I couldn't get it to work on my windows machine with the proper locale set and all...
so I got a workaround for you.
find in web_links/index.php
PHP:
<?$newlinkView = date("F d, Y", $newlinkdayRaw);
replace with:
PHP:
<?$newlinkmonthRaw = date("F", $newlinkdayRaw);
$newlinkmonth = constant('_'.strtoupper($newlinkmonthRaw));
$newlinkView = $newlinkmonth.' '.date("d, Y", $newlinkdayRaw);
open language/lang-slovenian.php find
PHP:
<?define('_JANUARY','January');
define('_FEBRUARY','February');
define('_MARCH','March');
define('_APRIL','April');
define('_MAY','May');
define('_JUNE','June');
define('_JULY','July');
define('_AUGUST','August');
define('_SEPTEMBER','September');
define('_OCTOBER','October');
define('_NOVEMBER','November');
define('_DECEMBER','December');
and interprete it...
|
but here is different and i don't know how to change date.
and i don't know what is this in many files
| Code:: |
if (!isset($year)) {
$time = gmtime();
$year = generate_date($time, 'Y');
$month = generate_date($time, 'm');
|
thnx
_________________ Juventus the champion!
senzacionale's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/2.0.53/4.1.16/5.1.1/Dragonfly....Gentoo Linux/2.0.52-r1/4.1.16/5.1.1/Dragonfly
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Thu Jun 16, 2005 3:27 pm Post subject: Re: date problem in new download pro module |
|
ciao senzacionale
1. Forza Milan!
2.
| Code:: |
if (!isset($year)) {
$time = gmtime();
$year = generate_date($time, 'Y');
$month = generate_date($time, 'm'); |
Prepare the date to be saved in to the database for the statistic page, where data is display correctly because ....
3. the code that you need to modify is in modules/Downloads/functions/categories.inc
line 219
| Code:: |
$cpgtpl->assign_block_vars('dl_cat', array(
|
change to
| Code:: |
$new_raw_date = constant('_'.strtoupper(date('F', $dl_stats['date'])));
$cpgtpl->assign_block_vars('dl_cat', array(
|
few lines above
| Code:: |
'LAST_DATE' => ($dl_stats['dl'] > 0) ? generate_date($dl_stats['date'], 'F j, Y') : '',
|
change to
| Code:: |
'LAST_DATE' => ($dl_stats['dl'] > 0) ? $new_raw_date.' '.generate_date($dl_stats['date'], 'j, Y') : '',
|
Remember that Downloads Pro is not Multilang ready, but is in the 'to do' list.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
senzacionale 500+ Posts Club


Offline Joined: Sep 26, 2004 Posts: 582 Location: Slovenija
|
Posted: Thu Jun 16, 2005 7:31 pm Post subject: Re: date problem in new download pro module |
|
hehe, thnx NanoCaiordo
you bought a lot of new players, this is very good. Probably you will also get Gilardinho from Parma.
_________________ Juventus the champion!
senzacionale's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/2.0.53/4.1.16/5.1.1/Dragonfly....Gentoo Linux/2.0.52-r1/4.1.16/5.1.1/Dragonfly
|
|
| Back to top |
|
 |
senzacionale 500+ Posts Club


Offline Joined: Sep 26, 2004 Posts: 582 Location: Slovenija
|
Posted: Thu Jun 16, 2005 7:54 pm Post subject: Re: date problem in new download pro module |
|
just this i laso try to change this in include/view_cat.inc
| Code:: |
$row['date'] = 'Objavljeno: '.generate_date($row['date']).mark_date($row['date'], 3, 1, '', 2);
|
becouse now is like Sun 16 Oct 2005 ob 10:22.
I try to change with your previous example but i can't. Can you give me some example how to change this too becouse this is also more complicated like first one.
thnx
_________________ Juventus the champion!
senzacionale's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/2.0.53/4.1.16/5.1.1/Dragonfly....Gentoo Linux/2.0.52-r1/4.1.16/5.1.1/Dragonfly
|
|
| Back to top |
|
 |
senzacionale 500+ Posts Club


Offline Joined: Sep 26, 2004 Posts: 582 Location: Slovenija
|
Posted: Fri Jun 17, 2005 6:45 pm Post subject: Re: date problem in new download pro module |
|
can you help me NanoCaiordo, becouse i can't solve this problem myself.
The problem i write it yestreday and the problem i try to solve it now! This is for statistics and this code is in statistics.php
| Code:: |
if (!isset($_GET['id'])) { url_redirect(getlink()); }
$time = gmtime();
$time_year = generate_date($time, 'Y');
$time_month = generate_date($time, 'm');
list($dl_title, $dl_date, $dl_pick, $dl_active, $dl_submitter, $tot_hits, $tot_views) = $db->sql_ufetchrow("SELECT d.title, d.date, d.pick, d.active, d.submitter, sum(s.hits) AS total_hits, sum(s.views) AS total_views FROM ".$dl_prefix."_downloads d
LEFT JOIN ".$dl_prefix."_stats s ON (s.id = d.lid)
WHERE d.lid='$global_id' GROUP BY d.lid", SQL_NUM, __FILE__, __LINE__);
if (!isset($dl_title)) { cpg_error('Izbrani prenos ne obstaja', 404); }
if ($dl_active != 1 && !can_admin($module_name)) { cpg_error('Izbrani prenos ni aktiven'); }
$l_size = getimagesize('themes/'.$CPG_SESS['theme'].'/images/leftbar.gif');
$m_size = getimagesize('themes/'.$CPG_SESS['theme'].'/images/mainbar.gif');
$r_size = getimagesize('themes/'.$CPG_SESS['theme'].'/images/rightbar.gif');
list($total_yearly_hits, $total_yearly_views) = $db->sql_ufetchrow("SELECT sum(hits), sum(views) FROM ".$dl_prefix."_stats WHERE id='$global_id'", SQL_NUM, __FILE__, __LINE__);
list($total_monthly_hits, $total_monthly_views) = $db->sql_ufetchrow("SELECT sum(hits), sum(views) FROM ".$dl_prefix."_stats WHERE id='$global_id' AND year='$time_year'", SQL_NUM, __FILE__, __LINE__);
$yh = $db->sql_query("SELECT year, sum(hits) FROM ".$dl_prefix."_stats WHERE id='$global_id' GROUP BY year ORDER BY year", false, __FILE__, __LINE__);
$mh = $db->sql_query("SELECT month, sum(hits) FROM ".$dl_prefix."_stats WHERE id='$global_id' AND year='$time_year' GROUP BY month ORDER BY month", SQL_NUM, __FILE__, __LINE__);
$yv = $db->sql_query("SELECT year, sum(views) FROM ".$dl_prefix."_stats WHERE id='$global_id' GROUP BY year ORDER BY year", false, __FILE__, __LINE__);
$mv = $db->sql_query("SELECT month, sum(views) FROM ".$dl_prefix."_stats WHERE id='$global_id' AND year='$time_year' GROUP BY month ORDER BY month", SQL_NUM, __FILE__, __LINE__);
$months = array(1=>_JANUARY, _FEBRUARY, _MARCH, _APRIL, _MAY, _JUNE, _JULY, _AUGUST, _SEPTEMBER, _OCTOBER, _NOVEMBER, _DECEMBER);
$colors = array(1=>'8D1B1B', '6740E1', '8D8D8D', 'CC8500', '5B781E');
$rand_colors = array_rand($colors);
$pagetitle .= $module_title.' '._BC_DELIM.' '._StatisticsLANG.' '._BC_DELIM.' '.$dl_title;
require_once('header.php');
OpenTable();
echo dl_detail_menu($global_id, $dl_title, $dl_pick, $dl_active, 5).'<br /><br />
<span class="genmed"><strong>'._StatisticsLANG.'</strong></span><br /><br />
<strong>'.$dl_title.'</strong> je prejel <strong>'.$tot_hits.'</strong> '.strtolower(_HITS).' in <strong>'.$tot_views.'</strong> pregledov strani od '.generate_date($dl_date, 'F j, Y').'.<br /><br />
<span class="genmed"><strong>Letna statistika</strong></span><br /><br />
<table border="0" bgcolor="'.$bgcolor2.'" cellspacing="1" cellpadding="3">
|
how i can chnage that date will be shown correctly in our language. I try but i can't fix it myself
_________________ Juventus the champion!
senzacionale's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/2.0.53/4.1.16/5.1.1/Dragonfly....Gentoo Linux/2.0.52-r1/4.1.16/5.1.1/Dragonfly
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Fri Jun 17, 2005 10:20 pm Post subject: Re: date problem in new download pro module |
|
| PHP: |
$rand_colors = array_rand($colors); $raw_dl_date = defined('_'.strtoupper(date('F', $dl_date))) ? constant('_'.strtoupper(date('F', $dl_date))) : date('F', $dl_date);
//then '.$raw_dl_date.' '.generate_date($dl_date, 'j, Y').'
|
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
senzacionale 500+ Posts Club


Offline Joined: Sep 26, 2004 Posts: 582 Location: Slovenija
|
Posted: Sat Jun 18, 2005 7:22 am Post subject: Re: date problem in new download pro module |
|
thnx dude, it works great.
where i can chagne this date, i look in whole code
I found this
| Code:: |
$row['date'] = 'Objavljeno: '.generate_date($row['date']).mark_date($row['date'], 3, 1, '', 2);
|
which i write it up but problem is how to change here the date, here are only numbers and no date. I think that i look wrong code.
this code i found in iclude/view_cat.inc
I don't know this two functions are called
| Code:: |
generate_date($row['date')
or similar function
generate_date($review_timestamp)
|
and how this function can show the date like this
| Code:: |
Sat 18 Jun 2005 ob 10:33
|
_________________ Juventus the champion!
senzacionale's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/2.0.53/4.1.16/5.1.1/Dragonfly....Gentoo Linux/2.0.52-r1/4.1.16/5.1.1/Dragonfly
|
|
| Back to top |
|
 |
senzacionale 500+ Posts Club


Offline Joined: Sep 26, 2004 Posts: 582 Location: Slovenija
|
Posted: Sun Jun 19, 2005 8:50 pm Post subject: Re: date problem in new download pro module |
|
it is no way that i can make this. can you just told me NanoCaiordo in which fil ei must mak e this becouse here are just numbers and i don't know how numbers can work with date. So can you just tell me the file where i can do this? Anyone else can also tell me?
thnx dude
_________________ Juventus the champion!
senzacionale's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/2.0.53/4.1.16/5.1.1/Dragonfly....Gentoo Linux/2.0.52-r1/4.1.16/5.1.1/Dragonfly
|
|
| Back to top |
|
 |
Lualah Heavy poster


Offline Joined: Nov 14, 2004 Posts: 244
|
Posted: Sun Jun 26, 2005 1:05 pm Post subject: Re: date problem in new download pro module |
|
yes how to change that date
| Quote:: |
Sun 18 Oct 2005 at 13:55
|
or even better where to chnage it?
Lualah's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) WIN/Apache 2/4.1.16/5.1.1/9.0.6.1
|
|
| Back to top |
|
 |
senzacionale 500+ Posts Club


Offline Joined: Sep 26, 2004 Posts: 582 Location: Slovenija
|
Posted: Sun Jun 26, 2005 3:26 pm Post subject: Re: date problem in new download pro module |
|
yes the code for that is
but i don't know where it calls this!
I look al this codes but no success
_________________ Juventus the champion!
senzacionale's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/2.0.53/4.1.16/5.1.1/Dragonfly....Gentoo Linux/2.0.52-r1/4.1.16/5.1.1/Dragonfly
|
|
| Back to top |
|
 |
Victor Nice poster


Offline Joined: Dec 06, 2004 Posts: 69 Location: Mexico/Italia
|
Posted: Sun Jun 26, 2005 3:55 pm Post subject: Download pro date problem |
|
i install download pro module and i see that date is like "Sun Jun 26, 2005 3:52 pm".
where i can change the order to "Sun 26 Jun 2005 3:52 pm"
thnx all for help!
Victor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) win/linux/2.0.52/4.0.22/4/dragonfly
|
|
| Back to top |
|
 |
NEMINI Diamond Supporter


Offline Joined: Apr 22, 2004 Posts: 4551
|
|
| Back to top |
|
 |
Victor Nice poster


Offline Joined: Dec 06, 2004 Posts: 69 Location: Mexico/Italia
|
Posted: Sun Jun 26, 2005 4:02 pm Post subject: Re: Download pro date problem |
|
yes but there is no answer for this, so i think that no one see this topic!
Sorry
Victor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) win/linux/2.0.52/4.0.22/4/dragonfly
|
|
| Back to top |
|
 |
senzacionale 500+ Posts Club


Offline Joined: Sep 26, 2004 Posts: 582 Location: Slovenija
|
Posted: Sun Jun 26, 2005 5:04 pm Post subject: Re: date problem in new download pro module |
|
can you help us trevor?
thnx
_________________ Juventus the champion!
senzacionale's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Windows XP/2.0.53/4.1.16/5.1.1/Dragonfly....Gentoo Linux/2.0.52-r1/4.1.16/5.1.1/Dragonfly
|
|
| Back to top |
|
 |
Victor Nice poster


Offline Joined: Dec 06, 2004 Posts: 69 Location: Mexico/Italia
|
Posted: Sun Jun 26, 2005 6:36 pm Post subject: Re: Download pro date problem |
|
???
WHY??
Victor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) win/linux/2.0.52/4.0.22/4/dragonfly
|
|
| Back to top |
|
 |
|
|
All times are GMTGo to page 1, 2 Next
|
| |
 |
 Welcome Anonymous
|
|
|
|