Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sun Zaza

Pages: 1 ... 25 26 27 28 [29] 30 31 32 33 34
421
Hi thunderstrike,

I want to give some feedback:

I installed this mod in two galleries:
Fresh gallery: works perfect
Normal gallery (With mods): does not shows any images when you click on (show_uploaded_images).

What strange is that the other similar mod http://www.4homepages.de/forum/index.php?topic=15390.msg82566#msg82566][MOD]http://www.4homepages.de/forum/index.php?topic=15390.msg82566#msg82566 of Vladec (Almost the same code) works perfect on both galleries.

I will give you more feedback and I will test your Mod till you get it work. Just let me know what I have to change. :)

Cruxy

422
Believe it or not. I was busy with this matter since this morning. I tried all tricks, but no luck yet!
I could not change the format of the {date_start}, but it is not very important at the moment.

Here we go again:
{date_start} and {date_end} are TYPE: Date.
The dates are showing in the details.html, but {date2} and {date3} NOT!!!
Do you have to change/add something in the code?
Code: [Select]
if (isset($image_row['date_start']) && !empty($image_row['date_start']) && isset($image_row['date_end']) && !empty($image_row['date_end'])) {
    $image_start_date = $image_row['date_start'];
    $image_end_date = $image_row['date_end'];
    if (preg_match("/(\d{2})-(\d{2})-(\d{4})/", $image_start_date, $start)) {
        if (preg_match("/(\d{2})-(\d{2}-(\d{4}))/", $image_end_date, $end)) {
            if ($start[1] > date("d")) {
                $image_real_date_today = $start[1] - date("d");
            } elseif ($start[1] < date("d")) {
                $image_real_date_today = date("d") - $start[1];
            } elseif ($start[1] == date("d")) {
                $image_real_date_today = $start[1];
       
            } elseif ($end[1] > date("d")) {
                $image_real_date_today = $end[1] - date("d");
            } elseif ($end[1] < date("d")) {
                $image_real_date_today = date("d") - $end[1];
            } elseif ($end[1] == date("d")) {
                $image_real_date_today = date("d") - $end[1];           
            }
            $image_real_date_end_start = $end[1] - $start[1];
        }
    }
}

Code: [Select]
"date2" => (isset($image_real_date_end_start)) ? $image_real_date_end_start : "",
"date3" => (isset($image_real_date_today)) ? $image_real_date_today : "",

See screenshot please!


423
I am still fighting to make it work.

Quote
$image_start_date = format_date($config['date_format'], $image_row['date_start']);
$image_end_date = format_date($config['date_format'], $image_row['date_end']);

I did not test the first code yet, because I want to change first the format of {date_start} on the details.
Listen, On functions.php I added this line:

"date_start" => format_date($config['date_format']." ".$config['time_format'],$image_row['date_start']), under
 
"image_date" => format_date($config['date_format']." ".$config['time_format'],$image_row['image_date']),

NO format changing yet!!!

424
I did some research via GOOGLE and finaly I have the unswer.

phpmyadmin have problems with dates, so it accecpt only this format: 0000-00-00 (INPUT).
But if you want to show the format 00-00-0000 (OUTPUT) you need to use:

1 - The explode function on each date in your file and then just insert into the mysql table in the format yyyy-mm-dd.

OR
<?php
$myinput='12/15/2005';
$sqldate=date('Y-m-d',strtotime($myinput));
echo $sqldate;
?>

PS: I tried to figure out how the 4images shows the format 00-00-0000, but no luck yet!!!

Can you help me in that?

Many thanks in advance,
Cruxy

425
Good news :)
The problem is solved, but I still get the format: 2007-10-01. (phpmyadmin does not accept the format 01-10-2007)
How can I change it?
NOTE: When I we change the format I will start test in you code!

426
I think I have the unswer but NOT the solution.

In phpmyadmin I created a date. Everything is fine till now because the right date is showing in the details.
BUT when I tried to open this image in ACP, the date changed to 0000-00-00.
Now we know for sure that nothing wrong with the database. There is a miscommunication between {hits_start} (Additional field) and the database.

I beleave that the database doesn't understand that {hits_start} is a date!
Maybe we have to change or to add something in function.php?

427
Quote
Please STOP use roll eyes
Oh sorry I did not mean that!

Quote
Nothing is wrong with database ... you add date in field ? If see 00-00-0000 (or 0000-00-00 if no use my fix), is mean you no add nothing in field. Field is empty.

I am trying to figuur out the problem of the database. I go back to you when I find something :?

428
The additional field {hits_start} is created with DATE "Type: Date, Null: No" (as you asked me to do).

Quote
Ok so date format is correct.
On details is date 0000-00-00 is not correct. First the format is not good and second I see only zero's instead of 01-10-2007

Something wrong with the DATE additional fields? or in the database? :?:

429
I want to use    :arrow: 01-10-2007
What strange is that {image_date} workt perfect even you edit the date, but the date of the additional field NOT

430
No problem :)

I still can not test the code because when I changed int to date I get the date of {date_start}  like: 0000-00-00 instead of 01-10-2007
I am testing on a very fresh gallery

431
Hi guys,

I am again with a new usefull question: :idea:

On the user_logininfo.html I add a link to a page on my gallery.

I want that this link just showing to the usergroup Photographer. If you are not from the usergroup Photographer, you will see nothing.

Many thanks in advance, :)
Cruxy

432
Mods & Plugins (Requests & Discussions) / Re: Image hits per day
« on: November 09, 2007, 11:20:12 AM »
Hey Thunderstrike. I knew it! You see that like a challenge :wink:

Oke then, I am happy to hear that:

Hits of today
Hits of yersterday
Hits of last 7 days (or last week)
Hits of last month (28/30/31 days)

Let me know if you need more informations :D

433
Hi Thunderstrike,
Here we go again  :D

I can not test the code because we have to solve first the problem of showing the dates on the details.
I will explain:

The additional field {date_start} = 01-10-2007 (At the edit image "ACP")
On the details.html is showing only 1
On the database I used: int(11) NO 0 (The same as {image_hits}).

I do not understand why? :roll:
See screenshots

434
Hi Thunderstrike, I don't understand you. Have you already updated the code or do I have to wait :roll:

435
Hi Thunderstrike,

It did not works yet!!!

There is something wrong with the date.
In edit image I put 01-10-2007 but in details.htm I get 0000-00-00
and when I put 2007-10-01 I get 2007-10-01.
I want to use actually 01-10-2007.
How can I change the format of date? :roll:

Pages: 1 ... 25 26 27 28 [29] 30 31 32 33 34