[OGDev] Run-up to 0.58

Bob Walker bob at randomness.org.uk
Wed Dec 13 02:02:37 GMT 2006


On Mon, 11 Dec 2006, Dominic Hargreaves wrote:

> I will release OpenGuides 0.58 by the end of the week. Developers:
> please let me know if you have active work going on and have things that
> you think will be ready for it so I can plan accordingly.
>

i just did it instead.
the current node_image stuff breaks the flickr terms of service if you use 
an image from flickr.So ive created a node_image_url for this link since 
just website might not be right.  Also attributing copyright is good.
find a patch attached. will almost certainly need house style applied to 
it :)


-- 
Bob Walker
http://www.randomness.org.uk/
Stress Kittens: Squeeze them till they cry!
The latest tech in homicidal tendency relief.
-------------- next part --------------
Index: templates/display_metadata.tt
===================================================================
--- templates/display_metadata.tt	(revision 914)
+++ templates/display_metadata.tt	(working copy)
@@ -6,9 +6,7 @@
 <div id="metadata" class="vcard">
 [% IF node_image %]
   <div id="node_image_box">
-    [% IF website %]<a href="[% website %]">[% END %]
-      <img id="node_image" src="[% node_image %]" alt="Picture of [% node_name %]" />
-    [% IF website %]</a>[% END %]
+	[% IF node_image_url %]<a href="[% node_image_url %]">[% END %]<img id="node_image" src="[% node_image %]" alt="Picture of [% node_name %] " />[% IF node_image_url %]</a>[% END %][% IF node_image_copyright %]<br />Copyright [% node_image_copyright %][% END %]
   </div>
 [% ELSE %]
   <span id="node_no_image" />
Index: templates/edit_form.tt
===================================================================
--- templates/edit_form.tt	(revision 914)
+++ templates/edit_form.tt	(working copy)
@@ -76,6 +76,18 @@
                 [% INCLUDE node_photo_notes.tt %]
               </td>
             </tr>
+            <tr>
+              <td class="label"><label for="node_image_url">Node Image URL:</label></td>
+              <td>
+                <input type="text" size="50" id="node_image_url" name="node_image_url" value="[% node_image_url %]" />
+              </td>
+            </tr>
+            <tr>
+              <td class="label"><label for="node_image_copyright">Node Image Copyright:</label></td>
+              <td>
+                <input type="text" size="50" id="node_image_copyright" name="node_image_copyright" value="[% node_image_copyright %]" />
+              </td>
+            </tr>
 [% END %]
             <tr>
               <td class="label"><label for="phone">Phone:</label></td>
Index: lib/OpenGuides/Template.pm
===================================================================
--- lib/OpenGuides/Template.pm	(revision 914)
+++ lib/OpenGuides/Template.pm	(working copy)
@@ -326,8 +326,16 @@
 
     my $node_image = $args{metadata} ? $metadata{node_image}[0]
                                      : $q->param("node_image");
+    my $node_image_url = $args{metadata} ? $metadata{node_image_url}[0]
+                                     : $q->param("node_image_url");
+    my $node_image_copyright = $args{metadata} ? $metadata{node_image_copyright}[0]
+                                     : $q->param("node_image_copyright");
+
     if ($config->enable_node_image && $node_image) {
         $vars{node_image} = $node_image;
+	$vars{node_image_url} = $node_image_url;
+        $vars{node_image_copyright} = $node_image_copyright;
+
     }
 
     if (exists $metadata{source}) {


More information about the OpenGuides-Dev mailing list