Skip to Content Skip to Menu

Plugin - Last Profile Visitors time is off?

17 years 6 months ago #35063 by addicted2dance
Plugin - Last Profile Visitors time is off? was created by addicted2dance
From where do this plugin pull the time? On my website it's one hour ahead of time, I would like to set it right but I don't know where to look? :(

Joomla 1.0.15 / SMF 1.1.4 / Joomla-SMF 2.0.2 / CB 1.1 / CPG 1.4.18 / Joomla-CPG Bridge by Mehdi (PHP 5.2.0, MySQL 5.0.22, Apache 2.2.4)

Please Log in or Create an account to join the conversation.

17 years 6 months ago #35270 by TheUnderdog
Replied by TheUnderdog on topic Re:Plugin - Last Profile Visitors time is off?
Same for me. Though it's about 6 hours ;-)
Couldn't find any solution so far...

Please Log in or Create an account to join the conversation.

17 years 6 months ago #35284 by steveometer
Replied by steveometer on topic Re:Plugin - Last Profile Visitors time is off?
im betting it doesnt check for the serevr offset or whatnot, im gonna take a hack at it for a minute

SoM

Please Log in or Create an account to join the conversation.

17 years 6 months ago #35302 by steveometer
Replied by steveometer on topic Re:Plugin - Last Profile Visitors time is off?
this code is definately a bit spagetti

i spent the last hour or so just making the tabs in the code standard looking.

i also changed the variable names to english for the date, and included an extra config option for a date string ( %d-%m-%y ect... )

my next move is to make it not be 'double coded'

after that im going to hack in the server offset check

then im going to make the output a little cleaner

hopefully after that ive changed it enough to call it a fork or a new version or something, dont know the rules on that and could use some help.

SoM

Please Log in or Create an account to join the conversation.

17 years 6 months ago #35312 by TheUnderdog
Replied by TheUnderdog on topic Re:Plugin - Last Profile Visitors time is off?
I can confirm that the time shown is the server location time. It would be brilliant if you could find a solution for that. Many thanks in advance for all your effort !:)

Please Log in or Create an account to join the conversation.

17 years 6 months ago #35318 by steveometer
Replied by steveometer on topic Re:Plugin - Last Profile Visitors time is off?
as of the moment i have this for the date routine

[code:1]
$lastview = explode(" ", $row->lastview);
$explodedatestring = explode("-", $lastview[0]);
$year = $explodedatestring[0];
$day = $explodedatestring[1];
$month = $explodedatestring[2];
$time = $lastview[1];
[/code:1]

and then when it displays
[code:1]
$return .= "<tr><td>".$cb_Name." ".$genderPic."</a><br>".$profileviewers_DATEfield;
$return=str_replace ('%m%',$month,$return);
$return=str_replace ('%d%',$day,$return);
$return=str_replace ('%y%',$year,$return);
$return=str_replace ('%t%',$time,$return);
$return .= $gender;
[/code:1]

now ive gotta dig a bit to find what command to offset the time.

ive also reduced the filesize from 16k to 12k, and about to drop it to 6-7k when i 'relogic' it a bit

SoM

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum