WordPress.org

Ready to get started?Download WordPress

Forums

Link category definition issue (10 posts)

  1. Ville
    Member
    Posted 10 years ago #

    Is the "Links / Link Categories / (Add|Edit) a Link Category / Formatting / Between Link and Description" observed at this time? Both in 1.2 and 1.3 the < BR /> does nothing and, in fact, no matter what is written to that field it won't show up between the link and the description...

  2. Root
    Member
    Posted 10 years ago #

    A search in the forum would help. Anything to do with category or list styling *should* be done in the CSS. No br tags needed.

  3. dannyman
    Member
    Posted 10 years ago #

    Well, I happen to be searching the forum, and this is the only (useless) answer I get. Anyone care to chime in?

  4. Root
    Member
    Posted 10 years ago #

    You are not searching. You are posting. And useless? Thanks.

  5. dannyman
    Member
    Posted 9 years ago #

    For the sake of argument, what precisely does one search for to answer this question?
    I recall solving this problem on my own, long ago, after unsuccessfully searching this forum and finding only the answer that I should search the forum, where I can only find an answer to search the forum, and then be criticized for complaining at the uselessness of such problem-solving.
    Cheers,
    -danny

  6. Root
    Member
    Posted 9 years ago #

    As far as I can see the br tag as has been observed does not appear to work (thank ***). Normal list styling is all you need.

  7. Anonymous
    Unregistered
    Posted 9 years ago #

    I can't find it in the forum. How does one do a linebreak formatting in CSS in a single "li"-element? (I want to separate link and description)

  8. Root
    Member
    Posted 9 years ago #

    You use line-height or possibly padding on li a. in the CSS.

  9. ottofilm
    Member
    Posted 9 years ago #

    Hi Ville -

    Six months later, I have an answer to your question. :) I was looking for a solution to this myself, and a search of the forums didn't come up with anything except this post, so I went into the code. In /wp-includes/links.php, at the bottom in the get_links_list function, the before, after, and between fields are not called from the database on lines 486-488, and then on about line 507, those items are hardcoded when the call is sent to get_links, and what is hardcoded for between is just a newline (\n). There are two ways to fix this:

    1. a) Add the three fields to the SELECT so they're picked up for the fuction. Lines 486-488 would probably become:

    SELECT DISTINCT link_category, cat_name, show_images,
    show_description, show_rating, show_updated, sort_order,
    sort_desc, text_before_link, text_after_link, text_after_all, list_limit
    "

    b) then, list those three database items in the call to get_links, so line 507 changes from:

    '
    <li>',"</li>
    ","n",<br />

    to:

    "get_links($cat['text_before_link'],","get_links($cat['text_after_all'],","get_links($cat['text_after_link'],",<br />

    Then the call to get_links should properly pull those settings from link categories.

    The other, fast cheap and wrong (but the way I did it) way to do it, is to just hardcode that BR tag into line 507:

    '
    <li>',"</li>
    ","n<br>",<br />

    or of course br \ if you're doing that xhtml thing.

    Dougal wrote this function originally so I might send this to him to see if I did it right.

  10. digitalruse
    Member
    Posted 9 years ago #

    Tried to insert that (though things are cut off in your post) and got tons of PHP and mySQL errors.

    -DR

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.