WordPress.org

Ready to get started?Download WordPress

Forums

Word-wrap trackback URL's (18 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    I have a little annoyance with my blog layout. When you check out one of my posts, the trackback URL is longer then the width of the area it occupies. In IE 6 SP1 it wraps nicely to the next line, in Mozilla Firefox 0.9 the URL continues into the right-pane, overlapping some of the content over there.
    Any ideas on how I can fix this?

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    Since there are no spaces in the trackback URL, FF's behavior is probably more correct. The only CSS solution I can think of, other than making the font smaller, is to enclose it in a div with the same width as your entry column and set overflow:auto in the stylesheet. Though arguably a horizontal scrollbar is no more attractive than spilling over into the sidebar.
    A better solution might be to make your permalinks shorter by taking advantage of the 'post slug' field.

  3. cdc01
    Member
    Posted 10 years ago #

    Beel, nice, works well, much cleaner.

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Beel - Thanks for that ! A definite improvement :)

  5. Anonymous
    Unregistered
    Posted 10 years ago #

    The difficulty with turning it into a link is that people expect links to take them somewhere. You need to be confident that all your readers will know they have to copy the link target, rather than click on the link and expect that to send a trackback.

  6. Beel
    Member
    Posted 10 years ago #

    Yep, but don't you think if the reader knows what a trackback is and is specifically looking for one, he/she will know what to do with it? A reader who clicks on the link probably was indeed expecting to go somewhere but just had no clue where ;-) I get your point, however.

  7. Sphyr
    Member
    Posted 10 years ago #

    After a bit more thought, I like the way it looks, but clicking on "Trackback" should give you a page that says "The trackback for this entry is ...................". Something you can cut-n-paste right off the screen.
    Clicking on trackback now just gives you the post with comments and that's sure to be confusing.

  8. charle97
    Member
    Posted 10 years ago #

    pull <?php trackback_url() ?> out of the href.

  9. Mags
    Member
    Posted 10 years ago #

    To help the n00bs (of which I am one myself), I used the following code:
    "><?php _e('TrackBack URI'); ?> (Right click on link and click on "Copy Shortcut")
    That will work for IE. I figure anyone using another browser probably knows what to do. :-)
    Thanks for the code, Beel. Long trackback links were messing up my layout.

  10. tim9021
    Member
    Posted 9 years ago #

    This is what I did:
    " title="Trackback url (right click to copy)">«Trackback url for this post (right click to copy) »
    Has anyone figured out why a long trackback url extends beyond its div container? It doesn't appear to stretch anything, just span it.
    I noticed that a long title wraps, why doesn't the trackback url?
    Thanks.

  11. jtk3
    Member
    Posted 9 years ago #

    I'm new to WordPress. I'd like to make this change but I don't know where to do it.

  12. Kafkaesqui

    Posted 9 years ago #

    Trackbacks link stuff occurs in wp-comments.php.

  13. charle97
    Member
    Posted 9 years ago #

    wp-comments.php

  14. robcorr
    Member
    Posted 9 years ago #

    Here's my solution, which puts the trackback url in a text box, so that people can easily highlight and copy it.

    Put this in wp-comments.php:

    <p><?php _e("<strong>Ping URL:</strong>"); ?>&nbsp;&nbsp;&nbsp;&nbsp; <input class="field" type="text" name="pingurl" id="pingurl" value="<?php trackback_url() ?>" size="28" /></p>

  15. Kafkaesqui

    Posted 9 years ago #

    Rob, you may confuse people by using the term "Ping URL". Pingbacks are different animals from trackbacks.

    And since this is a "shorten Trackbacks" thread, here's my custom permalink suggestion:

    In .htaccess, add something like the following (modify based on the setup of your site)

    RewriteRule /trackback/?$ /wp-trackback.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA]

    Then I edit my trackback link in wp-comments.php:

    <?php bloginfo("url"); ?>/trackback/<?php the_ID() ?>

  16. NuclearMoose
    Member
    Posted 9 years ago #

    Flagged for Codex
    Kaf? Please? :)

  17. jtk3
    Member
    Posted 9 years ago #

    Thanks, I liked Rob's idea of using a text box.

  18. mostlymuppet
    Member
    Posted 9 years ago #

    Used Rob's solution, with the textbox. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.