- Timestamp:
- Apr 29, 2012, 1:41:34 PM (12 years ago)
- Location:
- trunk/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/configuration.php
r14512 r14513 222 222 223 223 // updating configuration if no error found 224 if ( 'sizes' != $page['section']and count($page['errors']) == 0)224 if (!in_array($page['section'], array('sizes', 'watermark')) and count($page['errors']) == 0) 225 225 { 226 226 //echo '<pre>'; print_r($_POST); echo '</pre>'; … … 521 521 $template->assign('watermark_files', $watermark_filemap); 522 522 523 $wm = ImageStdParams::get_watermark(); 524 525 $position = 'custom'; 526 if ($wm->xpos == 0 and $wm->ypos == 0) 527 { 528 $position = 'topleft'; 529 } 530 if ($wm->xpos == 100 and $wm->ypos == 0) 531 { 532 $position = 'topright'; 533 } 534 if ($wm->xpos == 50 and $wm->ypos == 50) 535 { 536 $position = 'middle'; 537 } 538 if ($wm->xpos == 0 and $wm->ypos == 100) 539 { 540 $position = 'bottomleft'; 541 } 542 if ($wm->xpos == 100 and $wm->ypos == 100) 543 { 544 $position = 'bottomright'; 545 } 546 547 if ($wm->xrepeat != 0) 548 { 523 if ($template->get_template_vars('watermark') === null) 524 { 525 $wm = ImageStdParams::get_watermark(); 526 549 527 $position = 'custom'; 550 } 528 if ($wm->xpos == 0 and $wm->ypos == 0) 529 { 530 $position = 'topleft'; 531 } 532 if ($wm->xpos == 100 and $wm->ypos == 0) 533 { 534 $position = 'topright'; 535 } 536 if ($wm->xpos == 50 and $wm->ypos == 50) 537 { 538 $position = 'middle'; 539 } 540 if ($wm->xpos == 0 and $wm->ypos == 100) 541 { 542 $position = 'bottomleft'; 543 } 544 if ($wm->xpos == 100 and $wm->ypos == 100) 545 { 546 $position = 'bottomright'; 547 } 548 549 if ($wm->xrepeat != 0) 550 { 551 $position = 'custom'; 552 } 551 553 552 $template->assign( 553 'watermark', 554 array( 555 'file' => $wm->file, 556 'minw' => $wm->min_size[0], 557 'minh' => $wm->min_size[1], 558 'xpos' => $wm->xpos, 559 'ypos' => $wm->ypos, 560 'xrepeat' => $wm->xrepeat, 561 'opacity' => $wm->opacity, 562 'position' => $position, 563 ) 564 ); 565 566 $template->append( 567 'watermark', 568 array(), 569 true 570 ); 554 $template->assign( 555 'watermark', 556 array( 557 'file' => $wm->file, 558 'minw' => $wm->min_size[0], 559 'minh' => $wm->min_size[1], 560 'xpos' => $wm->xpos, 561 'ypos' => $wm->ypos, 562 'xrepeat' => $wm->xrepeat, 563 'opacity' => $wm->opacity, 564 'position' => $position, 565 ) 566 ); 567 } 568 571 569 break; 572 570 } -
trunk/admin/include/configuration_watermark_process.inc.php
r14512 r14513 85 85 86 86 // step 3 - save data 87 if (count($errors) ==0)87 if (count($errors) == 0) 88 88 { 89 89 $watermark = new WatermarkParams(); -
trunk/admin/themes/default/template/configuration.tpl
r14512 r14513 320 320 321 321 {html_style}{literal} 322 input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;}323 .dErrorDesc {background-color:red; color:white; padding:0 5px;border-radius:10px; font-weight:bold;cursor:help;}324 322 .sizeEnable {width:50px;} 325 323 .sizeEditForm {margin:0 0 10px 20px;} … … 490 488 <label> 491 489 {'Apply watermark if width is bigger than'|@translate} 492 <input size="4" maxlength="4" type="text" name="w[minw]" value="{$watermark.minw}"{if isset($ferrors.watermark.minw)} class="dError"{/if}>490 <input size="4" maxlength="4" type="text" name="w[minw]" value="{$watermark.minw}"{if isset($ferrors.watermark.minw)} class="dError"{/if}> 493 491 </label> 494 492 {'pixels'|@translate} … … 498 496 <label> 499 497 {'Apply watermark if height is bigger than'|@translate} 500 <input size="4" maxlength="4" type="text" name="w[minh]" value="{$watermark.minh}"{if isset($ferrors.watermark.minh)} class="dError"{/if}>498 <input size="4" maxlength="4" type="text" name="w[minh]" value="{$watermark.minh}"{if isset($ferrors.watermark.minh)} class="dError"{/if}> 501 499 </label> 502 500 {'pixels'|@translate} … … 516 514 <div id="positionCustomDetails"> 517 515 <label>{'X Position'|@translate} 518 <input size="3" maxlength="3" type="text" name="w[xpos]" value="{$watermark.xpos}"{if isset($ferrors.watermark.xpos)}class="dError"{/if}>% 516 <input size="3" maxlength="3" type="text" name="w[xpos]" value="{$watermark.xpos}"{if isset($ferrors.watermark.xpos)} class="dError"{/if}>% 517 {if isset($ferrors.watermark.xpos)}<span class="dErrorDesc" title="{$ferrors.watermark.xpos}">!</span>{/if} 519 518 </label> 520 519 521 520 <br> 522 521 <label>{'Y Position'|@translate} 523 <input size="3" maxlength="3" type="text" name="w[ypos]" value="{$watermark.ypos}"{if isset($ferrors.watermark.ypos)}class="dError"{/if}>% 522 <input size="3" maxlength="3" type="text" name="w[ypos]" value="{$watermark.ypos}"{if isset($ferrors.watermark.ypos)} class="dError"{/if}>% 523 {if isset($ferrors.watermark.ypos)}<span class="dErrorDesc" title="{$ferrors.watermark.ypos}">!</span>{/if} 524 524 </label> 525 525 526 526 <br> 527 527 <label>{'X Repeat'|@translate} 528 <input size="3" maxlength="3" type="text" name="w[xrepeat]" value="{$watermark.xrepeat}"{if isset($ferrors.watermark.xrepeat)}class="dError"{/if}> 528 <input size="3" maxlength="3" type="text" name="w[xrepeat]" value="{$watermark.xrepeat}"{if isset($ferrors.watermark.xrepeat)} class="dError"{/if}> 529 {if isset($ferrors.watermark.xrepeat)}<span class="dErrorDesc" title="{$ferrors.watermark.xrepeat}">!</span>{/if} 529 530 </label> 530 531 </div> … … 533 534 <li> 534 535 <label>{'Opacity'|@translate}</label> 535 <input size="3" maxlength="3" type="text" name="w[opacity]" value="{$watermark.opacity}"{if isset($ferrors.watermark.opacity)}class="dError"{/if}> % 536 <input size="3" maxlength="3" type="text" name="w[opacity]" value="{$watermark.opacity}"{if isset($ferrors.watermark.opacity)} class="dError"{/if}> % 537 {if isset($ferrors.watermark.opacity)}<span class="dErrorDesc" title="{$ferrors.watermark.opacity}">!</span>{/if} 536 538 </li> 537 539 </ul> -
trunk/admin/themes/default/theme.css
r14512 r14513 1109 1109 font-weight:normal; 1110 1110 } 1111 1112 input[type="text"].dError {border-color:#ff7070; background-color:#FFe5e5;} 1113 .dErrorDesc {background-color:red; color:white; padding:0 5px;border-radius:10px; font-weight:bold;cursor:help;}
Note: See TracChangeset
for help on using the changeset viewer.