Jump to content

heavyEddie

Members
  • Posts

    40
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

heavyEddie's Achievements

Member

Member (2/5)

0

Reputation

  1. That would certainly do it as well, but I found the answer... In my code I was calling a different variable than what this code was using. Man... I new it would be a stupid answer. If nothing else, folks can now see two methods for removing a trailing slash. I think I read someplace the using substr was faster than preg_replace. Not sure if that is accurate though.
  2. OK, I can't see any reason that this line of code isn't working. It is intended to remove a trailing slash if it exists... but it doesn't. It seems to work for displaying the string without the trailing slash, but not defining the variable. I have a feeling this is going to be a "DUH" moment. Doesn't work... if(substr($url, -1) == "/") $url = substr($url, 0, -1); However, this will display what I'm looking for if(substr($url, -1) == "/") echo substr($url, 0, -1);
  3. I ended up taking a different approach by writing some smarty modifier plugins. Thanks Daniel0 for a positive response and suggestion.
  4. This is a good starting point as for a class... if it is what you are looking for. http://www.ricocheting.com/perl/mysql.php
  5. I understand the basic concept of Tidy, but was curious if would allow me to customize the tags it recognizes and convert it to my own customized tags? I know I can use some preg commands for this purpose, but am kind of hoping it could be done at the same time I do some cleaning with tidy. Example: Dude, this is my wife.<comment>She is hot!</comment> would become: Dude, this is my wife. <span id="hot">She is hot!</comment> As always... your help and suggestions are welcome.
  6. Thanks for the technique! I'm not sure I will use it in this particular case, but in my library for sure.
  7. Yes, after thinking it through you folks are of course correct. I will probably have a category and rely on tags for an easy to find search.
  8. Thanks for the info folks... the goal is better SEO and not to make it worse. So, when I just read this article and it said to redirect to a single URL using a 301 redirect. Should the 2nd and 3rd url then redirect to the first? With a .html at the end
  9. On a new site I'm working on I'm using .htacess and mod_rewrite so I can create URLs that are SEO friendly. For example... http://www.bla.com/products/kitchen/coffee-pot http://www.bla.com/products/food/beverage/coffee-pot http://www.bla.com/products/x43252 (coffee pot model #) Ultimately, all these URLs will point to the same page. I know the first two examples are good for SEO, but the 3rd probably is not. Is it a good idea to redirect these two one of the other URLs or leave it alone?
  10. I'm going for two things with this method. One is attractive rounded corners and the 2nd is that the corners are not printed with the page. Will the leaner keep all the corners as background images? If so, I'm always interested in a leaner, faster loading page.
  11. That did the trick... the server should be online this weekend and I will be able to start putting the design up for a more detailed look. I can handle most of the PHP/MySQL issues, but the design aspect is new to me. Thank you very much! I think I will go learn up on the :before and :after.
  12. I've been playing with this a few days, and figure it is time for some help. So, here a screen shot is attached of what is happening. To summarize, I have a large set of divs that create a rounded corner effect. Unfortunatly, it isn't liquid so it isn't adjusting the height as I had hoped it would. Any help greatly appreciated. CSS Below #content_t { background: url(/home/ed/Desktop/x/images/content_t.png) 0 0 repeat-x; width: 720px; margin-top: 23px; margin-left: 20px; float: left; } #content_b { background: url(/home/ed/Desktop/x/images/content_b.png) 0 100% repeat-x; } #content_l { background: url(/home/ed/Desktop/x/images/content_l.png) 0 0 repeat-y; } #content_r { background: url(/home/ed/Desktop/x/images/content_r.png) 100% 0 repeat-y; } #content_bl { background: url(/home/ed/Desktop/x/images/content_bl.png) 0 100% no-repeat; } #content_br { background: url(/home/ed/Desktop/x/images/content_br.png) 100% 100% no-repeat; } #content_tl { background: url(/home/ed/Desktop/x/images/content_tl.png) 0 0 no-repeat; } #content_tr { background: url(/home/ed/Desktop/x/images/content_tr.png) 100% 0 no-repeat; padding: 60px 15px 50px 15px; height: 100%; } #content_left { width: 200px; background-color: #cccccc; float: left; } #content_right { width: 300px; background-color: red; float: left; } HTML below <div id="content_t"> <div id="content_b"> <div id="content_l"> <div id="content_r"> <div id="content_bl"> <div id="content_br"> <div id="content_tl"> <div id="content_tr"> <div style="posistion:absolute;"> <div id="content_left"> dudeaaaaaaaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaa a a aaaaaaaaaaa a a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br> dude<br> dude<br> dude<br> dude<br> dude<br> dude<br> dude<br> dude<br> dude<br> dude<br> </div> <div id="content_right"> right<br> right<br> right<br> right<br> right<br> right<br> right<br> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> [attachment deleted by admin]
  13. Field and Values in slibrary id = 1 display = 'yes' id = 2 display = 'yes' id = c999 display = 'no' id = 5 display = 'yes' id = c822 display = 'yes' Field and Values in clibrary cid = 999 name = 'how to walk a dog' cid = 822 name = 'how to wlak a cat' Desired output id display name 999 no how to walk a dog 822 yes how to walk a cat
  14. I've searched around, but this type of question is really hard to find any kind of hits with. So... I have two tables. The first has a field called "id" that can be numeric or have "c" prefixed to a number. The second has a field called "cid" that will match the "id" field with the prefixed "c" So, the challenge is to join the tables and strip the prefixed "c" on the "id" field and then use it in the join. My query looks like this, but it doesn't work since it will not recognize cid. SELECT s.id, s.display, IF(LEFT(s.id, 1) = 'c', SUBSTRING(s.id,2), s.id) as cid, c.name FROM slibrary AS s INNER JOIN clibrary AS c ON cid = c Is this possible?
  15. Don't I feel silly... Thanks, the extra argument was the issue. I am parsing each line of the file, which is why I'm not using file_get_contents(). Thanks for the help and advise!
×
×
  • 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.