[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4752: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4754: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4755: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
steevo.fr • Afficher le sujet - Timestamp and username problem

Timestamp and username problem

Si vous avez une idée pour une future fonctionnalité

par heix75 » Dim 19 Juin 2011 12:59

Hi!

Thank you for perfect component! But some problems and ideas:

How can I add timestamp field to frontend? I checked the collector database table, and there are column "modified". But it wont be modified when I edit some information in fields.
I've tried to create new field with type date. This shows date in frontend, when I add %H:%M:%S to it, it shows time too. That's OK. But It shows todays date/time also every collection item and when refreshing page, time refreshes too. Date and time can only be saved in field, when I manually select date from calendar there and save item after that. But later when I modify some data, then I must also select new date and time manually.
Can this be done automatically?

And the other idea is to add author's and/or modifier name column to frontend list like in backend history.

I have tried to hack collectors code and list templates, but no results :(

This little addons could make this component more perfect.
heix75
 
Messages: 4
Inscription: Dim 19 Juin 2011 12:37

par steevo » Jeu 23 Juin 2011 12:09

Avatar de l’utilisateur
steevo
Administrateur du site
 
Messages: 330
Inscription: Jeu 17 Déc 2009 22:59

par heix75 » Jeu 23 Juin 2011 21:29

Hi again!

I need this component for creating some kind of logbook or register system, so timestamp is neccessary for checking on what time and who modified the data last.

I have checked accidentally wrong database table (__collector_fields), but in (__collector_items) it works correctly of course :)
But how can I query data to table from this column?

I have tried to add this kind of code in com_collector/views/collection/view.html.php in case 7 section(date) temporarily for testing:

$query = 'SELECT modified';
$query .= ' FROM #__collector_items';
$query .= ' WHERE id = "'.$fieldId.'"';

$date = strtotime($query);

echo date('d.m.Y H:i:s', $date);

But this code doesn't retrieve any data of modified field.

When I find correct code, I can add a custom field in database for timestamp.
Is this code correct or can this be done more easilly, like you advised me to do with author and modifier, btw - thanks for that, i wil test it tomorrow ;)
heix75
 
Messages: 4
Inscription: Dim 19 Juin 2011 12:37

par steevo » Ven 24 Juin 2011 15:53

Avatar de l’utilisateur
steevo
Administrateur du site
 
Messages: 330
Inscription: Jeu 17 Déc 2009 22:59

par heix75 » Sam 25 Juin 2011 08:18

Thank you! It's working well... but...

Is there little bug in collector code somewhere with timezones? When I add these lines of code, then it shows me date and time, but it is in UTC format.
Also I noticed, that when I'm adding new item, then created and modified date inserted to database in UTC format, if I add new item in frontend, then created and modified date inserted with timezone offset +3. But in frontend, the times are also in UTC format.
Also in two tables (collector_items and collector_items_history) the timezones are different.

Where I can change the timezone to using the same format everywhere? I'd like to use timezone, which is set up in server configuration.

My server timezone is set up correctly - everywhere else the times and dates are correct.
heix75
 
Messages: 4
Inscription: Dim 19 Juin 2011 12:37

par heix75 » Sam 25 Juin 2011 15:05

Fichiers joints
difference.JPG
(28.46 Kio) Pas encore téléchargé
heix75
 
Messages: 4
Inscription: Dim 19 Juin 2011 12:37


Retourner vers Demande de fonctionnalité

cron

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 30 invités