FANDOM


  • I'd like to know how to add information on the featured article section the main home page of a wikia. I can't find a template for this in source mode. 

      Loading editor
    • Could you please link to this main page? How you add information will depend on how they are added to the page.

        Loading editor
    • https://midtownmadness.fandom.com/wiki/Midtown_Madness_Wiki. I've just become an admin for this wikia. 

        Loading editor
    • You can't find a template for this because there is no template for it. The content for the featured article section has been placed directly on the main page.

        Loading editor
    • How do you change it or add information?

        Loading editor
    • You need to edit the main page itself. It is the content after the line that has:

      ==Featured article==
      

      but before the line that has:

      ==Featured Video==
      
        Loading editor
    • Okay, thank you. That's helpful. 

        Loading editor
    • But wait, what's with the featured article template on the side of the mainpage? Can you add or put information there?

        Loading editor
    • You mean like the one on this page? That is a standard module and the contents are automatically determined by a script Fandom runs. You cannot customize it.


      Edit:

      Oh. I see what you mean now. There are two different "featured article" sections on the main page; one in the left column and one in the right column. I was referring to the one in the right column this whole time. The one in the left column is a similar situation.

        Loading editor
    • So you can't remove it either?

        Loading editor
    • See my edit.

        Loading editor
    • I justed added a header like you showed me, but the featured article section has a image template on the side. I'm talking about removing that.

        Loading editor
    • Alright. Let's slow down so we can all be on the same page. When I talked about the headers, those were already things on the main page. What you want to do is find them and then edit the content between them. I did not mean that you should add the header. I didn't realize you had just added another "featured article" which is why I was confused.

        Loading editor
    • Ohhhh, I found it, thanks. My bad. 

        Loading editor
    • I didn't realise that the featured section was below the source editor page. I missed it completely, thank you. 

        Loading editor
    • I have another question. Can you add graphs on infoboxes?

        Loading editor
    • And how do you create color boxes?

        Loading editor
    • What kind of graphs and color boxes are we talking about? Do you have any examples on other wikis you can show me?

        Loading editor
    • They're line graphs. I made one using a chart and using hex codes to add colors. But I'm not sure how to them on an infobox. It's on my midtown madness wiki. I'm recording the density of something and displaying it using a chart but I was wondering if you could do this on fandom too. Because I saw it on wikipedia. It was colorbox|color=#B2EC5D of something like that to create color boxes.

        Loading editor
    • Like this: colorbox|color=#B2EC5D

        Loading editor
    •   Loading editor
    • I see. Regarding the color box, you could just copy it from Wikipedia. However, it is also fairly simple to just create your own as well.

      <span style="{{#if: {{{2|}}} | background-color: {{{2}}};}}{{#if: {{{3|}}} | color: {{{3}}};}}{{#if: {{{4|}}} | border: 1px solid {{{4}}};}}">{{{1|}}}</span>
      

      Then you would use it like this:

      {{ColorBox|content|background color|text color|border color}}
      

      I am still a bit confused regarding the graphs. Is this something that is already on your wiki that you are trying to move into infoboxes? If so, could you link to an example of its current use? If not, how are you creating the graphs?

        Loading editor
    • -
        Loading editor
    • look at this in source mode.

        Loading editor
    • Okay. I think I get the idea. Maybe it is just me, but I am pretty sure those are bar graphs, not line graphs. Perhaps something like this?

      <infobox>
        <group>
          <header>Bar Graph</header>
          <data source="param1">
            <label>Param1</label>
            <format><div style="background-color: green; height: 100%; width: {{{param1}}}%;"></div></format>
            <default><div style="background-color: green; height: 100%; width: 0%;"></div></default>
          </data>
          <data source="param2">
            <label>Param2</label>
            <format><div style="background-color: green; height: 100%; width: {{{param2}}}%;"></div></format>
            <default><div style="background-color: green; height: 100%; width: 50%;"></div></default>
          </data>
          <data source="param3">
            <label>Param3</label>
            <format><div style="background-color: green; height: 100%; width: {{{param3}}}%;"></div></format>
            <default><div style="background-color: green; height: 100%; width: 100%;"></div></default>
          </data>
        </group>
      </infobox>
      



      Edit:

      Alternatively, you could just take your current method and stick it into a navigation tag. However, you would need to play around with the width to make sure it fits in the infobox.

      <infobox>
        <navigation>
      {| border="0" cellspacing="1" cellpadding="1" style="width:100%;" class="article-table"
      ! scope="row"|Traffic Density
      | style="background:#00FF00; color:#000; font-family:helvetica;" |
      | style="background:#00FF00; color:#000; font-family:helvetica;" |
      |
      |
      |
      |
      |
      |
      |
      |
      |
      |}
        </navigation>
      </infobox>
      
        Loading editor
    • Yeah this is a bar graph. I was adding statistics to race cars since this wikia is full of them. I'm adding information reguarding statistics on horsepower, mass, durability, and top speed. The bar graphs will show this information. 

        Loading editor
    • Do you know how to make naviboxes that appear at the bottom of the wikia page? And I was wondering what does the Template Loop message means. 

        Loading editor
    • Navboxes are just templates. Are you having trouble with a particular aspect of navboxes?

      A template loop is when a template trancludes itself. This can either be direct or indirect via tranclusion of a different template that transcludes the first template either directly or indirectly. For instance, if Template1 trancludes Template2, Template2 transcludes Template3, and Template3 transcludes Template1; then using any of those templates will result in a template loop. If a template is not part of a loop but trancludes a template that is, then that also causes a template loop. For example, if Template4 trancludes Template2 from the precious example, then Template4 would also cause a template loop.

      The most common cause of accidental template loops is the lack of noinclude tags.

        Loading editor
    • Do you know what the spawn code for the navboxes are? 

        Loading editor
    • And when a picture says, opps, this item is no longer available what does it mean?

        Loading editor
    • I added a picture of something and the next day it said "Oops, this item is no longer available, but now that you're here, explore <wikiname> wiki!"

        Loading editor
    • I am not sure what you mean by "spawn code". The only purpose of template types is to categorize them and, in some cases, determine if they should be shown on mobile. With the exception of portable infoboxes, templates to not have special code; you can use the same code as you would for any other type of template, article, blog, etc.

      The message probably means exactly what is says. Can you link to the page with this image? Perhaps I can hep figure out why it is missing.

        Loading editor
    • The picture's back, so never mind. But In what cases does this warning message appear?

      And Let me explain what I'm trying to do: I want to create a navbox at the bottom of the Midtown Madness wiki. This fandom database is filled with races, cars, and locations. I've seen navboxes at the bottom of different wikias to help people find information that they are looking for in a certain catagory. 

      This is the source code that I used to create the navboxes. Will this make them appear?


        Loading editor
    • I think it showed Template:Loop last time.

        Loading editor
    • Regarding the image, this is the first time I have heard of this. If I had to guess, I would say it was probably just a temporary issue with something on the backend.

      As for the navbox, it seems to work fine here. Are you still getting the template loop warning on your wiki? Where did you try using it?

        Loading editor
    • I just used this template by putting its entity code. I encountered the Template:Loop error again. 

        Loading editor
    • What do you mean transcludes itself?

        Loading editor
    • I put the code in the template page where people can modify infoboxes. 

        Loading editor
    • Okay. I think I see the issue. But first, let me clarify what "transclusion" means. "Transclusion" is the act of including something or part of something in something else. If you want to know more about transclusion as it pertains to computer science as a whole, you can have a look at the Wikipedia page. MediaWiki (the platform used to host Fandom wikis) uses this concept with regards to page content. You can read this page to learn more about transclusion as it pertains to MediaWiki. Templates are simply pages in a particular namespace. The intent of the namespace is to have pages that are intended to be transcluded on other pages. There isn't any code that can be used on templates only and pages in other namespaces can be trancluded as well. So, basically, the only thing that makes templates unique as a page type is the namespace.

      Now on to the navbox problem. There are two distinct parts to trancluding a page (template or otherwise). First, you need to determine the content of the page. Second, you need to determine where that content should be transcluded. The code you have been placing on Template:Navbox is not code for determining page content but code for transcluding the content.

      So what you are telling MediaWiki is that you want Template:Navbox to contain the content of Template:Navbox. Okay, what is that content? Well to find out, let's look at Template:Navbox. Oh, it is the content of Template:Navbox; what is that? The content of Template:Navbox... I assume you have spotted the problem by now.

      If you want to create nested navboxes for your main page, you need to create a new template. Let's call it "Template:MainPageNavbox". Then your contents of Template:MainPageNavbox would be what you have been trying to change Template:Navbox to. Something like this from your previous post.

      {{Navbox
       | name = Navbox
       | title = Navbox
       | bodyclass = hlist
       
       | group1 = Group 1
       | list1 = List 1
       
       | group2 = Group 2
       | list2 = {{Navbox|child
        | group1 = Group 2.1
        | list1 = List 2.1
       
        | group2 = Group 2.2
        | list2 = {{Navbox|child
         | group1 = Group 2.2.1
         | list1 = List 2.2.1
       
         | group2 = Group 2.2.2
         | list2 = List 2.2.2
         }}
       
        | group3 = Group 2.3
        | list3 = List 2.3
        }}
       
       | group3 = Group 3
       | list3 =
       * List 3
       * List
       * List
       }}
      
        Loading editor
    • Okay.

        Loading editor
    • I had some questions about the graphs.  When I mentioned using these graphs in an infobox that I asked you about, this is for a car. I'm trying to edit the results of these graphs so that they would show different amounts of horsepower, mass, durability, and speed. I added the entity code in the page for how the infobox template layout should be. If I change any of these results, would they be different? Would it show the results in the code used on the template layout page?

        Loading editor
    • I am sorry but could you please explain what you mean by "entity code"? You are the first person I have talked with that has used this term and I am still not sure what it is referring to.

      If you use the first option from #25 (or something like it), you provide the "amount" as a percent. For example, if I wanted the bar for param1 to be at 100%, I would enter "100" as the value of param1.

        Loading editor
    • I added this code in this page:
      Data code
       
        Loading editor
    • Ah. I see now. Hang on while I make some changes.

        Loading editor
    • Car info
      This is where the information comes in: On this inbox. How do I change this so that it shows the suitable amount?
        Loading editor
    • Sorry, "infobox," not inbox.

        Loading editor
    • What did you do?

        Loading editor
    • Okay. I edited the template. Try something like this:

      {{Car
        | horsepower_game = 75
        | mass = 20
        | durability = 80
        | top_speed = 95
      }}
      
        Loading editor
    • It works! Thanks!

        Loading editor
    • Now I'd like to know how you'd create these graphs without an infobox.

        Loading editor
    • Perhaps something like this. By separating the bars from the rest of the graph, you can easily add as many bars as you want to a given graph.

      Template:Bar_Graph

      {| class="{{{class|wikitable}}}" style="width: {{{width|100%}}};{{{style|}}}"
      |+ {{{caption|Bar Graph}}}
      {{{bars|}}}
      |}
      

      Template:Graph_Bar

      |-
      ! {{{label|}}} || style="width: 100%; background-image: linear-gradient(to right, {{{color|green}}} {{{percent|0}}}%, transparent {{{percent|0}}}%);" |
      

      On a Page

      {{Bar Graph
        | caption = Car Stats
        | bars = {{Graph Bar
                   | label = Horsepower
                   | percent = 75
                 }}
                 {{Graph Bar
                   | label = Mass
                   | percent = 25
                 }}
                 {{Graph Bar
                   | label = Durability
                   | percent = 50
                 }}
                 {{Graph Bar
                   | label = Top Speed
                   | percent = 87.5
                   | color = red
                 }}
      }}
      

      Expected Output

      Car Stats
      Horsepower
      Mass
      Durability
      Top Speed
        Loading editor
    • It's not for car stats, but thank you.

        Loading editor
    • No problem. Just set the caption to whatever you want.

        Loading editor
    • Yup/. I just wanted to use something better rather than filling charts will colors in order to make them resemble graphs. 

        Loading editor
    • Wait, you can make the graphs show amount to right, just not in percentage, in out of 10. 

        Loading editor
    • Revised Versions

      Template:Graph_Bar

      
      |-
      ! {{{label|}}}
      | style="width: 100%; background-image: linear-gradient(to right, {{{color|green}}} calc(100% * {{{value|0}}} / {{{max_value|10}}}), transparent calc(100% * {{{value|0}}} / {{{max_value|10}}}));" |
      | style="white-space: nowrap;" | {{{value|0}}} / {{{max_value|10}}}
      

      On a Page

      {{Bar Graph
        | caption =
        | bars = {{Graph Bar
                   | label = Label1
                   | value = 75
                   | max_value = 100
                 }}{{Graph Bar
                   | label = Label2
                   | value = 25
                   | max_value = 25
                 }}{{Graph Bar
                   | label = Label3
                   | value = 5
                 }}{{Graph Bar
                   | label = Label4
                   | value = 20
                   | color = red
                 }}{{Graph Bar
                   | label = Label5
                   | value = -5
                 }}
      }}
      

      Expected Output

      Label1 75 / 100
      Label2 25 / 25
      Label3 5 / 10
      Label4 20 / 10
      Label5 -5 / 10
        Loading editor
    • Maybe this would be even better?

      Template:Graph_Bar

      
      |-
      ! {{{label|}}}
      | style="text-align: center; width: 100%; background-image: linear-gradient(to right, {{{color|green}}} calc(100% * {{{value|0}}} / {{{max_value|10}}}), transparent calc(100% * {{{value|0}}} / {{{max_value|10}}}));" | {{{value|0}}} / {{{max_value|10}}}
      

      Expected Output

      Label1 75 / 100
      Label2 25 / 25
      Label3 5 / 10
      Label4 20 / 10
      Label5 -5 / 10
        Loading editor
    • Okay, thanks. I can use this for infobox graphs too?

        Loading editor
    • Wait, It's not showing.

        Loading editor
    • Code 2
      This is what I typed, could you help me?
        Loading editor
    • It might work in infoboxes but I did not design it with that in mind; so it might look weird. This goes back to the difference between using a template a creating a template. The code I provided as "Template:Bar_Graph" and "Template:Graph_Bar" are supposed to be on template pages, not the article itself.

        Loading editor
    • Is there a code for article pages and not infoboxes? And I wanted to add numbers in infoboxes as captions.

        Loading editor
    • When I said I wanted to create these graphs without infoboxes I meant represent stats on article pages.

        Loading editor
    • How do you create bar graphs on article pages?

        Loading editor
    • For the infobox, I made some changes. The values should now be on a scale from 1 to 10. Give it a try and let me know what you think.

      Infoboxes and templates are not the same thing; although infoboxes are typically used via templates. It is possible to have an infobox that is not a template and it is possible to have a template that is not an infobox. Here are non-infobox templates you can use to make the graph.

      Template:Bar_Graph

      {| class="{{{class|wikitable}}}" style="width: {{{width|100%}}};{{{style|}}}"
      |+ {{{caption|Bar Graph}}}
      {{{bars|}}}
      |}
      

      Template:Graph_Bar

      
      |-
      ! {{{label|}}}
      | style="width: 100%; background-image: linear-gradient(to right, {{{color|green}}} calc(100% * {{{value|0}}} / {{{max_value|10}}}), transparent calc(100% * {{{value|0}}} / {{{max_value|10}}}));" |
      | style="white-space: nowrap;" | {{{value|0}}} / {{{max_value|10}}}
      

      Assuming you add those two templates to your wiki, this is what you would put on an article page.

      {{Bar Graph
        | caption =
        | bars = {{Graph Bar
                   | label = Label1
                   | value = 75
                   | max_value = 100
                 }}{{Graph Bar
                   | label = Label2
                   | value = 25
                   | max_value = 25
                 }}{{Graph Bar
                   | label = Label3
                   | value = 5
                 }}{{Graph Bar
                   | label = Label4
                   | value = 20
                   | color = red
                 }}{{Graph Bar
                   | label = Label5
                   | value = -5
                 }}
      }}
      

      Alternatively, you could try to use EasyTimeline. However, I have never used it before so I would probably not be able to offer much help with that.

        Loading editor
    • I'm good, thanks. That's all for today.

        Loading editor
    • Do you both the Template:Bar_graph and the Template:Graph_bar together? And then add the template at the bottom? I'm confused.

        Loading editor
    • You don't have to reply right now if you don't want to. I can expect an answer by tomorrow.

        Loading editor
    • You use both templates together on the article page. More specifically, you use Template:Graph_Bar as the input for the "bars" parameter of Template:Bar_Graph.

        Loading editor
    • Bar Graph
      |-
      ! 
      | style="width: 100%; background-image: linear-gradient(to right, green calc(100% * 0 / 10), transparent calc(100% * 0 / 10));" |
      Template:Bar Graph
      
        Loading editor
    • Like this?

        Loading editor
    • Can you show me the complete code?

        Loading editor
    • And thanks for fixing the infoboxes, it looks much better.

        Loading editor
    • I went ahead and added the templates for you. I also wrote some documentation that provide an example of how to use it on a page.

        Loading editor
    • Thanks!

        Loading editor
    • I had a question: When you're creating reference lists. Can you add archived webpages?

        Loading editor
    • I haven't used the reference list feature myself but I would imaging so. Are you having issues using an archived page in the list?

        Loading editor
    • There are references on wikipedia that I would like to use on FANDOM.

        Loading editor
    • Do you mean you want to cite Wikipedia as a reference or that Wikipedia has references you want to copy to your wiki? If the latter, could you link to the page and describe which references you want to copy?


      Edit:

      If you haven't already, perhaps reading Help:Cite would help.

        Loading editor
    • Reference list
      This is the reference list. It's from Midtown Madness wikipedia page. There are 37 total. Do you know if I could include this list?
        Loading editor
    • Yes, you should be able to. But how you do it depends on how you intend to use it. Wikipedia generates the list using the citation extension I linked to. The citation list at the end of a page contains only citations that are actually used on the page. If you want to have the full list of 37 sources regardless of which ones are actually used, you will need to just create a list template.

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.