Changeset 17177 for extensions/BatchDownloader
- Timestamp:
- Jul 27, 2012, 4:44:19 PM (12 years ago)
- Location:
- extensions/BatchDownloader
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/admin.php
r16689 r17177 3 3 4 4 global $template, $page, $conf; 5 6 define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/'); 5 7 6 8 // tabsheet -
extensions/BatchDownloader/admin/template/style.css
r16697 r17177 46 46 width:120px; 47 47 } 48 49 .ui-slider { background:#666;border-radius:2px;border:1px solid #888; }50 .ui-slider .ui-slider-handle { border:1px solid #ccc;background:#444;border-radius:0.6em; }51 .ui-slider .ui-slider-range { background:#888;border-radius:2px; } -
extensions/BatchDownloader/include/BatchDownloader.class.php
r16697 r17177 425 425 } 426 426 427 $root_url = get_root_url(); 428 427 429 $out = ''; 428 430 for ($i=1; $i<=$this->data['nb_zip']; $i++) … … 432 434 if ($this->data['status'] == 'done' or $i < $this->data['last_zip']+1) 433 435 { 434 $out.= '<img src="'. BATCH_DOWNLOAD_PATH.'template/drive.png"> Archive #'.$i.' (already downloaded)';436 $out.= '<img src="'.$root_url.BATCH_DOWNLOAD_PATH.'template/drive.png"> Archive #'.$i.' (already downloaded)'; 435 437 } 436 438 else if ($i == $this->data['last_zip']+1) … … 438 440 $out.= '<a href="'.add_url_params($url, array('set_id'=>$this->data['id'],'zip'=>$i)).'" rel="nofollow" style="font-weight:bold;"' 439 441 .($i!=1 ? 'onClick="return confirm(\'Starting download Archive #'.$i.' will destroy Archive #'.($i-1).', be sure you finish the download. Continue ?\');"' : null). 440 '><img src="'. BATCH_DOWNLOAD_PATH.'template/drive_go.png"> Archive #'.$i.' (ready)</a>';442 '><img src="'.$root_url.BATCH_DOWNLOAD_PATH.'template/drive_go.png"> Archive #'.$i.' (ready)</a>'; 441 443 } 442 444 else 443 445 { 444 $out.= '<img src="'. BATCH_DOWNLOAD_PATH.'template/drive.png"> Archive #'.$i.' (pending)';446 $out.= '<img src="'.$root_url.BATCH_DOWNLOAD_PATH.'template/drive.png"> Archive #'.$i.' (pending)'; 445 447 } 446 448 … … 609 611 if (!class_exists('UserCollection')) throw new Exception(); 610 612 $UserCollection = new UserCollection($this->data['type_id']); 611 $set['NAME'] = l10n('Collection').': <a href="'.USER_COLLEC_PUBLIC.'view/'.$UserCollection->getParam('id').'">'.$UserCollection->getParam('name').'</a>'; 613 $infos = $UserCollection->getCollectionInfo(); 614 $set['NAME'] = l10n('Collection').': <a href="'.$infos['U_PUBLIC'].'">'.$UserCollection->getParam('name').'</a>'; 612 615 } 613 616 catch (Exception $e) -
extensions/BatchDownloader/include/download.inc.php
r16626 r17177 23 23 pwg_query('DELETE FROM '.BATCH_DOWNLOAD_TSETS.' WHERE id = '.$_GET['set_id'].';'); 24 24 $_SESSION['page_infos'][] = l10n('Download set deleted'); 25 redirect( 'index.php');25 redirect(get_root_url()); 26 26 } 27 27 … … 36 36 if (isset($next_file)) 37 37 { 38 $set['U_DOWNLOAD'] = BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip'];38 $set['U_DOWNLOAD'] = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$_GET['set_id'].'&zip='.$_GET['zip']; 39 39 array_push($page['infos'], sprintf(l10n('The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'), $set['U_DOWNLOAD'])); 40 40 } … … 42 42 if ($BatchDownloader->getParam('status') == 'new' and $BatchDownloader->getParam('nb_images') > 0) 43 43 { 44 $set['U_EDIT_SET'] = BATCH_DOWNLOAD_PUBLIC . 'view&set_id='.$_GET['set_id'];44 $set['U_EDIT_SET'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'view', array('set_id'=>$_GET['set_id'])); 45 45 } 46 46 … … 55 55 } 56 56 57 $set['U_CANCEL'] = BATCH_DOWNLOAD_PUBLIC . 'init_zip&set_id='.$_GET['set_id'].'&cancel';57 $set['U_CANCEL'] = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$_GET['set_id'], 'cancel'=>'true')); 58 58 59 59 $template->assign(array( … … 73 73 case 'view': 74 74 { 75 $self_url = BATCH_DOWNLOAD_PUBLIC . 'view&set_id='.$_GET['set_id'];75 $self_url = add_url_params(BATCH_DOWNLOAD_PUBLIC . 'view', array('set_id'=>$_GET['set_id'])); 76 76 77 77 $template->set_filename('index', dirname(__FILE__).'/../template/view.tpl'); … … 79 79 'BATCH_DOWNLOAD_PATH' => BATCH_DOWNLOAD_PATH, 80 80 'U_VIEW' => $self_url, 81 'U_INIT_ZIP' => BATCH_DOWNLOAD_PUBLIC . 'init_zip&set_id='.$_GET['set_id'],81 'U_INIT_ZIP' => add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$_GET['set_id'])), 82 82 'SET_ID' => $_GET['set_id'], 83 83 )); … … 137 137 $replace = $search.' 138 138 {strip}<a class="removeSet" href="{$U_VIEW}&remove={$thumbnail.id}" data-id="{$thumbnail.id}" rel="nofollow"> 139 {\'Remove from download set\'|@translate} <img src="{$ BATCH_DOWNLOAD_PATH}template/image_delete.png" title="{\'Remove from download set\'|@translate}">139 {\'Remove from download set\'|@translate} <img src="{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/image_delete.png" title="{\'Remove from download set\'|@translate}"> 140 140 </a>{/strip}'; 141 141 -
extensions/BatchDownloader/include/events.inc.php
r16697 r17177 18 18 { 19 19 global $tokens, $page, $conf; 20 21 define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/'); 20 22 21 23 if ($tokens[0] == 'download') … … 81 83 $BatchDownloader->createNextArchive(true); // make sure we have only one zip, even if 'max_size' is exceeded 82 84 83 $u_download = BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$BatchDownloader->getParam('id').'&zip=1';85 $u_download = get_root_url().BATCH_DOWNLOAD_PATH . 'download.php?set_id='.$BatchDownloader->getParam('id').'&zip=1'; 84 86 85 87 $null = null; … … 91 93 else 92 94 { 93 redirect( BATCH_DOWNLOAD_PUBLIC . 'init_zip&set_id='.$BatchDownloader->getParam('id'));95 redirect(add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$BatchDownloader->getParam('id')))); 94 96 } 95 97 } … … 104 106 $url = duplicate_index_url(array(), array('action')); 105 107 } 108 109 $url = add_url_params($url, array('action'=>'advdown_set')); 106 110 107 111 // toolbar button 108 112 $button = '<script type="text/javascript">var batchdown_count = '.count($page['items']).'; var batchdown_string = "'.l10n('Confirm the download of %d pictures?').'";</script> 109 <li><a href="'. $url .' &action=advdown_set" title="'.l10n('Download all pictures of this selection').'" class="pwg-state-default pwg-button" rel="nofollow"113 <li><a href="'. $url .'" title="'.l10n('Download all pictures of this selection').'" class="pwg-state-default pwg-button" rel="nofollow" 110 114 onClick="return confirm(batchdown_string.replace(\'%d\', batchdown_count));"> 111 <span class="pwg-icon batch-downloader-icon" style="background:url(\'' . BATCH_DOWNLOAD_PATH . 'template/zip.png\') center center no-repeat;"> </span><span class="pwg-button-text">'.l10n('Batch Downloader').'</span>115 <span class="pwg-icon batch-downloader-icon" style="background:url(\'' . get_root_url().BATCH_DOWNLOAD_PATH . 'template/zip.png\') center center no-repeat;"> </span><span class="pwg-button-text">'.l10n('Batch Downloader').'</span> 112 116 </a></li>'; 113 117 $template->concat('PLUGIN_INDEX_ACTIONS', $button); … … 165 169 166 170 array_push($data, array( 167 'URL' => BATCH_DOWNLOAD_PUBLIC . 'init_zip&set_id='.$BatchDownloader->getParam('id'),171 'URL' => add_url_params(BATCH_DOWNLOAD_PUBLIC . 'init_zip', array('set_id'=>$BatchDownloader->getParam('id'))), 168 172 'TITLE' => str_replace('"', "'", strip_tags($set['COMMENT'])), 169 173 'NAME' => $set['sNAME'], -
extensions/BatchDownloader/main.inc.php
r16598 r17177 18 18 define('BATCH_DOWNLOAD_LOCAL', PHPWG_ROOT_PATH . $conf['data_location'] . 'download_archives/'); 19 19 define('BATCH_DOWNLOAD_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__))); 20 define('BATCH_DOWNLOAD_PUBLIC', make_index_url(array('section' => 'download')) . '/');21 20 22 21 -
extensions/BatchDownloader/template/thumbnails_css_js.tpl
r16689 r17177 12 12 jQuery.ajax({ldelim} 13 13 type: "POST", 14 url: "{$ BATCH_DOWNLOAD_PATH}remove_image.php",14 url: "{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}remove_image.php", 15 15 data: {ldelim} "set_id": "{$SET_ID}", "toggle_id": toggle_id } 16 16 }).done(function(msg) {ldelim}
Note: See TracChangeset
for help on using the changeset viewer.