1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Using ad_below_top_breadcrumb as mini-directory to other forums (code help)

Discussion in 'Styling and Customization Questions' started by TerryP, Apr 28, 2014.

  1. TerryP

    TerryP Member

    I'm lost on the coding here. Learning, but lost.

    I'd like to use the space ad_below_top_breadcrumb as a directory, of sorts.

    Instead of using a Link Forum, displayed as a child forum, for a link to another forum I'm hoping to use this space for two links to two different news pages.

    Scenario: This is for a sports forum. There are two other forums in this category—Today's News and an Archive forum for news older than 24 hours.

    I can make a Child Forum, title it Today's News, and place it on the main sports page (as a Link Forum.) A click there would take them directly to the Today's News Page.

    However, in the interest of using as little space as possible I think it's possible to use the ad space in the template and have links to both pages.

    I haven't figure out how to code this correctly. The HTML code for the hyperlink? No problems at all. Using the HTML code within these parameters with xF? There's my issue.

    I've used Inspect Element on several differnt xF sites and still can't seem to get the code correct.

  2. doemasters

    doemasters Member

    Would love to know how to use templates in other manners.
  3. Brogan

    Brogan XenForo Moderator Staff Member

  4. TerryP

    TerryP Member

    @Brogan Thanks for looking at this.

    Here's what I've put in the ad_template and the attached image is what I'm trying to do. Right now, this HTML code is in the Description of the node, but obviously I don't want to leave it there.

    <xen:hook name="ad_below_top_breadcrumb" />
    <a href="http://www.rolltidebama.com/forum/index.php?forums/todays-bama-news.167/" target="_blank"><font size="3"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#660000"><!DOCTYPE html>
    <img border="0" src="http://rolltidebama.com/forum/styles/default/xenforo/finger.png" width="30" height="20">
    </html>Today's News</a></font></font></b>

    Attached Files:

  5. TerryP

    TerryP Member

    @Brogan I'm not sure where those arrows are coming from in the navbar as well...seems to be an intermittent issue though.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    I still don't really understand.
    You can add whatever content you want to an ad_ template.

    The navbar issue is due to your logo/header settings not being correct.
    You need to adjust the Style Properties.
  7. TerryP

    TerryP Member

    Yet, when I put that code in ad_below_top_breadcrumb nothing shows up.
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Your code is malformed.

    In addition, you have html and body tags, which shouldn't be there.
  9. TerryP

    TerryP Member

    OK. (Believe you me, I appreciate your patience with me on this.)

    My code is malformed. But, it shows perfectly when placed in the description area for that particular node when it says "You can use HTML."

    This is where I am seeking help: how is my code malformed? If it works in other areas which say HTML is allowed, why is it not working in that ad_template? My instinct tells me I'm doing to the code incorrectly—which is what you're telling me as well.

    What do I need to do to get that image, serving as a link to that forum,to show up in that ad_template?

    (This is likely so simple I've over-thinking this...and if so, my apologies.)
  10. TerryP

    TerryP Member

    double post, sorry
  11. Brogan

    Brogan XenForo Moderator Staff Member

    This is how you link an image to a URL.


    Just copy that structure, editing it to suit.
  12. TerryP

    TerryP Member

    Thanks. If I'm reading you correctly, we'd be looking at something like this?

    I'm assuming the fields for class would need changing. ( class=avatar Av70319m )
    I'm also assuming the fields for this would also need changing. ( data-avatarhtml )

    Attached Files:

  13. Brogan

    Brogan XenForo Moderator Staff Member

    Amaury likes this.
  14. TerryP

    TerryP Member

    That's where I referred to earlier to check my original code. The way they coded this resulted in the the use of HTML and body tags.

Share This Page