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 - thehammer

Pages: [1] 2
1
you're still interested in the responsive template?

2
...my 2 cents for this MOD:

open images.php

goto to line 2846

after :

Code: [Select]
echo "<br />yyyy-mm-dd hh:mm:ss";

ADD
Code: [Select]
// EXIF Date
          $exif = read_exif_data(MEDIA_PATH. '/' .$image_row['cat_id'].'/'.$image_row['image_media_file']);
          ereg("([0-9]{4}):([0-9]{2}):([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $exif["DateTimeOriginal"], $exif_data_created);
          $exif_value[i] = $exif_data_created[1].'-'.$exif_data_created[2].'-'.$exif_data_created[3].' '.$exif_data_created[4].':'.$exif_data_created[5].':'.$exif_data_created[6];
          if ( $exif_value[i] <> '-- ::' ){     
             echo "<br /><br /><a href='#' onClick=\"document.getElementById('image_date[$i]').value='$exif_value[i]'\";>EXIF date: <b>$exif_value[i]</b></a><br /><br />";
          }


Now you can, with a click, change the image date to original EXIF date  :)
 

3
Sorry!

This is the code to insert in the admin_functions.php 

Code: [Select]
function get_exif_insert_link($file, $input, $add_text = 1) {
  $exif = read_exif_data($file);
  ereg("([0-9]{4}):([0-9]{2}):([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $exif["DateTimeOriginal"], $exif_data_created);
  $value = $exif_data_created[1].'-'.$exif_data_created[2].'-'.$exif_data_created[3].' '.$exif_data_created[4].':'.$exif_data_created[5].':'.$exif_data_created[6];
  if (!empty($value)) {
          $html = "\n<input type=\"hidden\" name=\"hidden_".$input."\" value=\"".trim($value)."\">\n";
          $html .= "<script language=\"javascript\">\n<!--\n";
          $html .= "this.document.writeln('<br /><br /><input type=\"button\" value=\"EXIF Date Time Original &raquo;: $value \" onClick=\"this.form.".$input.".value=".(($add_text) ? "this.form.".$input.".value + " : "")."this.form.hidden_".$input.".value\"> <br /><br />');";
          $html .= "\n//-->\n</script>\n";
          return $html;
     }
}

4
at first, thank you for this incredible mod!

I've a request:

can you insert my little mod to change the image date under the quick edit page?

I explain:

I've changed this code in edit image
Code: [Select]
$title = $lang['field_date'].$lang['date_desc'].$lang['date_format'].((isset($file_src)) ? get_iptc_insert_link($file_src, "date_created", "image_date", 0) : ""); 

with this

Code: [Select]
$title = $lang['field_date'].$lang['date_desc'].$lang['date_format'].((isset($file_src)) ? get_exif_insert_link($file_src,"image_date", 0) : "");
to update the date with the EXIF date.

May be wonderful to use this in the Quick Edit.

Tia!




5
... but it's not the same.
with my little mod you can insert the original date during the editing mode in Admin CP.

6
I search for a long time this little mod without result...
Now i write by myself and I' m happy to share with you!

open admin_functions.php and add to the top this code:

Code: [Select]

// ***[Little MOD insert Date Time Original from EXIF ] ***
function get_exif_insert_originaldatetime($file, $input, $add_text = 1) {
  $exif = read_exif_data($file);
  ereg("([0-9]{4}):([0-9]{2}):([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})", $exif["DateTimeOriginal"], $exif_data_created);
  $value = $exif_data_created[1].'-'.$exif_data_created[2].'-'.$exif_data_created[3].' '.$exif_data_created[4].':'.$exif_data_created[5].':'.$exif_data_created[6];
  if (!empty($value)) {
          $html = "\n<input type=\"hidden\" name=\"hidden_".$input."\" value=\"".trim($value)."\">\n";
          $html .= "<script language=\"javascript\">\n<!--\n";
          $html .= "this.document.writeln('<br /><br /><input type=\"button\" value=\"EXIF Date Time Original &raquo;: $value \" onClick=\"this.form.".$input.".value=".(($add_text) ? "this.form.".$input.".value + " : "")."this.form.hidden_".$input.".value\"> <br /><br />');";
          $html .= "\n//-->\n</script>\n";
          return $html;
     }
}


open image.php search:

Code: [Select]
$title = $lang['field_date'].$lang['date_desc'].$lang['date_format'].((isset($file_src)) ? get_iptc_insert_link($file_src, "date_created", "image_date", 0) : "");

and replace with:

Code: [Select]
// $title = $lang['field_date'].$lang['date_desc'].$lang['date_format'].((isset($file_src)) ? get_iptc_insert_link($file_src, "date_created", "image_date", 0) : "");
// ***[MOD insert Date Time Original from EXIF ] ***
$title = $lang['field_date'].$lang['date_desc'].$lang['date_format'].((isset($file_src)) ? get_exif_insert_originaldatetime($file_src,"image_date", 0) : "");

Now you can insert the image original date creation when a image is  edited  ...

7
 :D :D :D thanks !

8
Chit Chat / digitalwhisper.com now is Tableless & Valid XHTML 1.0 Strict!
« on: December 31, 2007, 01:28:06 PM »
Hi, i've updated my 4images site...

Now is completlly "tableless" according to the W3C Recommendations ( http://w3tableless.com/?uri=http://www.digitalwhisper.com)
and Valid XHTML 1.0 Strict... ( http://validator.w3.org/check?uri=http://www.digitalwhisper.com )

A long job and a lot of code writing... but i' m very happy!

Let me know what do you think.

thanks!

link: http://www.digitalwhisper.com

PS: happy new year!

9

only via htaccess ...
i've changed the 0 to false no reaction...

thanks for your support!

10
Quote
that is the same... but i don't know where insert it in the 4images  php files ...

You can find in includes/sessions.php file.

it does not work ( for me ) ... otherwise I did not have the problem.. :)

11
i've inserted in htaccess the following instruction:
 
Code: [Select]
php_flag session.use_trans_sid offand ALL is ok!!!  ;)

i found another solution:
Code: [Select]
ini_set('session.use_trans_sid', false);
that is the same... but i don't know where insert it in the 4images  php files ...





12
found the cause.

Quote
"The problem is because PHP is adding the following HTML tag into your HTML to transport the Session id:
Code:
<input type="hidden" name="PHPSESSID" value="fa266b3bf02959848ab2ecb6d4ce1727" />

As you are using XHTML Strict DOCTYPE. The validator is failing because form field tags, such as input and textarea etc must be contained within block level elements. They cannot be on their own.

Solution:

1. Downgrade from XHTML Strict to XHTML Transitional. XHTML Transitional does not require block level elements to be wrapped around form field tags.
2. If you want to stay XHTML Strict you are going to have change PHP's configuration to only use only cookies and not use any other method to transport the sessions id. However this will break you PHP application if your users doesn't have cookies enabled."

about 3 hours for nothing.... bha!

13
 8O 8O 8O

please can you explain?

14
thanks thunderstrike but i need to locate where the string:
"<input type="hidden" name="sessionid" value="" />"
is created and modify it to  "<div> <input type="hidden" name="sessionid" value="" /> </div>"

this is the only field that is not inserted in the comment_form  template



15
... the form run ok  ...
but when i try to validate the page, have the above mentioned error...

If I know  WHERE is located in 4images scripts the creation of this  hidden field form.... ( <input type="hidden" name="sessionid" value="f2c2d94452abe9a7ae1affebf8d1051d" />)  i can solve my problem... ;)

may be that adding a little code like <div>... </div> is enough for a successful Validation....

Pages: [1] 2
Post your comments here