WordPress.org

Ready to get started?Download WordPress

Forums

Changing Link layout (24 posts)

  1. ajaychandra
    Member
    Posted 10 years ago #

    Currently I'm still using the default layout and I want to start changing small things first. It seems that my links are all posted in the same place in one list regardless of how I change the link groups they belong to. I would like the Links to be displayed in the same place but separated by what link group they belong to, with the group being preceded by the name of the group. How would I do that?

  2. southerngal
    Member
    Posted 10 years ago #

    Exactly what I was coming here to post. My blogroll got hijacked this morning, just like everyone else's.
    I had the links section filled with a few message boards I go to but would like to have a reads section separate from the links. Is this possible using the link manager, or will everything be in one place? I use .CSS and have "Reads" in one part of my sidebar and "Links" in another part.
    Any help would be great! :)

  3. Laughinglizard
    Member
    Posted 10 years ago #

    Ajay, You could use the get_links_list() function that dougal wrote for links.php It spits out all the links in their respective categories as an ordered list. The parameters are order by (default is name) and whether to show blank categories or not (default is to leave empty categories out)
    SG, there are a couple of functions in links.php which could help you out. It sounds like you already know the categories you want to seperate. You could use get_linksbyname() There is a good set of comments inside wp-links/links.php which tells you how to use the functions.
    Hope this helps.
    Peace.

  4. ajaychandra
    Member
    Posted 10 years ago #

    Thanks for the info, I replaced get_links with get_links_list in the default layout and it does what I want, but only problem is that the font sizes of the actual categories has gotten a bit smaller, and the actual links are in a tiny font, I guess it's nesting two tags that cause font size to be reduced, any idea what I need to make changes to in order for the size to not get reduced twice?

  5. southerngal
    Member
    Posted 10 years ago #

    Thanks you laughing lizard you! I will have to play with this later on... :)

  6. Laughinglizard
    Member
    Posted 10 years ago #

    Good question, I might retool the function to get that right. I have been wanting to implement that myself, but that waited because of the font size issue. I dont want to fix it in the CSS (which you could do) because I am using that nesting elsewhere. Look for a hack/fix later tonight or tomorrow on this thread.

  7. southerngal
    Member
    Posted 10 years ago #

    Worked great, laughing lizard, THANK YOU! Now...one more question! How do I get links to show updated? :)

  8. southerngal
    Member
    Posted 10 years ago #

    There has to be a way as I have seen it on other blogs.

  9. Mike Little
    Member
    Posted 10 years ago #

    Hi All,
    If you use wp_get_linksbyname() instead of get_linksbyname() then the list of links will be displayed according to the parameters you set in the 'manage link categories' page. Ditto for wp_get_links instead of get_links.
    southerngal,
    in order to get updated to work, you need to do a couple of things:
    1. Set the option to show updated on the manage link categories page.
    2. Under Options -> Link Manager Settings you can specifiy various related parameters for the display of updates. For now I would leave the defaults.
    3. Uncomment the line from the default index.php
    require_once($abspath.'wp-links/links.weblogs.com.php')
    make sure the file weblogs.com.changes.cache is writable by your web server.
    4. And then it should start working.
    It will grab the list of updated weblogs (set in options) from weblogs.com once per hour (default, change it in options) and set the updated timestamp in any links you have which appear in the file from weblogs.com.
    That last updated timestamp will be displayed as a title attribute (tooltip) of the link. If the last updated timestamp is within the two hours (again, set in options) of the current time then it will use the prepend and append text specified in, you guessed it, options around the link.
    Hope that helps,
    Mike

  10. Laughinglizard
    Member
    Posted 10 years ago #

    Sorry....Mike beat me to it...school tripped me over! :-P

  11. southerngal
    Member
    Posted 10 years ago #

    Thanks Mike, I went through and double checked everything. I think everything is right, yet, it's not working. :(

  12. Laughinglizard
    Member
    Posted 10 years ago #

    SG, the update issue takes a couple of minutes (took mine quite a few minutes the first time) to sync, patience worked for me that time :-) The code gets a little convoluted and time dependant because of the XML updates from Blogrolling. Is your file gettings updated? Check the time stamp on your updates file. If not, you might have a problem.
    Ajay, I fixed the links list to my satisfaction. Check it out at http://dinki.mine.nu/weblog/ and if you like it, here is what you do:
    Replace your links.php under the wp-links folder with the text from the following file: http://dinki.mine.nu/weblog/b2-img/links.phps

  13. ajaychandra
    Member
    Posted 10 years ago #

    Thanks for the the fix Liza, once I replaced my links.php file the new links showed in the appropriate size. However another problem cropped up, they are nowunderlined, and they weren't before. I guess I have to change the css file for that, any idea what section I should change to remove the underline? scribbles.mobiustrip.org is the address of my site.

  14. NuclearMoose
    Member
    Posted 10 years ago #

    Crapola...anybody care to tell a newbie how to properly post something to show the code with actually having the code render? :)
    I am a doofus tonight..
    Craig.

  15. southerngal
    Member
    Posted 10 years ago #

    I use a decoder in IE, can't find one yet for Mozilla! There's a thread on here somewhere, hunt for "decoder" :)
    Mike, how do you change the "just updated" << to something else? I want a "*" instead. And how do you change the timestamp for the updates? I'm assuming they are both in the same file, right?

  16. Laughinglizard
    Member
    Posted 10 years ago #

    SG: Look under Link Manager Settings under the options page, all the settings you need are in there...

  17. ajaychandra
    Member
    Posted 10 years ago #

    Another question, where in wp-layout.css do I put in text-declaration:none; I tried putting it in the top, and then putting it in the li section, neither works.

  18. southerngal
    Member
    Posted 10 years ago #

    Thanks L Lizard, I must have overlooked that last night. ;)
    Ajay, that's a code you should use when you are in a .class. If you have a font, the text decoration: none;
    Please go and view some tutorials about .CSS, there are some great ones out there that will help you create excellent layouts! I use http://bradsoft.com/topstyle and have for over a year, it's a great program for .CSS! :)

  19. Jaykul
    Member
    Posted 10 years ago #

    by the way ... not to be picky, but get_links_list really should be named wp_get_links_list to be consistent with the others, since it uses the wp settings for how to display the links.

  20. NuclearMoose
    Member
    Posted 10 years ago #

    Laughing Lizard referred me here now that I want to try to tweak my site a bit more, and I've tried to sort my links by category using some of the functions in links.php, but I just keep getting parse errors, so I quit messing around before I make a big mess! :)
    Maybe a fresh start tomorrow will open my eyes...
    BTW...I was cutting and pasting the code into my index.php, and keeping it between the PHP tags...is this correct?
    Craig.

  21. NuclearMoose
    Member
    Posted 10 years ago #

    Mark,
    I have been lucky to not have screwed myself up by playing with and file and not be able to recover from a disaster. I will take your advice and be totally diligent about working on backups instead of on original files. It's a prudent thing to do that takes only a second!
    I think I will wait a while until I start altering code much. I've so much to learn, still, and there's also that little voice out there whispering "new version soon." :)
    Thanks for the help and tips!!
    Craig.

  22. Laughinglizard
    Member
    Posted 10 years ago #

    You are too cool NM! Giving you (and SG for that matter) advice is so darn satisfying!

  23. Cena
    Member
    Posted 10 years ago #

    I have a question about the new menu in the default index.php.
    Previously, I could go into this and change the default names for menu sections (i.e., 'links', 'archives', etc.) with no problem. However, the new menu code starts off with

      <?php get_links_list ?>

    • (next section). How do I change the name of the 'links' section header to something else? I've tried adding a
    • as the other menu items use, but that just jacks up the whole thing.
  24. southerngal
    Member
    Posted 10 years ago #

    I'm not really sure what you want to do...Cena.
    I have the following:
    <div class="sideheader">Links<⁄div>
    <div class="side">
    Boards I Run
    <?php wp_get_linksbyname('running') ?>
    Visiting These
    <?php wp_get_linksbyname('visiting') ?>
    Money Links
    <?php wp_get_linksbyname('money') ?>
    Business
    <?php wp_get_linksbyname('business') ?>
    Miscellaneous
    <?php wp_get_linksbyname('miscellaneous') ?>
    Does this help?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.