• This is my site i am working on porting to wordpress
    https://www.terminaldusk.com/dev/

    What i want to do with the links in the sidebar are as follows.

    1st. If there is an image associated with a link, like the 2 links under “upcoming releases”. I would like the description to show as part of the link and not plain text.

    2nd. if there is no image like “current playlist” i would like the name and description to show, like it is. but there is no URL associated with “The Orb”, i left the URL field blank, but it still shows as a link.

    Is there a way to not have “The Orb” be a link? an maintain everything mentioned above? I assume some editing to /includes/link.php would have to happen.

    can anyone help me accomplish this?

    thanks!
    Scott

Viewing 15 replies - 1 through 15 (of 18 total)
  • Second one, very much possible. Go to links.php, line 244.

    There you see

    $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';

    This one creates the link. So put this around it:


    if ($the_link != "https://") {

    $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';

    }

    As for the first, still thinking about it…

    Oops. Forget something. A few lines below the thing you just altered, there’s another:

    $output .= '</a>';

    Do the same with that, so:

    if ($the_link != "https://") {
    $output .= '</a>';
    }

    First thing also solved, also quite easy, but with some more changes. Better replace the whole stuff with this (from 244 down to where it says // endwhile, that is):

    if ($the_link != "https://") {
    $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
    }

    if (($row->link_image != null) && $show_images) {
    if (strstr($row->link_image, 'http')) {
    $output .= "<img src=\"$row->link_image\" $alt $title />";
    if ($show_description && ($desc != '')) {
    $output .= $between . $desc;
    }

    } else { // If it's a relative path
    $output .= "<img src=\"" . get_settings('siteurl') . "$row->link_image\" $alt $title />";

    if ($show_description && ($desc != '')) {
    $output .= $between . $desc;
    }
    }
    } else {
    $output .= $name;
    }

    if ($the_link != "https://&quot;) {
    $output .= '</a>';
    }

    if ($show_updated && $row->recently_updated) {
    $output .= get_settings('links_recently_updated_append');
    }

    if (($row->link_image != null) && $show_images) {
    if ($show_description && ($desc != '')) {
    $output .= $between . $desc;
    }
    }

    $output .= "$aftern";
    } // end while

    Thread Starter line

    (@line)

    I have placed all the code in from you last post and it has made my site go all out of wack.

    take a look: https://www.terminaldusk.com/dev/

    the first and second post worked, that third one made everything go haywire.

    thanks! maybe i implemented it wrong?
    does it mater if i have div’s wrapping the upcoming releases ?

    thanks again!

    PS!!!!!

    I have link category upcoming releases set to generate:
    <div class="upcomingReleases"> before </div> after

    I have playlist set to generate:
    <li><strong> before
    </strong> :&nbsp; in between
    </li> after

    Thread Starter line

    (@line)

    this is the code being generated:

    <div id="sidebar">
    <li class="pagenav">
    <h2>Pages</h2>
    <ul>
    <li class="page_item"><a href="https://www.terminaldusk.com/dev/?page_id=2" title="About">About</a></li>
    </ul>
    </li>
    <h2>Upcoming Releases</h2>
    <div class="upcomingReleases">
    <a href="https://www.terminaldusk.com/discog/" title="TD004 : Wisp : Building Dragons"><img src="https://www.terminaldusk.com/images/releases/TD004_40x40.jpg" alt="TD004" title="TD004 : Wisp : Building Dragons">TD004 : Wisp : Building Dragons</a>TD004 : Wisp : Building Dragons
    <div class="upcomingReleases"><a href="https://terminaldusk.com/discog" title="TD003 : Line 47 / EmotionalJoystick : Meet Uptown"><img src="https://www.terminaldusk.com/images/releases/noImage_40x40.jpg" alt="TD003" title="TD003 : Line 47 / EmotionalJoystick : Meet Uptown">TD003 : Line 47 / EmotionalJoystick : Meet Uptown</a>TD003 : Line 47 / EmotionalJoystick : Meet Uptown
    <h2>Current Playlist</h2>
    <li><strong>Rusuden</strong></li>
    <li><strong><strong>V/A</strong></strong></li>
    <li><strong><strong><strong>[A]pendics Shuffle</strong></strong></strong></li>
    <li><strong><strong><strong><strong>Lackluster</strong></strong></strong></strong></li>
    <li><strong><strong><strong><strong><strong>V/A</strong></strong></strong></strong></strong></li>
    <li><strong><strong><strong><strong><strong><strong>Not Breathing</strong></strong></strong></strong></strong></strong></li>
    <li><strong><strong><strong><strong><strong><strong><strong>V/A</strong></strong></strong></strong></strong></strong></strong></li>
    <li><strong><strong><strong><strong><strong><strong><strong><strong>Shifted Phases</strong></strong></strong></strong></strong></strong></strong></strong></li>
    <li><strong><strong><strong><strong><strong><strong><strong><strong><strong>The Orb</strong></strong></strong></strong></strong></strong></strong></strong></strong></li>
    <li><strong><strong><strong><strong><strong><strong><strong><strong><strong><strong>Intricate</strong></strong></strong></strong></strong></strong></strong></strong></strong></strong></li>
    </div>

    That’s probably it, you haven’t closed the div’s. It’s also strange you now have two descriptions on that page..

    Thread Starter line

    (@line)

    well i have not changed anything.
    I placed your code and now i have this???

    Im confused,

    i dont think it is placing the after code for the upcoming releases links, which is </div>

    I was stupid I think, change the last

    if (($row->link_image != null) && $show_images) {

    in

    if (($row->link_image == null) && $show_images) {

    see if that works.

    If I look at your code, you haven’t closed the div’s. That should help.

    Thread Starter line

    (@line)

    Im not sure what to do, i have placed the </div>
    in the after link?

    also it’s not showing the descriptions for the playlist

    Where in the code have you placed it?

    Thread Starter line

    (@line)

    in the admin, where you can specify what comes before, in between, and after a link

    Admin > Links > Link Categories
    on this page in the formatting section.

    ?? thanks for helping me with this ??

    Hah. Got it. The code pasted weirdly here, and $output .= "$aftern"; is supposed to be $output .= "$after n";

    $after calls your </div>, not $aftern ??

    Aaah. That space between after and n is supposed to be a backslash, which won’t show up here…

    Thread Starter line

    (@line)

    ok that fixed the exploded page but it’s still showing double
    $desc for upcoming releases and no $desc for current playlist

    here is the code it produces now

    <div id="sidebar">
    <li class="pagenav">
    <h2>Pages</h2>
    <ul>
    <li class="page_item"><a href="https://www.terminaldusk.com/dev/?page_id=2" title="About">About</a></li>
    </ul>
    </li>
    <h2>Upcoming Releases</h2>
    <div class="upcomingReleases"><a href="https://www.terminaldusk.com/discog/" title="TD004 : Wisp : Building Dragons"><img src="https://www.terminaldusk.com/images/releases/TD004_40x40.jpg" alt="TD004" title="TD004 : Wisp : Building Dragons">TD004 : Wisp : Building Dragons</a>TD004 : Wisp : Building Dragons</div>
    <div class="upcomingReleases"><a href="https://terminaldusk.com/discog" title="TD003 : Line 47 / EmotionalJoystick : Meet Uptown"><img src="https://www.terminaldusk.com/images/releases/noImage_40x40.jpg" alt="TD003" title="TD003 : Line 47 / EmotionalJoystick : Meet Uptown">TD003 : Line 47 / EmotionalJoystick : Meet Uptown</a>TD003 : Line 47 / EmotionalJoystick : Meet Uptown</div>
    <h2>Current Playlist</h2>
    <li>Lackluster</li>
    <li>Not Breathing</li>
    <li>V/A</li>
    <li>V/A</li>
    <li>Rusuden</li>
    <li>V/A</li>
    <li>The Orb</li>
    <li>Intricate</li>
    <li>Shifted Phases</li>
    <li>[A]pendics Shuffle</li>
    </div>

    Thanks! again! ??

    https://www.terminaldusk.com/dev/

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘sidebar links modifications to links.php?’ is closed to new replies.