Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Php coding problem ... please help.. dun understand the erro

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Php coding problem ... please help.. dun understand the erro

Postby tradertt » Thu Feb 27, 2003 10:57 am

Warning: rename(./data/media/1/guides.jpg,./data/media/1/guides.jpg.shd) [function.rename]: No such file or directory in /home/virtual/site178/fst/var/www/html/4images/includes/annotate.php on line 65

I am using 4 images and wanted to use watermark - but I got this problem .. can anyone figure out what the error means? In layman terms .. dun understnad what the error is talking about
tradertt
New php-forum User
New php-forum User
 
Posts: 4
Joined: Thu Feb 27, 2003 10:56 am

Postby gorshing » Thu Feb 27, 2003 11:54 am

So ./data/media/1/guides.jpg full path is

/home/virtual/site178/fst/var/www/html/4images/includes/data/media/1/guides.jpg

Man! Are you sure that is long enough?
User avatar
gorshing
New php-forum User
New php-forum User
 
Posts: 12
Joined: Thu Dec 05, 2002 5:56 pm
Location: Oklahoma, US

Postby tradertt » Thu Feb 27, 2003 12:01 pm

I did not code that but could you look at this text file for me and see if anything can be changed?

Code: Select all
#############################################################################################
## Title: Auto annotate images MOD for 4images - Image Gallery Management System.
## Version: 1.1
## Author: Silly Little Lamer <sll@dalnet.ru>
##
## Description:
## This MOD automatically place a line of custom text, called "Annotation" on every
## image uploaded to the Gallery. Fully customisable: font type, size and color, shadow
## usage, offsets, annotation location, etc. "Batch Annotate" admin plugin included, to
## annotate images, uploaded to your gallery before you installed this MOD.
##
## Requirements:  GD2 Library compiled with Freetype support. Also works with ImageMagic,
##                but GD still needed for some functions, which ImageMagic is missing.
##
##  GD users can check http://www.coupin.net/gd-freetype/
##                 and http://www.coupin.net/gd-freetype/windows.php
##
## New in v.1.1 - Now you can customize both text and shadow colors and set alpha blending
##                (text transparency) value for your annotation (thanks to V@no)
##
## Attention! Since this MOD is altering 4images database, please go Control Panel
## and backup you database!
##
## Installation Level:   Easy
## Installation Time:   10 Minutes
##
## Files To Edit: 4
##   /4images/member.php
##      /4images/admin/settings.php
##   /4images/lang/english/admin.php
##   /lang/english/main.php
##
#############################################################################################
## BEFORE ADDING THIS MOD, YOU SHOULD BACK UP ALL FILES RELATED TO 4IMAGES!
#############################################################################################
#
#-----[ COPY FILES ]----------------------------------
#

install_annotation.php   >>> to the ROOT 4images directory
annotate.ttf      >>> to the ROOT 4images directory
ia.sql         >>> to the ROOT 4images directory

annotate.php      >>> to the /includes directory

batch_annotate.php   >>> to the /admin/plugins directory (create, if not exists)

#
#-----[ RUN ]----------------------------------------
#

/4images/install_annotation.php

All neccessary fields will be added to 4images database.
Delete install_annotation.php and ia.sql for security reasons.

#
#-----[ OPEN ]----------------------------------------
#

/4images/member.php

