Jump to content

kirkh34

Members
  • Posts

    80
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.swellshirt.com

Profile Information

  • Gender
    Male
  • Location
    Indianapolis, In

kirkh34's Achievements

Member

Member (2/5)

0

Reputation

  1. hello all, i have a function to copy a png 24 while preserving transparency and recolor the image and save a new file. the color works but the image edges become fuzzy. i'm not entirely sure what is causing this. i'd like to have the same quality as the original image with clean edges. love to hear suggestions. thanks a lot <?php function color_png($src_string, $directory, $r, $g, $B){ $im = imagecreatefrompng($src_string); imageantialias($im, true); $width = imagesx($im); $height = imagesy($im); $imn = imagecreatetruecolor($width, $height); imagealphablending($imn,false); $col=imagecolorallocatealpha($imn,255,255,255,127); imagesavealpha($imn,true); imagefilledrectangle($imn,0,0,$width,$height,$col); imagealphablending($imn,true); imagecopy($imn, $im, 0, 0, 0, 0, $width, $height); imagefilter($imn, IMG_FILTER_NEGATE); imagefilter($imn, IMG_FILTER_COLORIZE, $r, $g, $B); imagepng($imn, $directory); imagedestroy($imn); } ?>
  2. I'm confused at what you mean? run one query at the start of what? I need the title_id in the array. I must use that loop?
  3. thank you for your replies. I understand that it is wrong to run queries in loops, but I am not sure how I would complete it otherwise? I have to run that foreach loop in order to get the title_id needed to run the query. Can you explain a different structure that would work for what I need?
  4. Hello. I have a table title_views with each row being a "view" with a user_id, title_id, prog_id, date, and id. I want to gather just the user_ids without it returning duplicate user_ids. Right now I'm receiving duplicate user_id. Any help is appreciated. Thank you. <?PHP include("db.php"); $qry= mysql_query("SELECT * FROM programs") or die (mysql_error()); while($row = mysql_fetch_array($qry)){ $prog_titles = $row['titles']; $prog_titles = explode(',' , $prog_titles); $prog_id = $row['prog_id']; array_shift($prog_titles); foreach($prog_titles as $prog_title){ $trimmed = trim($prog_title); $qry= mysql_query("SELECT DISTINCT user_id FROM title_views WHERE title_id = '$trimmed' and prog_id = '$prog_id' ") or die(mysql_error()); $row = mysql_fetch_array($qry); echo $row['user_id'] . "<br />"; } // end foreach } //end while ?>
  5. I'm trying to find a good function that allows me to resize an image and specify the paths, the dimensions, and the quality about the image. Does anyone have any suggestions? Thanks
  6. how dumb of me!! see what happens when you don't code for a few months... that's easy! thanks a lot i feel really dumb but i appreciate the quick response! i still don't understand why it hangs up...oh well the problem is fixed
  7. I've been getting this error: Fatal error: Maximum execution time of 30 seconds exceeded in... (gives file and line number) I've cut out most of the code in the for loop to narrow it down specifically to the $i variable messing it up somehow... The 2nd part of the if statement where I try to append the $i variable to the new $row_ variable is causing it to hang like this. I want to be able to make 5 new variables... $row_1...$row_2...etc... but for some reason when I try to append the $i to it, it hangs. and throws that error eventually. Does anyone know why it does this? Any help is appreciated. Thank you! for ($i=1;$i<6;$i++){ if ($row['bef_remarks' . $i] != "Description"){ $row_.$i = 1;
  8. i'm trying to figure out where in the graph you can change the photos in the top row of a user profile page...the ones you "hide" there is no documentation for this but there are apps that do so...any suggestions?
  9. yeah... and really I'd really like to keep everything with the ID as far as the database goes... for now I just have domain.com/title-goes-here-0983 <--id number... It's not a big deal i suppose... I mainly just wanted it like this for SEO...so I think I'm good to go... thanks a lot for your responses johnny! i appreciate it
  10. I was thinking of it backwards, as if you could do the rewrite and it change all your urls... i get it now... I will have to change all the urls myself... so...another question, is there anyway I can have the title as the url domain.com/photo-title-goes-here i added a get variable to the url for the title with the hyphens in between each word... can I somehow hide the ID variable and only show the name variable?
  11. so what I'm really trying to do is get it to show in the url... right now if you type in domain.com/photo/(id) it goes to the old url.. i want the opposite really... how can this be done?
  12. im not sure what to do. the module is enabled... shouldn't this change my url when i access the page? am i missing any steps?
  13. nope... still no go...just seems very strange... i've tried so many options and none of them work
  14. i have been on dozens of sites trying different code for a mod rewrite so I can have a friendlier url for seo... i have no idea why it's not working i am stumped.. i am using a rewrite to redirect to www and that works fine... help is appreciated Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^domain.com [nc] rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] RewriteRule http://www.domain.com/photo/(.*)/(.*)/$ /photo.php?$1=$2 i have also tried it with the carrot at the beginnign with no luck... and with the full url.. i have tried countless ways from googling and never does it work
  15. that's strange if you made a live payment and all you did was change the pricing... submit a ticket on x.com, one of their specialists will look at your situation and respond within 24 hours.. https://ppmts.custhelp.com/app/ask/session/L3RpbWUvMTI5MjY0NDMyOS9zaWQvRFdpWE1OaGs%3D
×
×
  • 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.