Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Google Earth Coppermine Flickr-like gallery MOD  (Read 14226 times)

0 Members and 1 Guest are viewing this topic.

Caio Borghoff

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 5
Google Earth Coppermine Flickr-like gallery MOD
« on: January 15, 2006, 04:24:42 am »

For those who have Coppermine bridged with phpBB, I have created a MOD to display galleries images with Google Earth, like Flichr does.

Viisit http://www.phpbb.com/phpBB/viewtopic.php?t=357952 to see this MOD

I'm sure that even who don't have Coppermine bridged with phpBB could benefit form this MOD with some post-modifications.

The MOD is still in development, but is working for me with a few limitations. (see NOTES for details)

Have fun.

Caio Borghoff

« Last Edit: January 15, 2006, 11:36:23 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Google Earth Coppermine Flickr-like gallery MOD
« Reply #1 on: January 15, 2006, 11:39:06 pm »

Pasting your initial announcement message into my posting and attaching your mod to it in case the page goes down some day. Thanks for the contrib.
Quote from: Caio Borghoff
MOD Title: Google Earth Coppermine Flickr-like gallery MOD

MOD Description: This mod allow to display geo-referenced Coppermine Gallery pictures with Google Earth (like Flickr) trough user profile buttons and trough Coppermine menu

MOD Version: 0.0.0

MOD Tested on: 2.0.17

NOTES:

This MOD require Coppermine Gallery bridged with phpBB

The coordinates format must be decimal!!

This MOD still need modifications to allow user and admin to activate the Google Earth buttom from profile administration panel, to hide buttons from users that do not have geo-referenced pictures on Coppermine Galleries and to avoid pictures from private galleries to be displayed through Google Earth. By now, the admin must activate the user Google buttom from phpMyAdmin. Any contributions will be extremely appreciated.

This MOD is based on the 'Orkut Profile MOD' [ĞÆMØN øf NEME§I§] < gustavo@acidnuts.com > (Gustavo Montes) http://www.phpbb.com.br and   on original "Export to Google Earth KML" hack from dawidi posted on Atlas Mod forum


DOWNLOAD

DEMO for all gallery pictures here

DEMO for user pictures profile buttom

Have fun

Caio Borghoff


**Sorry for any spelling erros. English is my second language.**

[edit 2006-01-25]
Please note: Caio's mod has gone into another direction, so I recommend going to the page Caio refered to and get the most recent version of his mod there. This posting is only there for reference, it contains an outdated copy of the initial mod. The mod description (the text I quoted) has changed as well.
[/edit]
« Last Edit: January 25, 2006, 07:31:54 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Google Earth Coppermine Flickr-like gallery MOD
« Reply #2 on: January 15, 2006, 11:41:26 pm »

Is it possible to use this mod as well with standalone coppermine (without having it bridged with phpBB)? If yes, how is this done.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Google Earth Coppermine Flickr-like gallery MOD
« Reply #3 on: January 24, 2006, 01:42:26 am »

There's a $CONFIG variable that stores the gallery's location so you can use that instead of the URL in the code. $CONFIG['ecards_more_pic_target']
Logged

Caio Borghoff

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 5
Re: Google Earth Coppermine Flickr-like gallery MOD
« Reply #4 on: January 25, 2006, 06:58:29 am »

Gaugau,

Please update your quote, because my MOD went in completely different direction.

Now it is integrated with TranzNDance Coppermine photos/files on Google Maps MOD

Now the only modification needed to work in standalone Coppermine is in the "geofoto.php". I don't know how to do that, but here is the original code that works with phpBB.

Code: [Select]
<?php
define
('IN_PHPBB'true);
$phpbb_root_path './';
include(
$phpbb_root_path 'extension.inc');
include(
$phpbb_root_path 'common.'.$phpEx);

   
$sql "SELECT pid, title, caption, owner_name, filepath, filename, user1, user2, user3, user4, user5, latitude, longitude FROM cpg_pictures WHERE NOT (longitude=0 AND latitude=0)";
   if ( !(
$result $db->sql_query($sql)) )
   {
      
message_die(GENERAL_ERROR'Could not obtain pics list'''__LINE____FILE__$sql);
   }
