Results 1 to 11 of 11

Thread: Templates! Argh! Help with Infobox, plz!

  1. #1
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15

    Templates! Argh! Help with Infobox, plz!

    I've noticed that every single thread in here is closed, so my chances of getting help are pretty slim, I guess.

    I have looked up info on how to write templates for my wiki, but I still don't get it! Like a previous user (whose thread got closed without responses), I need help setting up the Infobox looking things that Wikipedia has.

    My Site: http://www.teachanddiscover.net/

  2. #2
    Just another mook Doc C's Avatar
    Join Date
    Mar 2006
    Location
    Southern CA
    Posts
    5,098
    Rep Power
    20
    Threads are closed after 3 months of inactivity. You've done the right thing here by opening a new one asking for help.

    I've been toying around with a wiki off and on for a couple of months. I've got the manual on my favorites in IE7 and always have it open when mucking about in the wiki.
    "You don't really understand human nature
    unless you know why a child on a merry-go-round will wave at his parents every time around
    -- and why his parents will always wave back."

    -William D. Tammeus

  3. #3

    Join Date
    Jun 2005
    Location
    US
    Posts
    32
    Rep Power
    13
    What I would recommend is just using some of the infoboxes that have already been built on Wikipedia.

    http://en.wikipedia.org/wiki/Template:Infobox

    That page gives the code for a really basic infobox. Just copy and paste the code into your own page or template, and then edit the parts that need to be changed. The code is simple enough that you could just change one of the text parts and see what changes.

    Hopefully that gives you a direction to go in. If you need more detailed help, I could try, but its been a while now since I've used MediaWiki.

  4. #4
    Just another mook Doc C's Avatar
    Join Date
    Mar 2006
    Location
    Southern CA
    Posts
    5,098
    Rep Power
    20
    Great idea, Jediarchives. I'm even going to try that.
    "You don't really understand human nature
    unless you know why a child on a merry-go-round will wave at his parents every time around
    -- and why his parents will always wave back."

    -William D. Tammeus

  5. #5
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15
    I took a look at those pages on that site and link, and even did a lot of cutting and pasting, but I could not get anything to look right. When I look at the code to try and fix it, it doesn't make any sense to me. It's (to me) nothing like html or php. I can edit and write all the html I care to, and I can at least make heads or tails of php and javascript, but this is completely foreign to me.

  6. #6
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15
    OH HAY!!! I noticed about 20 minutes after I posted that I'd already seen that link that it WASN'T the link I thought it was...

    Hey, Jediarchives! Thanks for that. I went in and out of Wikipedia and MediaWiki's sites doing searches for Template:Infobox and couldn't find anything helpful. The line on that site that helped the most was:

    "Copy the source of this template (available from the view source link) and paste it into a new blank page."

    None of the other pages I went to gave any hints like that...

    THANKS!!!

  7. #7
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15
    OK, I hope you haven't written me off here... I have another question.

    When you see the infoboxes in Wikipedia, the text and hr's don't go up to the Infobox, but they stop about 10 or so pixels from the left hand border. I have inserted an infobox on a test page, and can't seem to figure out how to get the border around the left side of the Infobox.

    See these links and examine the left side of the infoboxes...
    http://www.teachanddiscover.net/wiki...e_Time_Machine <-- Mine
    http://en.wikipedia.org/wiki/The_Time_Machine

    Note the [edit] tags and the text...

  8. #8

    Join Date
    Jun 2005
    Location
    US
    Posts
    32
    Rep Power
    13
    The only thing that looks wrong to me is the edit tag. The text on both sites stops a bit back from the border, but the edit tag on your site doesn't, while the edit tag on wikipedia does. The hr's go to the border on both sites.

    It doesn't seem like it would be a problem with the infobox, but more likely a problem with the MediaWiki css. I never dealt with that, so I'm not really sure how to fix it. Sorry.

  9. #9
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15
    Okay, well for everyone else who surfs the Wiki thread looking for help, I've got some info for future notice...

    My main.css file did not contain any information for the Infoboxes. So, i went to the bottom of it and put it in.

    infobox
    margin-left: 20px;
    yada yada yada
    other settings

    and bingo, it worked...

    So, thanks for all your help in here... I hope my sufferings and findings can help someone else in the future...

    Now I get to experiment with the CSS file and find out how to Justify the text!

  10. #10
    Registered
    Join Date
    Dec 2007
    Location
    North Carolina
    Posts
    3
    Rep Power
    0
    Hey CMills...

    Do me a favor? Could you paste a copy of the infobox stuff you pasted into your main.css?

    I'm getting all borked up on this and it would be a big help. Thanks!

  11. #11
    cmills's Avatar
    Join Date
    Apr 2003
    Posts
    101
    Rep Power
    15
    You bet...

    In my main.css file I have this all the way at the bottom:

    PHP Code:
    .infobox 
       
    border:1px solid #aaaaaa;
       
    background-color:#f9f9f9;
       
    padding:5px;
       
    font-size95%;
       
    border-collapsecollapse;
       
    margin-left20px;

    ...Then I put this in my wiki as "Template:Infobox:"

    HTML Code:
    <table class="infobox" align="right" bgcolor="#E1E1E1" style="width:20em; font-size:90%; text-align:left; border: 1px green solid;">
    <caption style="text-align:center; font-size:140%;"><i><b>{{{name}}}</b></i></caption>
    <tr>
    <td colspan="2" style="text-align:center;" bgcolor="#E1E1E1">{{{image}}}</td>
    </tr>
    <tr>
    <td colspan="2" bgcolor="#E1E1E1" style="text-align:center;">{{{imagecaption}}}</td>
    <tr>
    <th>Author</th>
    <td>{{{author}}}</td>
    </tr>
    <tr>
    <th>Publisher</th>
    <td>{{{publisher}}}</td>
    </tr>
    <tr>
    <th>Publication date</th>
    <td>{{{publication}}}</td>
    </tr>
    <tr>
    <th>Illustrator</th>
    <td>{{{illustrator}}}</td>
    </tr>
    <tr>
    <th>Genre</th>
    <td>{{{genre}}}</td>
    </tr>
    <tr>
    <th>Pages</th>
    <td>{{{pages}}}</td>
    </tr>
    <tr>
    <th>ISBN</th>
    <td>{{{isbn}}}</td>
    </tr>
    and then there's this in the page were you want the infobox at:

    Code:
    {{Infobox
    | name = The Hitchhiker's Guide to the Galaxy
    | image = [[Image:Hhgttg.jpg|150px]]
    | image_caption = Movie Poster
    | author = Douglas Adams
    | country = United Kingdom
    | language = English
    | series = The Hitchhiker's Guide to the Galaxy
    | genre = Science Fiction
    | publisher = Pan Books
    | release_date = 1979
    | media_type = Paperback and hardcover
    | pages = 180
    | isbn = ISBN 0-330-25864-8
    | followed_by = The Restaurant at the End of the Universe
    }}
    I hope this helps... Boy, Wiki Code is a pain in the "donkey" to work with, but helpful once you've got something to cut-and-paste and use around... Let me know if there's anything else you need...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •