wp-chunk handles long links in comments:
http://www.village-idiot.org/archives/2006/06/29/wp-chunk/
however thats not neccessarily going to do anything for your sidebar display. You can try it and see though
If it were me, I would hack that so that the commenter’s name was the link to the comment.. and NOT the actual comment content itself.
Perhaps you might like to let whoever wrote that plaugin know that there are ways to truncate long urls π
Trying wp_chunk right now.
Didn’t work for me. And I can’t seem to post a comment at the village idiot page. Every time I try, I get a message, “Piss off, Asshole.”
My problem is that no URL can be longer than 25 characters. WP-Chunk seems to truncate them to about 40 characters. So they still break the page.
Wanted to ask whether this is a variable that can be reset somehow and if so, how to do that?
But the Village Idiot just curses at me when I try.
Best,
kwc
Try adding this to your style.css file:
#noindent ul li {
overflow:hidden;
}
This should just chop the overflowing text off instead of pushing it into the other sidebar2 area. I may have gotten the location wrong there, but I think that’s correct.
Added overflow:hidden;
to both sidebar1 and sidebar2. We’ll see what that does. Thanks, Otto.
kenwinstoncaine, My apologies that you cannot leave a comment.. HOWEVER, that said.. the message you are getting is not “piss off, asshole” its “piss off spammer”. I know this because its my site, and while I am admittedly tough on comments, I am not completely rude (not every word in a sentence needs to be inflammatory) π
wp-chunk is adjustable, yes. unfortunately, I am at work and unable to tell you exactly what you need to change. I should warn you though, that all wp-chunk does is “filter” the url, it doesnt actually change the url within the db, so your plugin is prolly going to be unaffected by it’s (wp-chunk’s) usage.
If youre still needing help with this when i get home later, I will happily post the way to adjust the length at which urls are truncated.
whooami, it does indeed say “PISS OFF A**H*LE” and I can’t leave you replies there or use the contact button – I have no idea why
so I had to join here just to reach you π
In any case, thank you for the nice plugin but I was wondering if you might consider the way it displays trucated urls to definitely indicate it’s trucated so a novice does not try to copy it as text and get it wrong
ie.
bad idea:
http://example.com/_verylongurlexample
better visual
http://example.com/…verylongurlexample…
Also I was wondering if you can track down the conflict it has with the “wrap long words” plugin – not really a conflict, the urls just don’t get shortened, they get wrapped instead. I’d like both to works if possible.
http://wp-plugins.net/plugin/word_wrap/
(I realize that it may be the other plugin’s fault, not yours, so thanks for any insight)
Keep up the good work!
1. oops! yes it is, you got my 403 page, my apologies!! Ive fixed that now, thank you.
2. if you look at the examples on my plugin page, it uses elipses to indicate that the url is shortened. In fact, the elipses are even shown in the code:
$chunked = (strlen($urlname) > 50 && preg_match('#^(http://|ftp://|www.)#is', $urlname)) ? substr_replace($urlname, '.....', 30, -10) : $urlname;
If youre not seeing them, and instead seeing an underscore than thats the result of something else.
3. I havent looked at the word wrap plugin, but i can make an educated guess that it wraps *everything* so no amount of modification of wp-chunk on my part will be able to change that plugin’s default behaviour.
on another note, shortening the point at which its truncated is only as difficult as changing the 50 to something else in that line above.
rodeohk, yes the word wrap works but my point was that it defeats the url shortening. I would like the urls shortened and THEN word wrap, not just word wrap on long urls.
I don’t know if it’s just because of the order wordpress runs the plugins. It might have to be fixed in the word wrap plugin not the url shortening I am not sure. I suspect the answer is to combine both plugins into one.
ermm..and I suspect I dont like that answer.
As I stated, the word_wrap plugin is *probably* wrapping everything.
I looked briefly at the plugin and you are able to add exclusions, based on characters:
$wrapProhibitedChars = "([{!;,/:?}])";
perhaps you can ask that plugin’s writer to provide whatever would be necessary to _not_wrap urls.
Don’t plugins have a priority level?
Perhaps I can change the url shortening to a higher priority and the word wrap to a lower one so they get executed in the prefered order?