rocknbil - 4:23 pm on Oct 11, 2011 (gmt 0)
If I figured out a way to essentially (I'm no PHP expert so I might need some help with this) make URL's like this:...
This is precisely correct, when it doubt, look at what the "big dogs" do. Your basic logic would be one of these two ways:
- Store the URL in two variables, one for the link itself, one for the text of the link
- check URL length
- If it exceeds your preset length, use some substring method to truncate it and append it with ...
The second method is similar, except you'd use something like the page title for the text:
<a href="she-ll-be-comin-round-the-mountain-when-she-comes-when-she-comes">She'll Be Comin' Round the....</a>
This is pretty basic in any programming language, but if the second method is used you can split the title up on spaces so you can use whole words.