Skip to content
Permalink
Browse files

added picture links to GPX files

  • Loading branch information...
following
following committed Feb 11, 2013
1 parent 1dc8526 commit 469d2bbdbffebf8e2214060773ab2a48840b36b6
Showing with 26 additions and 1 deletion.
  1. +4 −0 htdocs/doc/sql/static-data/data.sql
  2. +22 −1 htdocs/lib/search.gpx.inc.php
@@ -2254,6 +2254,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1814', 'Reporte
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1815', 'You have to check that you are sure!', '2013-02-09 17:34:01');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1816', 'cache description was removed because owner declined content license', '2013-02-09 17:34:01');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1817', 'User status was successfully changed.', '2013-02-09 17:34:01');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1818', 'Spoiler', '2013-02-11 11:40:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1819', 'After saving, you may need to press the reload button in your browser to see the selected picture in your profile.', '2013-02-15 00:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1820', 'You can now <a href=\"login.php\">login</a> with the new password.', '2013-02-14 00:48:04');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1821', 'OC.de new', '2013-02-15 00:48:04');
INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1815', './adminuser.php', '75');
INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1816', './lib2/logic/user.class.php', '765');
INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1817', './templates2/ocstyle/adminuser.tpl', '20');
INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1818', './lib/search.gpx.inc.php', '698');
INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1819', './lang/de/ocstyle/change_statpic.tpl', '72');
INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1820', './lang/de/ocstyle/newpw.tpl', '14');

INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1815', 'DE', 'Du muss bestaetigen, dass du sicher bist!', '2013-02-09 19:31:30');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1816', 'DE', 'Die Cachebeschreibung wurde gel\&ouml;scht, weil der Besitzer die Opencaching.de-Datenlizenz abgelehnt hat.', '2013-02-09 19:31:30');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1817', 'DE', 'Der Benutzerstatus wurde erfolgreich geändert.', '2013-02-09 19:31:30');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1818', 'DE', 'Spoiler', '2013-02-11 11:40:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1819', 'DE', 'Nach dem Speichern musst du evtl. auf den Seiten-Neuladeknopf deines Browsers drücken, um das gewählte Bild in deinem Profil zu sehen.', '2013-02-15 00:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1820', 'DE', 'Du kannst dich nun mit dem neuen Passwort <a href=\"login.php\">anmelden</a>.', '2013-02-14 00:48:06');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1821', 'DE', 'OC.de neu', '2013-02-14 00:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1815', 'EN', 'You have to check that you are sure!', '2013-02-09 19:30:23');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1816', 'EN', 'The cache description was removed, because the owner declined the Opencaching.de data license.', '2013-02-09 19:30:23');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1817', 'EN', 'User status was successfully changed.', '2013-02-09 19:31:30');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1818', 'EN', 'Spoiler', '2013-02-11 11:40:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1819', 'EN', 'After saving, you may need to press the reload button in your browser to see the selected picture in your profile.', '2013-02-14 00:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1820', 'EN', 'You can now <a href=\"login.php\">login</a> with the new password.', '2013-02-14 00:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1821', 'EN', 'OC.de new', '2013-02-14 00:48:07');
@@ -46,7 +46,7 @@
<groundspeak:country>{country}</groundspeak:country>
<groundspeak:state>{state}</groundspeak:state>
<groundspeak:short_description html="True">{shortdesc}</groundspeak:short_description>
<groundspeak:long_description html="True">{desc}</groundspeak:long_description>
<groundspeak:long_description html="True">{desc}&lt;br /&gt;{images}</groundspeak:long_description>
{hints} <groundspeak:logs>
{logs} </groundspeak:logs>
<groundspeak:travelbugs>
@@ -437,6 +437,7 @@
$thisline = mb_ereg_replace('{shortdesc}', xmlentities($r['short_desc']), $thisline);
$thisline = mb_ereg_replace('{desc}', xmlentities($r['desc']), $thisline);
$thisline = mb_ereg_replace('{images}', getPictures($r['cacheid']), $thisline);
if (isset($gpxType[$r['type']]))
$thisline = mb_ereg_replace('{type}', $gpxType[$r['type']], $thisline);
@@ -682,4 +683,24 @@ function getCacheNote($userid, $cacheid)
return null;
}
// based on oc.pl code
function getPictures($cacheid)
{
global $translate;
$retval = "";
$rs = sql_slave("SELECT uuid, title, url, spoiler FROM pictures WHERE object_id='&1' AND object_type=2 AND display=1 ORDER BY date_created", $cacheid);
while ($r = sql_fetch_array($rs))
{
$retval .= '&lt;img src="' . $r['url'] . '"&gt;&lt;br /&gt;';
if ($r['spoiler'])
$retval .= $translate->t('Spoiler','',basename(__FILE__), __LINE__) . ': ';
$retval .= xmlentities($r['title']) . '&lt;br /&gt; ';
}
mysql_free_result($rs);
return $retval;
}
?>

0 comments on commit 469d2bb

Please sign in to comment.
You can’t perform that action at this time.