Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #101  
Old 04-12-2008, 06:49 AM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
ljcbraga, try upgrading to the latest Version of Lightroom (1.4.1), and let me know if how it works for you then.
__________________
Jay Williams | A Different View
Reply With Quote
  #102  
Old 04-12-2008, 02:42 PM
ljcbraga's Avatar
ljcbraga Offline
forum loafer
 
Join Date: Apr 2008
Location: Brasil
Posts: 6
Send a message via Skype™ to ljcbraga
Jay,

I've already did it. It still doesn't work. But you know, I figured out why. The problem is in my host.

As I'm a neewbie and as I not sure if I could set pixelpost up, I signed up a free host (10gbfreehost.com). They're quite alright but there are some routines that only works if you have a payed account. Probably working with APIs (outbound instructions) is one of those.

I'm experiencing the same problem with Defensio API. Carl, from Defensio, was the one who'd told me about the free hosting problem.

I've asked the host support for a solution.

I'm sorry if I bothered you with this problem and I'd like to thank you for taking your time to help me.

rgds,

Leonardo
Reply With Quote
  #103  
Old 04-21-2008, 05:15 AM
lotuseater Offline
forum loafer
 
Join Date: Mar 2008
Posts: 5
.jpg strip

I noticed code in the fourm for stripping the .jpg/.jpeg off images when they are uploaded from lightroom. I was wondering if you could elaborate a bit as to where to put this code. I am pretty new to editing .php files.
Thanks.
Ryan
http://lotuseaterphotography.com/pixelpost
Reply With Quote
  #104  
Old 04-21-2008, 05:38 AM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
Ok, well first you will need a plain-text editor, such as Notepad, or TextEdit.

Open up the file that goes in the admin folder, it's called "pp_upload.php".

Go to line #90, you should see this code:
PHP Code:
// Translate to Pixelpost format:
$_POST['headline'] = $_POST['title'];
$_POST['body'] = $_POST['description'];
$_POST['tags'] = trim($_POST['tags'],', '); 
Just add that extra line of code below that and you should be good to go.
it should look like this when you are done:
PHP Code:
// Translate to Pixelpost format:
$_POST['headline'] = $_POST['title'];
$_POST['body'] = $_POST['description'];
$_POST['tags'] = trim($_POST['tags'],', ');
$_POST['headline'] = str_replace(array(".JPG",".jpg"), "",$_POST['headline']); 
Save the changes, and re-upload the file, and you're done!
__________________
Jay Williams | A Different View
Reply With Quote
  #105  
Old 04-23-2008, 03:53 PM
unpackedrope Offline
forum loafer
 
Join Date: Apr 2008
Posts: 4
Transfer Custom Field data?

Hi Jay,

I'm currently using this addon to upload shots to my blog and it's working great.

I also use klimin_a_s' <CUSTOM_FIELDS> addon to add lens details for the shots too as I believe that the lens data is stripped when exported to jpg. At the moment this means I'm uploading with pp_upload and then going into admin and adding the lens details to the custom field manually for each shot I upload.

Is there anything in the code for the module files or pp_upload that could be added to/modified so that it would transfer this data across automatically? Perhaps read it from the EXIF in Lightroom itself, or even just give me the option to select from a list of lenses when I'm in the export window of Lightroom?

Thanks for your help.
Reply With Quote
  #106  
Old 04-23-2008, 04:16 PM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
Well, as a Lightroom plugin, it has access to all of the photo's data, which is quite handy.

So yes, it is quite possible to modify the plugin and/or the admin code to auto-import that information.

What exact name you are using for your your Custom Field lens info.
__________________
Jay Williams | A Different View
Reply With Quote
  #107  
Old 04-24-2008, 07:54 PM
unpackedrope Offline
forum loafer
 
Join Date: Apr 2008
Posts: 4
Sweet!

I'm using a single custom field with the ID Name 'Lens' - see attached.

Thanks for your help.


&
Reply With Quote
  #108  
Old 05-08-2008, 05:59 AM
TAOG's Avatar
TAOG Offline
forum loafer
 
