Search results

  1. J

    PHP Prevention of Direct linking code

    It looks like you're probably looking for sessions. http://www.php.net/manual/en/book.session.php
  2. J

    Funky problem with mod_rewriting, might be easy?

    I think you don't add the first slash. RewriteRule ^admin/.* - [PT]
  3. J

    Dear Google: This page is going away.

    Doing it through .htaccess and mod_rewrite would be the best way. Make sure you make it a 301 redirect. That lets spiders know that the page has been moved permanently and they should update their indexes. Here is what Google has to say about it...
  4. J

    Can this be done with PHP

    I think you can track things like this with Google Analytics (Event Tracking). I know that's not PHP, but Event Tracking seems purpose built for this kind of stuff. http://code.google.com/apis/youtube/js_api_reference.html#Events...
  5. J

    Help with form submission (involves javascript)

    Ah, I get it.... You can call the functions and pass in the values in the input fields.... You can run the functions by doing things like... isEmailValid(document.registrationForm.emailField.value); ... inside your isFormValid function.
  6. J

    Help with form submission (involves javascript)

    I always thought if the onSubmit event returned false, the form wouldn't submit. Maybe try stopping event propagation? In Mootools, I would do... $('registrationForm').addEvent('submit', function(e) { if(e) { e = new Event(e); e.stop(); } // stuff to do });
  7. J

    Play music sitewide, WordPress

    You can put the music on a different frame, or load all your content through ajax (ie, no page reloads), or you can use flash... (I don't think the OP mentioned autoplaying...)
  8. J

    Joomla vs Drupal - which one CMS to develop own modules

    Yii was created by the creator of Prado, but they're independent projects. I haven't used Prado, so I can't say for sure, but I've read that Yii takes a lot of the good stuff from Prado. I don't have experience with Django or Dot Net, or any other PHP framework for that matter... I did a...
  9. J

    FS: Borderlands (Steam)

    Yeap! Sorry!
  10. J

    FS: Borderlands (Steam)

    I have 2 copies of Borderlands on Steam to sell after a few guys backed out on the 4-pack... I'll also throw in a copy of HL2 for the first person to buy :) Selling for $25, paypal (Sorry, I don't have Ebay or Heatware accounts) (All gone!)
  11. J

    Joomla vs Drupal - which one CMS to develop own modules

    Joomla's extension system is pretty much like being inside an MVC framework, so if you and your developers are already familiar with that, then it's easy to pick up. But if you're not going to use the features of Drupal or Joomla much, you should maybe take a look at some of the many frameworks...
  12. J

    php include paths

    One way is to enclose it in a class and use getter methods to make them read only. class Config { private $user = 'user'; private $password = 'password'; public function __get($var) { if(property_exists($this, $var)) { return $this->$var; } else { throw...
  13. J

    php include paths

    Just a warning: global variables are bad! To answer your question: Variables have local scope inside a function. You have to add a global keyword so inside each function that uses a global variable: function aFunction() { global $v; echo $v; } You can try including files like...
  14. J

    Easiest methods of URL cloaking/Masking/Hiding/whatever-the-new-term-for-it-is!

    You could use frames (one hidden, one with the actual page)... although, I don't think many people would like that sort of behavior.
  15. J

    Need Jquery/Javascript help

    You could try... #slideshow { /* add... */ background:#ff9; z-index:10; } ... #slideshow IMG.active { z-index:11; /* change */ } Your dimensions are different (slideshow is 350px tall, but the images inside are 500x400...)
  16. J

    Need Jquery/Javascript help

    Since the slideshow uses opacity, you can set the background of the container white or another 'highlight'-like color (jQuery uses #ff9), and as it fades in, it will look like it's highlighting. You'd have to change the z-indexes of the images so that it's behind the background, though.
  17. J

    Sending php variable to external javascript file

    You could make a Javascript PHP file that sends a header with text/javascript, and call it with a get request with the variable.... So like... script.js.php: <?php header('Content-type: text/javascript'); ?> function something(phpvar) { ... } something('<?= $_GET['phpvar'] ?>'); And...
  18. J

    Free Flash or JS based image rotator?

    I'm not exactly quite sure what you're trying to do, but might want to read this to get started: http://snook.ca/archives/html_and_css/css-text-rotation
  19. J

    Should be simple for you HTML guru's. <font> formatting won't work!

    I would discourage the use of inline styles. They're just as messy (maybe more) than font tags. To the OP: A lot of rendering problems can happen because of malformed HTML or CSS. So validate! http://validator.w3.org/
  20. J

    CMS and/or Joomla! question

    You can take a look at the stuff here: http://docs.joomla.org/Administrators Unless you're looking to write extensions, I don't think you'd need to get a book. Just open up the backend and play with it. At least that's how I learned.
  21. J

    Should be simple for you HTML guru's. <font> formatting won't work!

    You don't close the first TD tag, which might make IE not render the first TD properly. (the > of the first line you posted) Just as an example, instead of the <font> tags, you could replace them with: td { color:#ffffff; font-family:Verdana, sans-serif; font-size:small; } You can later...
  22. J

    Joomla?

    When you check out Drupal, look at CCK and Views. Those 2 modules alone make Drupal incredibly customizable. I've found that Drupal has a higher learning curve than Joomla, but both can do whatever you want them to do as long as you don't mind getting your hands in a bit of code.
  23. J

    Thoughts on Ubuntu Netbook Remix 9.10

    Hmm, works for me. Try: sudo aptitude update sudo aptitude install ubuntu-restricted-extras If that doesn't work, then you can do it through the package manager: System > Synaptic Package Manager Search 'restricted' and it should come up.
  24. J

    How do i search for files?

    The text editor I use sometimes has a Find in Files option. It's called TextPad and it's free (full-featured trial with some nag).
  25. J

    Thoughts on Ubuntu Netbook Remix 9.10

    @tricky Try... In terminal: sudo aptitude install ubuntu-restricted-extras That will install flash, along with a bunch of codecs for audio/video, and some fonts (Arial is one of them...).
  26. J

    [Java]Removing duplicates in a series of Pythagorean triples...

    I'll try to give a correct hint >.> a^2 + b^2 = c^2 If a and b were switched, c is still the same. c is bigger than the bigger value of a or b. Look at the starting values of your for-loops. They don't have to start at 1. Math.pow() returns a double. Instead of using that, you can...
  27. J

    PHP Question

    In this line: if($query = @mysql_query($query)) { //... } $query (the second one) should be $sql (your SQL statement). You should validate your inputs also. A zip code is a 5 digit number (and an optional hyphen + 4 digits, I think). So, in case people try to do something dirty with...
  28. J

    PHP Question

    In your query, you have to specify which tables the fields are from... So, $sql = 'SELECT Company.CompanyName, Company.Phone, Company.Email, Company.Website, Specials.SpecialName, Price FROM Specials, Company WHERE Company.CompanyID = Specials.CompanyID AND ZipCode=$_POST[ZipCode]' ; Maybe to...
  29. J

    Testing your website on multiple versions of IE?

    Sitepoint had an article about Windows 7 and browser testing. I haven't tried it yet, but it seems cool... http://www.sitepoint.com/blogs/2009/09/29/windows-7-browser-testing/
  30. J

    Logic error?

    <-- rusty at C but I'll try... Try this: double a = 0.03 - 3*0.1; printf("%f", a); The output should be something like 0.0000... Now try: if(a > 0) { printf("a > 0"); } else { printf("a <= 0"); } You'll see that this outputs "a > 0". But what gives? a was 0.0000...
  31. J

    x7 Chat overloading my server....

    I've been using Total Choice Hosting for a few years. The plan I use is $4/mo... And I've never had issues with them. http://www.totalchoicehosting.com/web-hosting-plans.html
  32. J

    errors in validation....

    You need a closing <p> tag to end the paragraph "Web Page Authoring involves...". Also, I think the align attribute and font tags are deprecated.
  33. J

    Anybody great with regular expressions? (simple question)

    You could try... /^\/ts\/([^\/]+)\/([^\/]+)(\/(.+)?)?/
  34. J

    Java Script Programming

    I learned a lot about how JavaScript works from Douglas Crockford: http://video.yahoo.com/search/?p=douglas+crockford&t=video He has a book called, "JavaScript: The Good Parts" The book covers what he goes over in the lecture series that comes up in the yahoo video search. But it was handy...
  35. J

    Best IDE for php?

    Netbeans with PHP and jVi for vim commands (if you're into vim)
  36. J

    Javascript pause

    You can use setTimeout and clearTimeout too. For example... var timeoutId = 0; function nextImage() { // blah blah timeoutId = setTimout(nextImage(), delay); } function imageMouseover() { clearTimeout(timeoutId); } function imageMouseout() { timeoutId =...
  37. J

    How do you do this with XHTML?

    It's not XHTML. It's a scripting language like PHP or ASP that reads 'no' as a variable and uses that the display specific content according to the variable value.
  38. J

    Best way to transition to a new domain address?

    If your webserver can do mod_rewrites, then you can have an htaccess file and do this: RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L] and be done with it if all your pages stay the same (oldsite.com/page.html goes to newsite.com/page.html). I was under the impression that a 301...
  39. J

    CSS: can not get div strech to full content height

    I don't think you can set height to 100% unless the height of the parent is defined. You could try positioning the parent relative and setting the columns to absolute positioning, although I don't know how well that would work. (position:absolute;left:0;top:0;bottom:0; ) Alternatively...
  40. J

    PHP Count number of entries in 3rd position

    You can use substr... $count = array(); foreach($csv as $line) { $char = substr($line, -1); $count[$char] = $count[$char] ? $count[$char] + 1 : 1; }
Back
Top