Jump to content

hadoob024

Members
  • Posts

    192
  • Joined

  • Last visited

Everything posted by hadoob024

  1. I'm trying to figure out the best way to split up a body of text (say maybe 400-500 characters long) into 130 character-sized chunks with no words being split. I figured how to do this for the first chunk, but am having problems figuring out how to keep repeating it. Been playing around with this for a while, and came up with the following, but can't seem to figure out why it's not working. Any thoughts? $inc = -1; $body_length = 0; $tmp_chunk = 1; $tmp_body = ''; $body = ''; $tmp_start = 1; $final_chunk = 0; $body = 'On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look.'; $body_length = length($body); do if (($tmp_start + 130) > $body_length) { $tmp_body = substr($body, $tmp_start, $body_length - $tmp_start); $final_chunk = 1;} else { $tmp_body = substr($body, $tmp_start, 130);} while (substr(tmp_body, inc, 1) != ' ') $inc = $inc - 1; endwhile; $tmp_body = substr($tmp_body, $tmp_start, 130 + $inc); $tmp_start = $tmp_start + 130 + $inc; echo $tmp_body; $tmp_chunk = $tmp_chunk + 1; $inc = -1; $tmp_body = NULL; while ($final_chunk = 0);
  2. Someone suggested this to me which works perfectly, so I'm posting his solution here for everyone: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>Untitled 1</title> </head> <style type="text/css"> #test iframe { width: 800px; height: 4000px; border: none; } #test { width: 820px; height: 500px; padding: 0; border: inset 1px gray; overflow: auto; } </style> <body> <div id="test"> <iframe src="http://blahblahblah.html" scrolling="no"> </iframe> </div> </body> </html>
  3. Hmmm, I wonder. Yeah, I put the style info directly in the IFRAME tag itself. Some people said to try putting the style info in the source of the iframe, but that's not a possibility. And if I put the style info in the BODY tag, then it removes the horizontal scrolling for the main window, and not the iframe part (which is what I wanted). I guess I'll just have to stick with hard coding in values for width/height.
  4. Hmmm... Then I guess I'm stuck for now then huh? I just tried it in Firefox 2.0.0.14, IE 7.0.6000.16643, Opera 9.25, and Safari 3.0.4, and it ONLY works properly in Firefox.
  5. I've looked all over the web for solutions to this problem, but none of them seem to work properly. Either all the suggestions I saw were from 2005 and before and aren't applicable now (or are broken now with the latest browser updates), or they require making changes to the iframe source code (which I don't have access to). So anyway, is there a way to disable only the horizontal scrollbar in an iframe if you can't modify the source code of the iframe itself? I went with the: <iframe style = "overflow-x:hidden;overflow-y:scroll;" src = "blahblah.html"> </iframe> This works perfectly in firefox, but doesn't in any other browser. Any suggestions?
  6. Yup. The page changes depending on the link prior to arriving at the page. Basically, we have a job listing site. Some job listings are in-house listings, in which case we just take them to our job listing page. However, other listings that come up are pulled from outside listing sites. When showing the listing, we show the listing stuff inside an iframe. However, when a person clicks on a link to actually apply for that job, the whole "target = _blank" opens up a new window for that link. What we want to be able to do is that when a person clicks on that link to apply for the job that the new window just replaces the contents of our iframe. Is that possible with what you suggested? I'm going to read over that link now.
  7. Here's a problem I'm having. I got my HTML page. In this page I have an iframe. The iframe is linked up to a page that I don't have control over, but what I want is that when someone clicks on a link in this iframe, that it replaces the what's in the iframe instead of opening a new window. Is this even possible considering that I don't have control over the code that's contained within the iframe? If I do a view source on the page, I can see that they're doing a "target = _blank" to have this link open in a new window. Is there anyway to prevent this from happening? Thanks.
  8. Hmmm... Makes sense. Do you charge more for changes or extras, or do you base it on the hourly rate you charge for project itself?
  9. Yeah, I guess I'm having a hard part determining. Don't know whether to quote a flat price for the project, or give them an hourly rate with an estimation of how long it will take. I'm leaning towards the hourly rate so that if they want new stuff or keep changing their minds regarding what they want, I'm still charging them. I dunno though.
  10. Well, I figure it'll take about a week to do (doing it on the side of my main day job). 3/4 of the pages are just static HTML, so those will be quick. Then there's like 3 PHP form pages (including 1 to handle payment processing). So yeah, I would guess about a week or so.
  11. I couldn't figure out which might be the appropriate forum for this topic, so I'm going to post it here. I've been asked to make a site similar to the following: http://www.shehnaibridalshow.com/ They asked me how much I want to make the site, and I couldn't figure it out, so I thought I would post it here. How much would you charge this person to make a similar site?
  12. I've been working on it all day, and here's where I am. I tried something similar to that, but here's the problem that I was having: Here's my second table (SER_ENITY_USER) now: ID INTERESTED_POSITIONS ------------------------------------------------------------------------ 141 SER_JOB_TYPE_PROMOTER:SER_JOB_TYPE_BOUNCER/SECURITY Now if I run my updated query: SELECT UNIQUE SER_CONTEST.ID FROM SER_CONTEST, SER_ENITY_USER WHERE DRAWING_POINT >= SYSDATE AND SER_ENITY_USER.ENITY_ID = '141' AND ('%' || SER_CONTEST.TYPE_OF_USER || '%' LIKE '%' || SER_ENITY_USER.INTERESTED_POSITIONS || '%' OR '%' || SER_ENITY_USER.INTERESTED_POSITIONS || '%' LIKE '%' || SER_CONTEST.TYPE_OF_USER || '%') With this query, it only pulls back the record with ID of 51, but it won't pull back the record with ID of 69. I also noticed that if I change my table (SER_CONTEST) to the following: ID TYPE_OF_USER ----------------------------------------------- 51 SER_JOB_TYPE_PROMOTER 69 SER_JOB_TYPE_KITCHEN_STAFF:SER_JOB_TYPE_PROMOTER:SER_JOB_TYPE_OTHER 46 - Then my query pulls back the proper 2 records (with ID's of 51 and 69). Did I mess up on my query, or is this a different issue that hasn't been taken into account? Basically I want to find if any of the items for the value of a field appears in any items of the items for the value of the other field. Like where if TYPE_OF_USER equals: SER_JOB_TYPE_PROMOTER:SER_JOB_TYPE_BARBACK/BUSSER/RUNNER And where if INTERESTED_POSITIONS equals: SER_JOB_TYPE_KITCHEN_STAFF:SER_JOB_TYPE_PROMOTER:SER_JOB_TYPE_OTHER This produces a match. Or like where if TYPE_OF_USER equals: SER_JOB_TYPE_BARBACK/BUSSER/RUNNER:SER_JOB_TYPE_PROMOTER:SER_JOB_TYPE_BARTENDER And where if INTERESTED_POSITIONS equals: SER_JOB_TYPE_KITCHEN_STAFF:SER_JOB_TYPE_BARTENDER:SER_JOB_TYPE_OTHER This should also produce a match. I tried using soundex(), but the whole "SER_JOB_TYPE_" part keeps producing a match. Is there anyway to disregard that part when doing soundex()?
  13. Sorry. I had a COMPLETE brain fart! Can you please move this topic to the Oracle forums as my question is related to the Oracle DBMS? Thanks!
  14. Here's my problem, but first, some relevant info. Here's my first table (SER_CONTEST): ID TYPE_OF_USER -------------------------------------------------------------------- 51 SER_JOB_TYPE_PROMOTER 69 SER_JOB_TYPE_KITCHEN_STAFF:SER_JOB_TYPE_PROMOTER 46 - Here's my second table (SER_ENITY_USER): ID INTERESTED_POSITIONS ------------------------------------------------------------------------ 141 SER_JOB_TYPE_BARBACK/BUSSER/RUNNER Here's my query: SELECT UNIQUE SER_CONTEST.ID FROM SER_CONTEST, SER_ENITY_USER WHERE DRAWING_POINT >= SYSDATE AND (SER_CONTEST.TYPE_OF_USER LIKE SER_ENITY_USER.INTERESTED_POSITIONS || '%' OR SER_ENITY_USER.INTERESTED_POSITIONS LIKE SER_CONTEST.TYPE_OF_USER || '%' ) This query is pulling back 2 records (contest ID's of 51 and 69) with the current data in the tables, even though it should pull back 0 records for this particular query. Only when I change my second table (SER_ENITY_USER) to this should it pull back 2 records: ID INTERESTED_POSITIONS ------------------------------------------------------------------------ 141 SER_JOB_TYPE_PROMOTER Is there a typo on my part? I'm not sure why it's not working. I tried various combinations of wildcards and even using the soundex() function, but none of them work (I'm guessing soundex() isn't working because each db entry starts with "SER_JOB_TYPE_". Any thoughts? Thanks in advance!!!
  15. Nice. OK. I'll make sure to use imagecopyresampled then because I'll probably do all the thumbnail transformations after verifying the uploads.
  16. Cool! Thanks! Yeah, that makes sense. I don't know why I had it in my head to create them just before displaying them. Duh! Oh well. That's how you learn. Also, I've seen several examples for creating thumbnails, and was just wondering if there's a "preferred" way of doing it? All the variations make use of the following functions: imageCreateFromJPEG, imageSX, imageSY, ImageCreateTrueColor, imageCopyResampled, imageJPEG, imagedestroy, etc. Any caveats in actually creating the thumbnails?
  17. I've seen a lot of posts regarding how to create thumbnails, but I haven't seen anything regarding WHEN to create the thumbnail (i.e., during the original image upload, before displaying the image, etc.), or if it's even worth it to use thumbnails. Our website is a listing service for real estate. Each listing can have up to 4 jpg/gif images up to 500k in size each. On a page, we can have up to either 10 or 25 listings. My first question is, when should I create these thumbnail images (i.e., during the original image upload, before displaying the image, etc.)? My second question is, is it even worth it to create thumbnails, or can I just display the original images and just resize them in the <IMG> tag? How server intensive is creating these images? Is it even worth it to create thumnails, or should I just continue with displaying the original image? Thanks!
  18. Cool. Thanks! Yeah, I just ran it too, but couldn't notice any discernable difference in time. Good enough for me! Thanks for the tip!
  19. Does your method look for exact matches though? I'm trying to dumb my stuff down for the average user so they don't have to learn how to spell correctly. In my testing, I'm finding that SOUNDS LIKE works great!
  20. Does anyone know how much overhead the SOUNDS LIKE function has? Instead of doing both searches (first exact then LIKE), I did the following: $where[] = "ofrelistings.city SOUNDS LIKE '".$city."'"; This seems to work like a charm. Just hope it's not straining the db.
  21. Cool! Thanks! I'll definitely try those out. Also, I'm trying to figure out how annoying this is going to be because I actually have 3 text fields that I need to do searches on simultaneously (i.e., city, county, zip code).
  22. Really? I had never heard of either or those functions. Do they come with the core PHP library, or do I need to have additional libraries installed?
  23. That is true. I think I might be able to incorporate both of them. First do a search on the exact term entered. If that doesn't pull any results, try again using the wildcarding that you suggested. That seems like it would be even better, right?
×
×
  • 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.