Changeset 22300 for extensions/Copyrights
- Timestamp:
- Apr 19, 2013, 3:49:00 PM (12 years ago)
- Location:
- extensions/Copyrights
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Copyrights/image.php
r11844 r22300 18 18 { 19 19 // Add the information after the author - so before the createdate 20 $search = '# <tr id="datecreate">#';20 $search = '#class="imageInfoTable">#'; 21 21 22 $replacement = ' 23 < tr id="Copyrights_name">24 < td class="label">{\'Copyright\'|@translate}</td>25 < td class="value">26 22 $replacement = 'class="imageInfoTable"> 23 <div id="Copyrights_name" class="imageInfo"> 24 <dt>{\'Copyright\'|@translate}</dt> 25 <dd> 26 {if $CR_INFO_NAME} 27 27 <a target="_blanc" href="{$CR_INFO_URL}" title="{$CR_INFO_NAME}: {$CR_INFO_DESCR}">{$CR_INFO_NAME}</a> 28 {else}{\'N/A\'|@translate}{/if} 29 </td> 30 </tr> 31 <tr id="datecreate">'; 28 {else} 29 {\'N/A\'|@translate} 30 {/if} 31 </dd> 32 </div>'; 32 33 33 34 return preg_replace($search, $replacement, $content); -
extensions/Copyrights/modify.php
r11794 r22300 3 3 // Add a prefilter 4 4 add_event_handler('loc_begin_admin', 'CR_set_prefilter_modify', 50 ); 5 add_event_handler('loc_begin_admin ', 'CR_modify_submit', 45 );5 add_event_handler('loc_begin_admin_page', 'CR_modify_submit', 45 ); 6 6 7 7 // Change the variables used by the function that changes the template 8 add_event_handler('loc_begin_admin ', 'CR_add_modify_vars_to_template');8 add_event_handler('loc_begin_admin_page', 'CR_add_modify_vars_to_template'); 9 9 10 10 function CR_set_prefilter_modify() … … 16 16 function CR_modify($content, &$smarty) 17 17 { 18 $search = "#< td><strong>{'Creation date'#"; // Not ideal, but ok for now :)18 $search = "#<strong>{'Creation date'#"; // Not ideal, but ok for now :) 19 19 20 20 // We use the <tr> from the Creation date, and give them a new <tr> 21 $replacement = '< td><strong>{\'Copyright\'|@translate}</strong></td>22 < td>21 $replacement = '<strong>{\'Copyright\'|@translate}</strong> 22 <br> 23 23 <select id="copyrightID" name="copyrightID"> 24 24 <option value="">--</option> 25 25 {html_options options=$CRoptions selected=$CRid} 26 26 </select> 27 </td> 28 </tr> 27 </p> 29 28 30 <tr> 31 <td><strong>{\'Creation date\''; 29 </p> 30 <p> 31 <strong>{\'Creation date\''; 32 32 33 33 return preg_replace($search, $replacement, $content); … … 36 36 function CR_add_modify_vars_to_template() 37 37 { 38 // Check if we are at the modify page (the problem is that this will send the stuff to every admin page that has an ?image_id... 39 if (isset($_GET['image_id'])) 38 if (isset($_GET['page']) and 'photo' == $_GET['page'] and isset($_GET['image_id'])) 40 39 { 41 40 global $template; … … 79 78 function CR_modify_submit() 80 79 { 81 // Check if we are at the modify page (the problem is that this will send the stuff to every admin page that has an ?image_id... 82 if (isset($_GET['image_id'])) 80 if (isset($_GET['page']) and 'photo' == $_GET['page'] and isset($_GET['image_id'])) 83 81 { 84 82 if (isset($_POST['submit']))
Note: See TracChangeset
for help on using the changeset viewer.