#
#-----[ FIND ]----------------------------------------
#

  if (create_thumbnail($src, $dest, $quality, $dimension, $resize_type)) {
     $new_thumb_name = $new_name;
 
#
#-----[ AFTER ADD ]------------------------------------
#

//-----------------------------------------------------
// --- Annotate Images --------------------------------
//-----------------------------------------------------

require(ROOT_PATH.'includes/annotate.php');

function annotate_image($file) {
  global $convert_options, $config;

if ($config['annotation_use']) {

  $file_bak = $file.".bak";
  if (!rename($file, $file_bak)) {
    return false;
  }
  $annotate_handle = "annotate_image_".$convert_options['convert_tool'];
  if ($annotate_handle($file_bak, $file)) {
    @chmod($file, CHMOD_FILES);
    @unlink($file_bak);
    return true;
  }
  else {
    rename($file_bak, $file);
    return false;
  }
 }
}

  if ($direct_upload) {
   $ann_src = MEDIA_PATH."/".$cat_id."/".$new_name;
   $ann_dest = MEDIA_PATH."/".$cat_id."/".$new_name;
  }
  else {
   $ann_src = MEDIA_TEMP_PATH."/".$new_name;
   $ann_dest = MEDIA_TEMP_PATH."/".$new_name;
  }
  if (annotate_image($ann_src, $ann_dest)) {
      $annotated = 1;
  }

//-----------------------------------------------------


#
#-----[ OPEN ]----------------------------------------
#

/4images/admin/settings.php

#
#-----[ FIND ]----------------------------------------
#

function show_image_order_select($setting_name, $setting_value) {
  global $image_order_optionlist;

#
#-----[ DIRECT BEFORE, ADD ]--------------------------
#

function show_annotation_v_positioning_select($setting_name, $setting_value) {
  global $annotation_v_positioning_optionlist;
  echo "<select name=\"setting_item[".$setting_name."]\">";
  foreach ($annotation_v_positioning_optionlist as $key => $val) {
    echo "<option value=\"$key\"";
    if ($setting_value == $key) {
      echo " selected=\"selected\"";
    }
    echo ">".$val."</option>";
  }
  echo "</select>";
}

function show_annotation_h_positioning_select($setting_name, $setting_value) {
  global $annotation_h_positioning_optionlist;
  echo "<select name=\"setting_item[".$setting_name."]\">";
  foreach ($annotation_h_positioning_optionlist as $key => $val) {
    echo "<option value=\"$key\"";
    if ($setting_value == $key) {
      echo " selected=\"selected\"";
    }
    echo ">".$val."</option>";
  }
  echo "</select>";
}

#
#-----[ FIND ]----------------------------------------
#

  show_form_footer($lang['save_changes'], "", 2);

#
#-----[ DIRECT BEFORE, ADD ]--------------------------
#

if ($config['convert_tool'] != 'netpbm') {
  show_table_separator($setting_group[8], 2, "#setting_group_8");
  show_setting_row("annotation_use", "radio");
  show_setting_row("annotation_text");
  show_setting_row("annotation_font");
  show_setting_row("annotation_font_size");
  show_setting_row("annotation_fill_color");
  show_setting_row("annotation_shadow_color");
  if ($config['convert_tool'] != 'im') {
  show_setting_row("annotation_fill_alpha");
  show_setting_row("annotation_shadow_alpha");
  }
  show_setting_row("annotation_use_shadow", "radio");
  show_setting_row("annotation_shadow_offset");
  show_setting_row("annotation_image_quality");
  show_setting_row("annotation_v_alignment", "show_annotation_v_positioning_select");
  show_setting_row("annotation_h_alignment", "show_annotation_h_positioning_select");
  show_setting_row("annotation_top_offset");
  show_setting_row("annotation_bottom_offset");
  show_setting_row("annotation_left_offset");
  show_setting_row("annotation_right_offset");
}

#
#-----[ OPEN ]----------------------------------------
#

/4images/lang/english/admin.php

#
#-----[ FIND ]----------------------------------------
#

$setting['display_whosonline'] = "Display \"Who's Online\". Only visible for admins when deactivated.";
$setting['highlight_admin'] = "Display admins bold in \"Who's online\" ";

#
#-----[ AFTER ADD ]------------------------------------
#

/*-- Setting-Group 8 --*/
$setting_group[8]="Images Annotation settings";
$setting['annotation_use'] = "Use auto images annotation on image upload";
$setting['annotation_font'] = "Annotation font<br /><span class=\"smalltext\">Specify full path and font filename</span>";
$setting['annotation_font_size'] = "Annotation font size";
$setting['annotation_use_shadow'] = "Use letter shadows";
$setting['annotation_shadow_offset'] = "Shadow offset (same right and down)";
$setting['annotation_image_quality'] = "Resulting image quality (in per cent)";
$setting['annotation_text'] = "Annotation message";
$setting['annotation_fill_color'] = "Annotation text fill color<br /><span class=\"smalltext\">Define HEX value, for example #FFFFFF. Have a look at <a target=\"_blank\" href=\"color.html\">color samples</a></span>";
$setting['annotation_shadow_color'] = "Annotation text shadow color<br /><span class=\"smalltext\">Define HEX value, for example #000000. Have a look at <a target=\"_blank\" href=\"color.html\">color samples</a></span>";
$setting['annotation_fill_alpha'] = "Fill color alpha blending (transparency)<br /><span class=\"smalltext\">Alpha blending value must be between 0.0 and 1.0&&&&0.0 = no transparency</span>";
$setting['annotation_shadow_alpha'] = "Shadow color alpha blending (transparency)<br /><span class=\"smalltext\">Alpha blending value must be between 0.0 and 1.0&&&&0.0 = no transparency</span>";
$setting['annotation_v_alignment'] = "Vertical annotation message alignment";
$setting['annotation_h_alignment'] = "Horizontal annotation message alignment";
$annotation_v_positioning_optionlist = array(
  "top"  => "image top",
  "bottom" => "image bottom"
);
$annotation_h_positioning_optionlist = array(
  "left"  => "left image edge",
  "middle"  => "image middle",
  "right" => "right image edge"
);
$setting['annotation_top_offset'] = "Top annotation message offset";
$setting['annotation_bottom_offset'] = "Bottom annotation message offset";
$setting['annotation_left_offset'] = "Left annotation message offset";
$setting['annotation_right_offset'] = "Right annotation message offset";

#
#
#-----[ SAVE/UPLOAD ALL FILES ]-------------------------------------
#
# Go Admin Control Panel and check/modify annotations settings.
#
tradertt
New php-forum User
New php-forum User
 
Posts: 4
Joined: Thu Feb 27, 2003 10:56 am


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 9 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron