Home Private Messages Search
CPG Dragonfly™ CMS Dedicated Server & Bandwidth Sponsored by DedicatedNOW
Toggle Content
 
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 :: Archived
Want 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
Post new topic    Revive this topic    Printer Friendly Page     Forum Index ⇒  i18n - l10n (languages)

Topic Archived View previous topic :: View next topic  
Author Message
senzacionale
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 26, 2004
Posts: 582
Location: Slovenija
PostPosted: 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
View user's profile Visit poster's website MSN Messenger
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: 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
View user's profile Visit poster's website Photo Gallery
senzacionale
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 26, 2004
Posts: 582
Location: Slovenija
PostPosted: 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
View user's profile Visit poster's website MSN Messenger
senzacionale
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 26, 2004
Posts: 582
Location: Slovenija
PostPosted: 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
View user's profile Visit poster's website MSN Messenger
senzacionale
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 26, 2004
Posts: 582
Location: Slovenija
PostPosted: 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
View user's profile Visit poster's website MSN Messenger
NanoCaiordo
Developer
Developer

Offline Offline
Joined: Jun 29, 2004
Posts: 3878
Location: Melbourne, AU
PostPosted: 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
View user's profile Visit poster's website Photo Gallery
senzacionale
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 26, 2004
Posts: 582
Location: Slovenija
PostPosted: 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
View user's profile Visit poster's website MSN Messenger
senzacionale
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 26, 2004
Posts: 582
Location: Slovenija
PostPosted: 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
View user's profile Visit poster's website MSN Messenger
Lualah
Heavy poster
Heavy poster

Offline Offline
Joined: Nov 14, 2004
Posts: 244

PostPosted: 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
View user's profile Visit poster's website
senzacionale
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 26, 2004
Posts: 582
Location: Slovenija
PostPosted: Sun Jun 26, 2005 3:26 pm
Post subject: Re: date problem in new download pro module

yes the code for that is
Code::
D M d Y ob g:i a

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
View user's profile Visit poster's website MSN Messenger
Victor
Nice poster
Nice poster

Offline Offline
Joined: Dec 06, 2004
Posts: 69
Location: Mexico/Italia
PostPosted: 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
View user's profile Visit poster's website
NEMINI
Diamond Supporter
Diamond Supporter

Offline Offline
Joined: Apr 22, 2004
Posts: 4551

PostPosted: Sun Jun 26, 2005 3:57 pm
Post subject: Re: Download pro date problem

how about starting in the topic with nearly the same title as this one? cpgnuke.com/Forums/vie...d+pro.html

_________________
NEMINI.org, NEMINI.us, NEMINI.info, NYMINI.org

NEMINI's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
1.3.34 (Unix)/4.1.18-standard/4.4.2 /9.1.0.8 CVS
Back to top
View user's profile Visit poster's website Photo Gallery
Victor
Nice poster
Nice poster

Offline Offline
Joined: Dec 06, 2004
Posts: 69
Location: Mexico/Italia
PostPosted: 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
View user's profile Visit poster's website
senzacionale
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Sep 26, 2004
Posts: 582
Location: Slovenija
PostPosted: 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
View user's profile Visit poster's website MSN Messenger
Victor
Nice poster
Nice poster

Offline Offline
Joined: Dec 06, 2004
Posts: 69
Location: Mexico/Italia
PostPosted: 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
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Revive this topic    Printer Friendly Page    Forum Index ⇒  i18n - l10n (languages)
Page 1 of 2
All times are GMT
Go to page 1, 2  Next

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

lesa meira...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy