Jump to content

fullyloaded

Members
  • Posts

    133
  • Joined

  • Last visited

    Never

Everything posted by fullyloaded

  1. drifter thank you very much for your help it worked great!!!!!thanks alot!!
  2. hi i have this watermarking code that will watermark all of the .jpg's in a folder even the thumbnails is there anyway i can add coding to this script i have to only watermark images that are bigger than the normal thumbnail size?if so can anyone help me with it?im not all that good at php yet thanks... [b]htaccess:[/b] [code]addhandler wtmrk jpg action wtmrk /upload/modify.php  [/code] [b]PHP Code:[/b] [code]<? // IMAGE WATERMARK (comment line below if you do not want to use image watermark) Define('WATERMARK_IMAGE', './wt.png'); // path to watermark image Define('WATERMARK_PERCENT', '60'); // Intensity of the transition (in percent) // TEXT WATERMARK (comment line below if you do not want to use text) //Define('WATERMARK_TEXT', 'SinglesPleasures.com'); // text to place (image will not be used) Define('WATERMARK_TEXT_FONT', '4'); // font 1 / 2 / 3 / 4 / 5 Define('TEXT_SHADOW', '0'); // 1 - yes / 0 - no Define('TEXT_COLOR', '#FFFFFF'); // text color  // GENERAL SETTINGS Define('WATERMARK_ALIGN_H', 'right'); // left / right / center Define('WATERMARK_ALIGN_V', 'bottom'); // top / bottom / center Define('WATERMARK_MARGIN', '10'); // margin // ---------------------------------------------------------------------------------------- $dr=preg_replace('/modify\.php.+/', '', $_SERVER['PHP_SELF']); $filename=str_replace($dr, './', $_SERVER['PATH_INFO']); $lst=GetImageSize($filename); $image_width=$lst[0]; $image_height=$lst[1]; $image_format=$lst[2]; if ($image_format==1) {   Header("Content-Type:image/gif");   readfile($filename);   exit; } elseif ($image_format==2) {   $old_image=imagecreatefromjpeg($filename); } elseif ($image_format==3) {   $old_image=imagecreatefrompng($filename); } else {   readfile($filename);   exit; } if (Defined('WATERMARK_TEXT') && WATERMARK_TEXT!='') { // text   $color = eregi_replace("#","", TEXT_COLOR);   $red = hexdec(substr($color,0,2));   $green = hexdec(substr($color,2,2));   $blue = hexdec(substr($color,4,2));   $text_color = imagecolorallocate ($old_image, $red, $green, $blue);    $text_height=imagefontheight(WATERMARK_TEXT_FONT);   $text_width=strlen(WATERMARK_TEXT)*imagefontwidth(WATERMARK_TEXT_FONT);   $wt_y=WATERMARK_MARGIN;   if (WATERMARK_ALIGN_V=='top') {   $wt_y=WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_V=='bottom') {   $wt_y=$image_height-$text_height-WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_V=='center') {   $wt_y=(int)($image_height/2-$text_height/2);   }   $wt_x=WATERMARK_MARGIN;   if (WATERMARK_ALIGN_H=='left') {   $wt_x=WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_H=='right') {   $wt_x=$image_width-$text_width-WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_H=='center') {   $wt_x=(int)($image_width/2-$text_width/2);   }   if (TEXT_SHADOW=='1') {   imagestring($old_image, WATERMARK_TEXT_FONT, $wt_x+1, $wt_y+1, WATERMARK_TEXT, 0);   }   imagestring($old_image, WATERMARK_TEXT_FONT, $wt_x, $wt_y, WATERMARK_TEXT, $text_color); }    if (Defined('WATERMARK_IMAGE') && WATERMARK_IMAGE!='' && file_exists(WATERMARK_IMAGE)) { // image $lst2=GetImageSize(WATERMARK_IMAGE); $image2_width=$lst2[0]; $image2_height=$lst2[1]; $image2_format=$lst2[2]; if ($image2_format==2) {   $wt_image=imagecreatefromjpeg(WATERMARK_IMAGE); } elseif ($image2_format==3) {   $wt_image=imagecreatefrompng(WATERMARK_IMAGE); }   if ($wt_image) {   $wt_y=WATERMARK_MARGIN;   if (WATERMARK_ALIGN_V=='top') {     $wt_y=WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_V=='bottom') {     $wt_y=$image_height-$image2_height-WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_V=='center') {     $wt_y=(int)($image_height/2-$image2_height/2);   }   $wt_x=WATERMARK_MARGIN;   if (WATERMARK_ALIGN_H=='left') {     $wt_x=WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_H=='right') {     $wt_x=$image_width-$image2_width-WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_H=='center') {     $wt_x=(int)($image_width/2-$image2_width/2);   }   imagecopymerge($old_image, $wt_image, $wt_x, $wt_y, 0, 0, $image2_width, $image2_height, WATERMARK_PERCENT);   } } if ($image_format==2) {   imageJpeg($old_image); } if ($image_format==3) {   imagePng($old_image); } ?> [/code]
  3. hi i was wondering if there is anyway to change all THUMBNAILs in a folder from .jpg to gif thanks...
  4. hi i have a great script for watermarking images in a folder but the thing is its doing the thumbnail as well because there jpg like the images is there away to have it do just the images and not the thumbnails without changing the thumbnails from jpg to what ever else?what im saying is i only what the images to be watermarked and not the thumbnails here is the code it also is using .htaccess file and in that file is this [code]addhandler wtmrk jpg action wtmrk /upload/modify.php[/code] [code]<? // IMAGE WATERMARK (comment line below if you do not want to use image watermark) Define('WATERMARK_IMAGE', './wt.png'); // path to watermark image Define('WATERMARK_PERCENT', '60'); // Intensity of the transition (in percent) // TEXT WATERMARK (comment line below if you do not want to use text) //Define('WATERMARK_TEXT', 'SinglesPleasures.com'); // text to place (image will not be used) Define('WATERMARK_TEXT_FONT', '4'); // font 1 / 2 / 3 / 4 / 5 Define('TEXT_SHADOW', '0'); // 1 - yes / 0 - no Define('TEXT_COLOR', '#FFFFFF'); // text color // GENERAL SETTINGS Define('WATERMARK_ALIGN_H', 'right'); // left / right / center Define('WATERMARK_ALIGN_V', 'bottom'); // top / bottom / center Define('WATERMARK_MARGIN', '10'); // margin // ---------------------------------------------------------------------------------------- $dr=preg_replace('/modify\.php.+/', '', $_SERVER['PHP_SELF']); $filename=str_replace($dr, './', $_SERVER['PATH_INFO']); $lst=GetImageSize($filename); $image_width=$lst[0]; $image_height=$lst[1]; $image_format=$lst[2]; if ($image_format==1) {   Header("Content-Type:image/gif");   readfile($filename);   exit; } elseif ($image_format==2) {   $old_image=imagecreatefromjpeg($filename); } elseif ($image_format==3) {   $old_image=imagecreatefrompng($filename); } else {   readfile($filename);   exit; } if (Defined('WATERMARK_TEXT') && WATERMARK_TEXT!='') { // text   $color = eregi_replace("#","", TEXT_COLOR);   $red = hexdec(substr($color,0,2));   $green = hexdec(substr($color,2,2));   $blue = hexdec(substr($color,4,2));   $text_color = imagecolorallocate ($old_image, $red, $green, $blue);   $text_height=imagefontheight(WATERMARK_TEXT_FONT);   $text_width=strlen(WATERMARK_TEXT)*imagefontwidth(WATERMARK_TEXT_FONT);   $wt_y=WATERMARK_MARGIN;   if (WATERMARK_ALIGN_V=='top') {   $wt_y=WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_V=='bottom') {   $wt_y=$image_height-$text_height-WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_V=='center') {   $wt_y=(int)($image_height/2-$text_height/2);   }   $wt_x=WATERMARK_MARGIN;   if (WATERMARK_ALIGN_H=='left') {   $wt_x=WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_H=='right') {   $wt_x=$image_width-$text_width-WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_H=='center') {   $wt_x=(int)($image_width/2-$text_width/2);   }   if (TEXT_SHADOW=='1') {   imagestring($old_image, WATERMARK_TEXT_FONT, $wt_x+1, $wt_y+1, WATERMARK_TEXT, 0);   }   imagestring($old_image, WATERMARK_TEXT_FONT, $wt_x, $wt_y, WATERMARK_TEXT, $text_color); } if (Defined('WATERMARK_IMAGE') && WATERMARK_IMAGE!='' && file_exists(WATERMARK_IMAGE)) { // image $lst2=GetImageSize(WATERMARK_IMAGE); $image2_width=$lst2[0]; $image2_height=$lst2[1]; $image2_format=$lst2[2]; if ($image2_format==2) {   $wt_image=imagecreatefromjpeg(WATERMARK_IMAGE); } elseif ($image2_format==3) {   $wt_image=imagecreatefrompng(WATERMARK_IMAGE); }   if ($wt_image) {   $wt_y=WATERMARK_MARGIN;   if (WATERMARK_ALIGN_V=='top') {     $wt_y=WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_V=='bottom') {     $wt_y=$image_height-$image2_height-WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_V=='center') {     $wt_y=(int)($image_height/2-$image2_height/2);   }   $wt_x=WATERMARK_MARGIN;   if (WATERMARK_ALIGN_H=='left') {     $wt_x=WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_H=='right') {     $wt_x=$image_width-$image2_width-WATERMARK_MARGIN;   } elseif (WATERMARK_ALIGN_H=='center') {     $wt_x=(int)($image_width/2-$image2_width/2);   }   imagecopymerge($old_image, $wt_image, $wt_x, $wt_y, 0, 0, $image2_width, $image2_height, WATERMARK_PERCENT);   } } if ($image_format==2) {   imageJpeg($old_image); } if ($image_format==3) {   imagePng($old_image); } ?>[/code]
  5. hi hitman6003 thanks for the reply the code you have up is not working for me i might be doing somthing wrong any ideas? again thanks
  6. hi i have this watermark code that works great but it will only do one image i was wondering if there is away to change this coding to do all the images in a folder here is the code thanks... [code]<? include  ("watermark.php"); $iw = new imageWaterMarker(); $iw->image_location = 'test.jpg'; $iw->image_type = 'jpeg'; $iw->size = 1;  //This could be any value from 1 to 5 $iw->copyright_text = '(C) 2004 : here'; $iw->markImage(); ?>[/code] [code]<? class imageWaterMarker { var $image_location; var $copyright_text; var $image_type; var $size =1; function markImage() { $img = GetImageSize($this->image_location); $width = $img[0]; $height = $img[1]; switch ($this->image_type) { case 'jpg': case 'jpeg': //Here is JPG Loader $im2 = imagecreatefromjpeg($this->image_location); //End JPG loader //Now JPG Text Color Change Tricks $im = imagecreate($width,$height); imagecopy($im,$im2,0,0,0,0,$width,$height); //End Trick break; case 'png': $im = imagecreatefrompng($this->image_location); break; } $black = imagecolorallocate($im,0,32,234); //$black = imagecolorallocate($im,12,132,34); imagestring($im,$this->size,0,$height-30,$this->copyright_text,$black); header ("Content: image/png"); imagepng($im); } } ?>[/code]
  7. hi i have this site im trying to install but keep getting this error i tryed and did everything it asked me too but still nothing i even added the database info still nothing here is the error and the line on code im getting it on thanks... [code]Fatal error: Undefined class name 'sconfig' in /home/singlesm/public_html/utube/include/config.php on line 39[/code] [code]$DBTYPE = 'mysql'; $DBHOST = SConfig::get("Database", "host"); $DBUSER = SConfig::get("Database", "user_name"); $DBPASSWORD = SConfig::get("Database", "password"); $DBNAME = SConfig::get("Database", "db_name");[/code]
  8. hi im looking for away to count how many times a program was downloaded from my site any idea how thanks
  9. hi thanks alot i will take a look at it  :D
  10. hi i was wondering if anyone can tell me the easiest way to add my websites name to a members image when they upload there image to my dating website thanks...
  11. hi thanks alot!! that one works  ;D
  12. hi had no luck when i put the code in it removes the name and noting shows up  :'(
  13. hi dymon thanks can you tell me where to put this code? $username = substr($username, 1, 15); here is the code for the main page of my site the usernames would be this in the code "NM_NAME"    =>        $dbu->f('username'),[code]<?php $dbu=new mysql_db; $ft=new ft(ADMIN_PATH.MODULE."templates/"); $ft->define(array('main' => "home.html")); $ft->define_dynamic('member_row','main'); //*************Quick Search Form*********************** if($_SESSION['photo']) { $checked='checked'; } if($_SESSION['st_online']) { $checked2='checked'; } $ft->assign(array(                   "COUNTRY"        =>        build_country_list($_SESSION['country']),                   "S_G"            =>        build_gender_list($_SESSION['s_g']),                   "SSY" =>   build_numbers_list(LOWEST_AGE, HIGHEST_AGE,$_SESSION['ssy']),                   "ESY"  =>   build_numbers_list(LOWEST_AGE, HIGHEST_AGE,$_SESSION['esy']),                   "CHECKED"  =>   $checked,                   "CHECKED2"  =>   $checked2,                 ) ); $dbu->query('SELECT COUNT(*) AS rowcount FROM member');     $dbu->move_next();     $ft->assign('MEMBER', $dbu->f('rowcount'));     $ft->assign("V_NO", $i);     $time_stamp = mktime ( date("H"), date("i")-ONLINE_TIMEOUT, date("s"), date("m"), date("d"), date("Y") );     $dbu->query("SELECT COUNT(*) AS maxrows FROM member WHERE action >= '".$time_stamp."'"); $dbu->move_next(); $ft->assign("ONLINE_NO", $dbu->f('maxrows') ); //****************Fast Facts*************************** $dbu->query("select count(member_id) as num_rec from member where active1='1' AND active2='1' AND visible='2'"); $dbu->move_next(); $total_profiles=$dbu->f('num_rec'); $dbu->query("select count(member_id) as num_rec from member where gender = 'Man' AND active1='1' AND active2='1' AND visible='2'"); $dbu->move_next(); $man_profiles=$dbu->f('num_rec'); $dbu->query("select count(member_id) as num_rec from member where gender = 'Woman' AND active1='1' AND active2='1' AND visible='2'"); $dbu->move_next(); $woman_profiles=$dbu->f('num_rec'); $ft->assign(array(                   "TOTAL_PROFILES"    =>        $total_profiles,                   "MEN_PROFILES"    =>        number_format((( $man_profiles * 100 ) / $total_profiles )),                   "WOMEN_PROFILES"    =>        number_format((( $woman_profiles * 100 ) / $total_profiles )),                 )           ); //*********get most viewed man***************** $dbu->query("select username, member_id, birthdate, picture, thumb, country from member where gender = 'Man' order by viewed DESC limit 0,2"); $dbu->move_next(); list($b_year,$b_month,$b_day )=split("-",$dbu->f('birthdate')); $ft->assign(array(                   "MP_MAN_NAME"    =>        $dbu->f('username'),                   "MP_MAN_LOCATION"    =>        $dbu->f('country'),                   "MP_MAN_AGE"    =>        get_age($b_month,$b_day,$b_year),                   "MP_MAN_VIEW"    =>        'member/index.php?pag=member_profile&member_id='.$dbu->f('member_id'),                 )           ); if($dbu->f('thumb')) { $ft->assign('MP_MAN_IMAGE', $script_path.UPLOAD_PATH.$dbu->f('thumb')); } else { $ft->assign('MP_MAN_IMAGE', $script_path.'img/na_small.gif'); } //*********get most viewed woman***************** $dbu->query("select username, member_id, birthdate, picture, thumb, country from member where gender = 'Woman' order by viewed DESC limit 0,2"); $dbu->move_next(); list($b_year,$b_month,$b_day )=split("-",$dbu->f('birthdate')); $ft->assign(array(                   "MP_WOMAN_NAME"    =>        $dbu->f('username'),                   "MP_WOMAN_LOCATION"    =>        $dbu->f('country'),                   "MP_WOMAN_AGE"    =>        get_age($b_month,$b_day,$b_year),                   "MP_WOMAN_VIEW"    =>        'member/index.php?pag=member_profile&member_id='.$dbu->f('member_id'),                 )           ); if($dbu->f('thumb')) { $ft->assign('MP_WOMAN_IMAGE', $script_path.UPLOAD_PATH.$dbu->f('thumb')); } else { $ft->assign('MP_WOMAN_IMAGE', $script_path.'img/na_small.gif'); } //*******get newest members********************************* $dbu->query("SELECT member_id, username, birthdate, picture, thumb, gender FROM member WHERE active1='1' AND active2='1' AND visible='2' ORDER BY member_id DESC LIMIT 3"); while($dbu->move_next()) { list($b_year,$b_month,$b_day )=split("-",$dbu->f('birthdate')); $ft->assign(array(                   "NM_NAME"    =>        $dbu->f('username'),                   "NM_GENDER"    =>        $dbu->f('gender'),                   "NM_AGE"    =>        get_age($b_month,$b_day,$b_year),                   "NM_VIEW"    =>        'member/index.php?pag=member_profile&member_id='.$dbu->f('member_id'),                 )           ); if($dbu->f('thumb')) { $ft->assign('NM_IMAGE', $script_path.UPLOAD_PATH.$dbu->f('thumb')); } else { $ft->assign('NM_IMAGE', $script_path.'img/na_small.gif'); }           $ft->parse('member_ROW_OUT','.member_row');        } $ft->assign('MESSAGE',$glob['error']); $ft->parse('CONTENT','main'); //$ft->fastprint('CONTENT'); return $ft->fetch('CONTENT'); ?>[/code]
  14. hi i have a small problem on my sites home page i have a dating website with 3 newest members on the front page my problem is when the 3 newest members usernames are to long it will split my image apart is there anyway you can fix this so if there username is long it will only show part of there username and not split the image on the site? here is the site you can see the problem there on the main page [url=http://www.singlespleasures.com]http://www.singlespleasures.com[/url] thanks...
  15. hi is there anyway to have a mass email sender on my website?so i can email all my members in my database?i found a simple one but it send the first time but after that nothing thanks...
  16. hi i was wondering if anyone can help me with this code i have here in this string of code to get it to work you need the image i want to replace the image with text can anyone help?[sub]$forumimg="<td width=66><a target=_blank href=".$site_url."forum/index.php?act=login&action=login&user=".$fuser."&pass=".$fpass."><img src=../images/btn_forum.gif width=66 height=21 border=0></a></td>"; [/sub]
  17. hi i was wondering if there are any forums or message boards that can intergrate with any website?
  18. cool thanks man
  19. hi i was wonderinf if anyone can tell me how to watermark all the images in a folder in php?so if someone uploads a image to that folder it will put a watermark on it thanks...
  20. hi i was wonderinf if anyone knew where i can get a simple emailing list program that will hookup to my websites database i have a dating website and dont have this on there need it to send emails to my members thanks...
  21. hi Gregg would you do this for not for free please let me know thanks...
  22. hi its a flash comm video email that use flash media server and also needs php to send the email what my problem is my hosting wont let the php part send the emails to a email address it keeps coming back to my websites email as failed what i want to know is is there anyway to by pass this so i can have the video email on my site and have the php send mail part do what it should do and send emails hope this helps thanks for the reply!!
  23. hi i have video email but have one problem my hosting wont let the emails send but the video message will get save to my flash media server is there anyway i can set this up so i can have the video email on my site and get it to send the email?if anyone can tell me how i will give a copy of the video email i have thanks...
  24. hi its a dating website and its for the members profile so they can upload there image but the new image wont show until you refresh the page if you dont refresh the page the old image will show until you do i hope thats what your asking im new to this thanks..
  25. hi thanks but can this code[code]<meta content="30; url=http://mhtit.hypermart.net/js/refresh.html" http-equiv=refresh>[/code] be put into this code?[code] <input name="Submit" type="submit" class=BlackSlim11 id="Submit" value="Save">[/code] so the refresh will be in the button and not auto refresh? thanks...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.