Join Date: May 2008
Location: Berlin/Germany
Posts: 19
Send a message via ICQ to TAOG Send a message via Skype™ to TAOG
after trying some hours that plugin, it rocks.
but two extra codes disabled in my admin backend the extension tab.

$_POST['tags'] = str_replace(" ", "_", str_replace(", ", ",", $_POST['tags']));

and

$_POST['headline'] = str_replace(array(".JPG",".jpg"), "",$_POST['headline']);


booth are things, i will use. than i got also the error popup with wrong key&url. actually it works with the error message.
Reply With Quote
  #109  
Old 05-08-2008, 03:03 PM
jaywilliams's Avatar
jaywilliams+ Offline
Team Pixelpost
 
Join Date: Sep 2005
Posts: 1,003
Send a message via AIM to jaywilliams Send a message via MSN to jaywilliams Send a message via Yahoo to jaywilliams Send a message via Skype™ to jaywilliams
Those lines of code shouldn't break the addons page.

To find out what's causing the page not to load, add the text "errorsall" to the end of the url, like this:

/admin/index.php?view=addons&errorsall
__________________
Jay Williams | A Different View
Reply With Quote
  #110  
Old 05-17-2008, 03:03 PM
TunaFish Offline
pp regular
 
Join Date: Dec 2007
Posts: 30
geotagging

Hi Jay, everyone.
First of all, thanks for this supah plug Jay, no more waisting time exporting and uploading.
Now that I am waiting for my Solmeta DP-GPS N2 I needed to get the GPS data uploaded to the googlemap field with the googlemap addon and I thought I'd share my lines here..

Okay I have 3 functions for pulling the coordinates from the geotagged photo's which I placed in the
if (!isset($_GET['view'])) {

PHP Code:
    function exifToNumber($value$format) {
        
$spos strpos($value'/');
        if (
$spos === false) {
            return 
sprintf($format$value);
        } else {
            list(
$base$divider) = split('/'$value2);
            if (
$divider == 0) {
                return 
sprintf($format0);
            } else {
                return 
sprintf($format, ($base $divider));
            }
        }
    }
    function 
exifToCoordinate($reference$coordinate) { // $coordinate is an array
        
if ($reference == 'S' || $reference == 'W') {
            
$prefix '-';
        } else {
            
$prefix '';
        }
        return 
$prefix sprintf('%.6F'exifToNumber($coordinate[0], '%.6F') +
        (((
exifToNumber($coordinate[1], '%.6F') * 60) +
        (
exifToNumber($coordinate[2], '%.6F'))) / 3600));
    }
    function 
getCoordinates($filename) {    
        
$exif exif_read_data($filename0true);
    
        if (isset(
$exif['GPS']['GPSLatitudeRef']) && isset($exif['GPS']['GPSLatitude']) && isset($exif['GPS']['GPSLongitudeRef']) && isset($exif['GPS']['GPSLongitude'])) {
            return array (
                
exifToCoordinate($exif['GPS']['GPSLatitudeRef'], $exif['GPS']['GPSLatitude']),
                
exifToCoordinate($exif['GPS']['GPSLongitudeRef'], $exif['GPS']['GPSLongitude'])
            );
        } else {
            
// print "no GPS meta found...";
            // return false;
            
return "";
        }    
    } 
Than in
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {

PHP Code:
                      // GPS
                      
$exifgps_array getCoordinates($uploadfile);
                      if (
$exifgps_array[0] == or $exifgps_array[1] == 0) {
                        
$exifgps_string ""// null
                    
} else {
                        
$exifgps_string "(" $exifgps_array[0] . ", " $exifgps_array[1] . ")"// lat,lon
                    

And finally to get the coordinates string into the googlemap field in the database:

PHP Code:
$query "INSERT INTO ".$pixelpost_db_prefix."pixelpost (datetime, headline, body, image, alt_headline, alt_body, comments, exif_info, googlemap)
                VALUES('$datetime', '$headline', '$body', '$image', '$alt_headline', '$alt_body', '$comments_settings', '$exif_info_db', '$exifgps_string')"

I hope this helps someone..
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 04:29 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs