Jump to content

michaellunsford

Members
  • Posts

    1,023
  • Joined

  • Last visited

Everything posted by michaellunsford

  1. Rather than relative links, you should try to put absolute links in code to ensure all the files are found. This generally can be achieved by simply putting a slash before your directory structure. I would do this for both the html file calling the CSS and in the CSS file calling for images - like so: <head> <link rel="stylesheet" type="text/css" href="/styles/default.css" /> </head> //code that doesn't load the external style <table class="background1" width="1000px" height="420px" cellspacing="10" cellpadding="15"></table> .background1 {background-image:url(/images/meh.gif);} .background2 {background-image:url(/images/back.png);} img {border-style:none;} Also, why are you putting style information in your <table> tag instead of the stylesheet?
  2. Basically you just need a clear at the bottom of your form. The floats "float" and don't allow the parent div to detect how tall it's supposed to be. I don't know why this is the standard, but I know if you add <div style="clear:both;"> </div> as the last element inside the form tag. That should allow the parent div to expand to the proper size.
  3. In the CSS, I don't see any real positioning of the elements. I'd like to see how the HTML is laid out.
  4. Thanks for that tip - it was just what I needed to figure this out. I don't have access to the main joomla template to add the CSS to the head, so I was using javascript to load the stylesheet (I tried several methods, none seemed to work in IE). It appears that IE just didn't like loading stylesheets that far down on the page (either with javascript or a plain <link> load). Soooo, I inlined all the CSS and it's working fine now. I put a ticket in to the tech folks and asked them to add the stylesheet to the document header - but inline should work in the interim.
  5. Okay, I've been reading up on this and apparently IE7+ is supposed to support position:fixed if the page has a doctype - which mine does. I have it working in FF and every other browser I checked (except for guess who). the gist: an ad is fixed to the bottom-left corner of the screen. There is a secondary ad that also appears on first load - but I'm not too worried about it at this point. The main problem is the bottom corner ad is not snapping into place (in IE only) when it's inserted in by joomla. If I isolate it to it's own page, it works perfectly. Add it to the ad system and let Joomla deliver it and IE has it appear in the table where you'd expect a non-fixed image to appear. #sitesponsor { cursor:pointer; position:fixed; height:110px; width:120px; bottom:0px; left:0px; z-index: 5001; } > Isolated - Just the ad works fine. > on the Joomla site appears at the bottom of the page. Why? I've been hacking on this for days, and I'm absolutely stumped. I'm about ready to copy the whole stinking page to an HTML editor and check for all the opening and closing of elements - but that would be my last ditch effort. Especially considering it works fine in other browsers. Certainly I don't expect anyone here to pour over this and diagnose the specific problem. I'm wondering if anyone has run into anything like this and have an idea of what I might have missed?
  6. There were some configuration issues it mentioned - cache sizes and such - that were pretty easy to get fixed in the my.cnf. However, the following "general" list doesn't have any indication on how to accomplish. Reduce your overall MySQL memory footprint for system stability Enable the slow query log to troubleshoot bad queries Any idea how to accomplish the two above? One thing it also mentioned was the possibility that some database connections were being left open. So, I have started digging through the heaver traffic sites and making sure all connections close at the end of their usefulness. I've already found a few ajax pages that had left their connections open, so hopefully this will fix the immediate problem.
  7. I have a leased, non-managed, server. The company who owns the server tells me it's my responsibility to figure out what's getting my system load (sometimes in the 60's) that high. But, just as I get frustrated and ready to reboot the server, it just starts dropping again. Eventually (like 5 minutes) the 2-minute mark sometimes goes back down to 0.05 or lower. So, I try what I know to try. "top -c" has a bunch of stuff in it, but nothing is really high in either ram or cpu. When it cooks, it's always mysqld. Okay, so some website on the server is probably just getting blasted - but which one? And, which page is getting nailed so hard that it's throwing mysql into a tizzy? This information would be infinitely valuable in the creation of a plan to defeat the problem. Stumped on where to find this information?
  8. I don't know - this was pretty easy to read: Array ( [45] => 3 [47] => 1 [61] => 1 )
  9. Yeah, that's what I figured. I didn't array the options, but I went ahead and multidimensioned the array. They key is now just an incremental value. The values I'm storing are id, qty, and options. It's amazing that adding just one little integer value took the code from five lines to fifty-five lines. The complexity comes from the loop and if statements to determine if the product is already in the cart - as you mentioned.
  10. So, I'm working with a shopping cart that uses a simple array to track the contents: array key is the database key for the product, the value is just the quantity of that item that's in the cart. Prices, etc, are stored in the database and can be called for pretty easily. Here's the wrench. There are two items that have "options" - lets call it color. Of the thirty items available, two of them have an option to come in red, yellow, blue, black, or white. The rest don't have an option. So, would complicating this a bit with a multidimensional array make sense or is there a better way to do this? I thought of doing a separate array that tied the option to the product - but if they wanted to order two yellow AND one red one, I'd be stuck - right?
  11. Got it! I needed to use "live('click', function() {" instead of plain old "click()" $("#fooditem .formbuttons").live('click',function() { ...
  12. I'm use jquery's .load() in the menu to dynamically replace some content without having to completely reload the page. When I do this, the content loads just fine. I can click as many different menu items as I'd like and the content gets replaced just fine. The problem is when I try to click an element that jquery is supposed to do something with, it acts as if jquery doesn't know it's there, and it falls-back to the html. // a click on a menu item dynamically loads the right-side content. $("#left_menu a").click(function () { var jumpval = this.href; var bodyFilter=/[^a-zA-Z]/; $('#right_content').load(jumpval+' #right_content'); newbody=jumpval.substring(31,jumpval.length-5); newbody=newbody.replace(bodyFilter,''); newbody=newbody.replace(bodyFilter,''); $('body').attr('id','body'+newbody); return(false); }); // clicking the "add to cart" button hits a php file that adds the item to the session. // It returns the number of items in the cart, and a small red dot gets the number. // Works when page is loaded by browser - but not when replaced with jquery. $("#fooditem .formbuttons").click(function() { $('#items-in-cart').load('elements/add-item.php?id='+$("#foodid").val()); return(false); });
  13. Thanks, I'll check it out. Marking as solved since this should do the trick (just take a little time to figure out).
  14. So, I have a list coming from an ajax http call. I want to add a filter option, where you start typing and it automatically removes non-matching items. Imagine the friend chat feature on facebook where you start typing in a friends name to narrow the list - same theory. I'm thinking doing an ajax call with the criteria at every keystroke is going to be awfully slow and intense. Am I just being silly or is there a better way to do it than sending a new http request with every keystroke?
  15. yeah, that's what it looks like. The only places I've been able to find that are doing it (and not terribly secretive about it) are using search options to increase results to 100 per page (yahoo and google) and then scraping the page looking for the data. I suppose this is not a terrible option - it sure beats scraping 10 pages. Bing has no such option that I can find. They're supposed to have a cookie driven preference that lets you get 50 results per page, but so far I can't even get it to work in my browser (surprise).
  16. Okay, I can appreciate that if I create an account in google analytics, yahoo's version of the same, bing's version of the same, hotbot's version of the same, ask's version of the same, et cetera into perpetuity, I can track all these separate search engines separately using their own proprietary UI. Great news, but this is not the question. The question is how how can one capture this data for recording using his own methods and do what he pleases with it? There are innumerable SEO companies out there doing exactly this. They don't require their clients to have separate logins for the three, four, or even twelve search engines, it's all kept in one place. How are they doing it?
  17. Right, so how do I automate the capture of this data to be tracked over time?
  18. I've seen a few paid tools that can track where a website ranks in google/yahoo/bing for a certain keyword phrase. It's a great tool, but I want to build my own for my own clients. Maybe my google skills aren't what they used to be because doing searches for this give me all the usual spam SEO junk. So, the gist of the question, is there a google / yahoo / bing API or something I can feed a website URL and a keyword phrase and get it to tell me what number that site is in the search results? Or, am I limited to curling google, scraping the page and then curling the next page until I find it?
  19. Okay, I moved everything into a different directory off of one of the domains and am now doing symbolic links to it from the others. Not sure what the deal on that first directory was - but since it was the problem, I have removed it from the equation. Thanks to everyone for reading and trying. If you do think of something else, I would still be curious to know about it as this topic isn't officially "solved" but rather "no longer an issue" Thanks!
  20. tried the Options +FollowSymLinks, no dice. So, I eliminated the sym link from the equation. In the directory I copied the scripts into that was working just fine, I went ahead an put the full file path to the place I want the files saved to ("/usr/local/images/"). Surprise, same permissions error. If I tell it to go to "/tmp/" it works fine. So, I thought to make permissions just like the /tmp/ folder and it'll work. The only difference is the sticky bit, so I added it still get those pesky permissions errors. For fun, I added a function that tells me the permissions of whatever file I'm trying to access (I used the variable for the directory path) and it returns 1777, or 0777 before I added the sticky bit.
  21. I'm afraid it wont' be much help: <?php $image=file_get_contents($myfile)); $file=fopen($mydir.$myfile,"w"); fwrite($file,$image); fclose($file); header("Content-Type: image/jpeg"); echo $image; ?> If I remove the fopen stuff, the image dumps just fine, so I know it's in there. The directory has 777 permissions. One thing I should probably mention is this is not in the regular domain directory. It's linked to by symbolic link, but the $mydir variable includes the full path. There are no basedir restrictions in effect (this directory is included in the httpd.conf file), plus, if there were, we should be seeing basedir restriction errors. I can make those errors come up if I remove the directory from the httpd.conf file, though. Since posting this, I have recreated this directory inside the domain's directory. There, the scripts run just fine. Same exact permissions, same exact owner and group assigned to all directories and symbolic links. Why do it this way? This is a shared image resource directory between multiple domains. The directory currently contains 839 megs of images. So, making copies in each domain's folder would take up an insane amount of hard drive space. PS> This configuration worked fine on another server, this problem showed post migration.
  22. fopen and imagejpeg are giving me trouble when run through apache. Run them on the command line and they work fine. Errors are permissions errors like "failed to open stream: Permission denied in" I've been working on this for about a month and have a post in the main php forum with no response. Since the php code is working fine from the command line, I'm thinking this is an apache problem. Ideas? edit: folder permissions are 777, ownership doesn't seem to matter. By default it is root:root, but I've also tried apache:apache without result.
  23. you'd have to back into the number from the date. Try using strtotime() to convert your database field into the PHP timestamp and compare it to time()
  24. strpos won't work if the space is at the front. It also won't identify a tab, newline, or return - aka: the other whitespace ;-)
  25. <?php if(preg_match('/\s/',$row['title'])) { $space = ' '; } else { $space = ''; } ?>
×
×
  • 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.