Jump to content

linstefoo

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

linstefoo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This is a total newbie question but when do you use "self::" and when do you use "$this->" in a php class? They appear to do the same thing so is it just preference? For example I have this code: <?php class Database { protected $info = array('server' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'apart_sql'); private $conn; public $errors = array(); public function __construct() { $this->connect(self::info['server'], self::info['usernamne'], self::info['password'], self::info['database']); } ?> Would I use "$this->" instead of "self::"? This is sort of a interesting to me. Thanks, Steve
  2. I know this isn't way your talking about, but here is a way to position something horizontally and vertically center: #div { position: absolute; margin: -100px 0 0 -100px; top: 50%; left: 50%; width: 200px; height: 200px; }
  3. Hi, we just launched this a week ago and I wanted to get feedback from you all. http://www.instruction.greenriver.edu/aviation/beta/ Thanks, ~Fo0~
  4. To the TheFilmGod: I agree that you shouldn't absolutely position any element, except, in rare cases. However if you going to absolutely position any element, first do this to it's container, more specifically do this, to the main wrapper in its css: #wrapper { position: relative; } By positioning your wrapper relatively, even if you position something absolutely it will be absolutely positioned, relatively to that parent element. But again, try to stray away from absolutely positing something. @ yanivkalfa If I were you I'd do something I learned a long time ago, first off take all three of your images and place side-by-side or bottom-to-bottom in one image file. Make sure you compress it correctly too and PNG should do you just fine. Next in your css do something like this. #blogo a { display: block; width: 168px; height: 159px; background: url(buttonslogo.png) no-repeat; text-indent: -999em; overflow: hidden; /* Do this for accessibility purpose, this way it's text underneath your background image */ } #blogo a:hover { background-position: 0 -X; /* X = the amount of pixels to your hover image, inside of the one image */ } #blogo a:active { background-position: 0 -X; /* see above */ } I'd personally not use a:active, because once you move over and away from that image, even if it is active, it will not stay in that state. If you know php test for it that way. Thanks and I hope this helps.
  5. Another way that I use is to link the 'a' to the style like so: #header a { display: block; margin: 0 2px 0 0; padding: 0; width: 294px; height: 81px; background: url(../images/index_01.jpg) no-repeat; float: left; } Then to initiate it in code, do this: <div id="header"> <a href="link.php">Link</a> <!-- Doing it this way allows text based browsers --> <!-- and disabilities enabled browsers to read this graphic --> </div>
  6. Hi all, I've been working on an update for a client, and discovered that safari is acting odd. It won't auto center even with a fixed width, and in all other browsers, including IE 6 & 7 it works fine, as well as Firefox. Thanks in advance for help: http://www.meekermansion.org/beta/
  7. Hi all, Everything Dunes is a niche e-commerce website that I'm developing. I am just looking for some feedback and maybe some security issues it may have. Thanks.
  8. Hi all, I was just hoping for some feedback on this website: http://www.meekermansion.org. I'm going to be doing a update soon so any things that could be added to the future release, please let me know
  9. I just thought you'd like to know that that worked, now my products end in .html. Thanks again for your assistance
  10. I found that it is conflicting with the original mod-rewrite. I realized that I can rewrite it to look like so, it works: RewriteRule ^product-([0-9]+).htm$ /index.php?%{QUERY_STRING}&page=products&pid=$1 [L] Thanks to all of those who helped and thank you Dragen for suggesting the mod-rewrite conflict.
  11. PT stands for Pass Through. I discovered that if I delete the .html$ and just go like that, it comes up. http://everythingdunes.com/product-1 This is quite interesting. Any ideas on why it's acting funny?
  12. Tried all of these and thanks for the help, but it just doesn't seem to be working EXAMPLE: http://everythingdunes.com/product-1.html Here is exactly what I use in my .htaccess file: RewriteEngine On RewriteRule ^([^/?]*).html$ /index.php?%{QUERY_STRING}&page=$1 [PT,L] RewriteRule ^product-([0-9.]+).html$ /index.php?page=products?pid=$1 [L] Am I doing something wrong?
  13. here the mod write I tried: RewriteRule ^product-([^/?]*).html$ products.php?id=$1 [PT,L] What's wrong with this? I added just a plain old "R" to it and it broke.
  14. If you go to my clients website: http://www.everythingdunes.com and hover over a product link, you get the normal "products.html?pid=##". What I would like to do is make that turn into something like this: "product-##.html" and have it bring up that product's information, while still referencing products.html as it's template. An example of what i'm talking about is at: http://epenguins.mobilepenguins.com/product.html ( the template without the product info ) http://epenguins.mobilepenguins.com/product-15.html ( what i'm trying to do )
  15. Heres what I've got: product.html?id={SOMENUMBER} What I am trying for is to get the product url to look like this product{SOMENUMBER}.html and actually get the information based on that number from MySQL. I've tried a mod_rewrite that looks like this RewriteEngine On # mod_rewrite store directives RewriteRule ^product-([0-9]).html$ index.php?%{QUERY_STRING}&page=product&id=$1 [PT,L] I'm sure this is in the wrong area but who knows Any help would be appreciated
×
×
  • 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.