header('Content-type: application/keyhole');
?>

<kml xmlns="http://earth.google.com/kml/2.0" encoding="ISO-8859-1">
<Document>
<LookAt>
    <longitude>-32</longitude>
    <latitude>-4</latitude>
    <range>1400000</range>
    <tilt>30</tilt>
    <heading>0</heading>
 </LookAt>
<description>Your Gallery Title</description>
  <Style id="myPM">
    <IconStyle>
      <Icon>
        <href>http://www.yourdomain.com/images/icon.gif</href>
      </Icon>
    </IconStyle>
  </Style>
<?php

   
while ( $row $db->sql_fetchrow($result) )
   {
      echo(
"<Placemark><name><![CDATA[Photo ".htmlentities($row['pid'])."]]></name><description><![CDATA[www.yourdomain.com<br /><br />]]><![CDATA[<a href=\"http://www.yourdomain.com/coppermine/displayimage.php?pos=-".htmlentities($row['pid'])."\"><img src=\"http://www.yourdomain.com/coppermine/albums/".htmlentities($row['filepath']).htmlentities($row['filename'])."\" width=\"380\"></a><br /><font face=\"Verdana\" style=\"font-size: 14pt;\" color=\"#b00\"><b>".htmlentities($row['title'])."</b></font><br />Copyright &copy; ]]><![CDATA[".htmlentities($row['owner_name'])." <br /><br /><br />]]><![CDATA[<table width=\"380\" height=\"100%\"><tr><td>".htmlentities($row['caption'])."</td></tr></table><br / >]]><![CDATA[<a href=\"http://www.yourdomain.com/coppermine/displayimage.php?pos=-".htmlentities($row['pid'])."\">See image details...</a><br /><br />]]><![CDATA[<b>Custom field 1: </b><br/>]]><![CDATA[".htmlentities($row['user1'])." <br /><br />]]><![CDATA[<b>Custom field 4</b><br />]]><![CDATA[".htmlentities($row['user4'])." <br /><br />]]><![CDATA[<a href=\"http://www.yourdomain.com/coppermine/addfav.php?pid=".htmlentities($row['pid'])."\">Add to My Favorites</a><br /><br />]]></description><styleUrl>#myPM</styleUrl>");
      echo(
"<Point><coordinates>".$row['longitude'].",".$row['latitude']."</coordinates></Point></Placemark>");
   }

?>

</Document>
</kml>

If someone could change the first lines of the code above to allow this file to run inside Coppermine directory, you can add it to TranzNDance  MOD files and run this script to integrate with Google Earth.

 
Logged

Caio Borghoff

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 5
Re: Google Earth Coppermine Flickr-like gallery MOD
« Reply #5 on: January 25, 2006, 07:07:48 am »

There's a $CONFIG variable that stores the gallery's location so you can use that instead of the URL in the code. $CONFIG['ecards_more_pic_target']

Not yet, because my MOD is bridged with phpBB. I don't know if it will work with the $CONFIG variable. Maybe you can copy the code in the previous post and change it to run inside Coppermine. If you do that you will be able to use it as an addon on your MOD. Please don't forget to quote the original author (this is a modification form a dawidi hack posted on Atlas Mod forum )  if you decide to use it.

cheers
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Google Earth Coppermine Flickr-like gallery MOD
« Reply #6 on: January 25, 2006, 07:28:41 am »

I suggest you paste the quote into your first post, then you can edit it as you see fit whenever you like. I'll modify the whole posting of mine. I would have prefered it though if you had started another thread and left the existing one as-is, but anyway, it's your mod.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Google Earth Coppermine Flickr-like gallery MOD
« Reply #7 on: January 25, 2006, 05:42:48 pm »

Not yet, because my MOD is bridged with phpBB. I don't know if it will work with the $CONFIG variable. Maybe you can copy the code in the previous post and change it to run inside Coppermine. If you do that you will be able to use it as an addon on your MOD. Please don't forget to quote the original author (this is a modification form a dawidi hack posted on Atlas Mod forum )  if you decide to use it.

cheers
Can't you get the info from the config table? You can get the pic data from Coppermine, so you should be able to  get the config info.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.