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

new to xenforo, want to add a simple modification

Discussion in 'XenForo Development Discussions' started by petermk, Feb 20, 2014.

  1. petermk

    petermk Member

    Hi All,

    I am new to Xenforo, just migrated my forum from vBulletin. In my old forum I had an item in the top menu that would link to a dynamic page on my website - www.mydomain.com/yyyy/mm/dd/

    So, I had a pretty simple plug-in: $my_var = 'http://www.mydomain.com/' . date('Y/m/d') . '/';
    Then, just add $my_var to a template and that was it.

    How do I do something like that in Xenforo?

  2. petermk

    petermk Member

  3. AndyB

    AndyB Well-Known Member

    You might like provide an image of where you would like to place this link.
  4. petermk

    petermk Member

    It's in the top navigation right next to "Members." I know how to add a new navigation item, just looking for a way to add a variable to use in href. Is this something I should use a helper for?

    Last edited: Feb 21, 2014
  5. petermk

    petermk Member

    Ok, never mind. I did it with a callback tag.

    Another question... is there a way to add a PHP array, so that I could loop through it in a template?

  6. AndyB

    AndyB Well-Known Member

    Cool glad you got it. Using a xen:callback is a good way of doing it.


    Regarding your second question. It would be helpful if you explained what you're wanting to do in greater detail.
  7. petermk

    petermk Member

    Basically I have a cron job that goes through several RSS feeds, combines them (arranges by date, etc.) and saves the resulting XML and JSON files on my server. I had my own vBulletin plug-in that would take the XML file, loop through it and display the most recent 10 items on the forum's home page.
    I want to do something like that in the xenforo sidebar.

  8. AndyB

    AndyB Well-Known Member

Share This Page