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

generate x amount of input fields, put data into array?

Discussion in 'XenForo Development Discussions' started by Mikey, Apr 21, 2011.

  1. Mikey

    Mikey Well-Known Member

    (sorry for the title, didn't know what else to call it)

    How would I make an option in my admin options area for my add on which acts sort of how the identity services do, where I enter the number of inputs I want it to generate, and it will generate them, put the data from them all into an array which I can then loop through in the template with <xen:foreach> ...?

    Is it possible to do such a thing? I need to do it so that I can have a number of inputs generated for the user, so that they can put data in there, where it is looped through in the template..

    I'm creating a "Site Friends" Sidebar block add on. The template hook, and all functionality is there, it all works, but I want a more efficient way of offering the user more than a few inputs.

    Right now the admin goes to the options page, fills in "Link 1 URL", "Link 1 Title" - it's limited to the amount of "Link *" inputs I add as the developer, I wanted it to be more elegant than that, I'm hoping XenForo can do what I need..
  2. Floris

    Floris Guest

    The XenFans.com Promoted Account plugin does this basically .. Just skip the install step of 'account upgrade' - unless you want ppl to pay to be included in the list.
    Just add the "links" as usernamed, put them in a usergroup, set the plugin to use that usergroup, and they show in the sidebar.
    Edit the template to have the link show how you want.


Share This Page