Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Top banner/header

SiGSiG
edited March 2007 in Vanilla 1.0 Help
Hi all, By following Mark's instructions (http://lussumo.com/docs/doku.php?id=vanilla:administrators:troubleshooting#theme_changes), I was able add a banner on top of my Vanilla site as an extension. Works great. I see that this site also uses the same banner in Dokuwiki. I use MediaWiki and would like to do the same... I'm not a PHP developper, however I'm pretty sure this is done via include instructions but I'm not sure how to implement it... Can I use the same source (the extension's default.php page) or should I make a copy? How would I include it in my page? Or is it something totally separate? I know my request isn't really about Vanilla but my site will use Vanilla as the base and the wiki will be like another resource accessible through Vanilla (I'm also using the use integration). Thanks for your help, SiG

Comments

  • Options
    OK, nevermind, I found it!
  • Options
    Please explain where you found it! It might help others in the future.
  • Options
    Hmmm! I added a comment earlier about looking at the StuffDisplayer add-on.
  • Options
    SiGSiG
    edited March 2007
    Hey there,

    Well I took Mark's code above and installed it as an extension in Vanilla as he explained. This worked very well.

    I then needed to include that same banner in MediaWiki so took some of the PHP code from the extension's default.php file and included it in MediaWiki's MonoBook.php. Then I did the same for the CSS; I pasted the code from Mark's Style.css in MediaWiki's Main.css file. All I did is just add another DIV called "header" and referred to it in the CSS.

    Here's the a snapshot of my codes:

    MonoBook.php: <body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?> <?php if($this->data['body_onload' ]) { ?>onload="<?php $this->text('body_onload') ?>"<?php } ?> class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?>"> /* Start of Banner code */ <div id="header"> <div class="BannerContainer"> <div class="Banner"> <a class="BannerLogo" href="http://lussumo.com">&nbsp;</a> <div class="BannerMenu"> <a href="/board/">Discussion Board</a> | <a href="/wiki/">Wiki</a> | <a href="/item1/">Item 1</a> | <a href="/item2/">Item 2</a> | <a href="/item3/">Item 3</a> | <a href="/item4/">Item 4</a> </div> </div> </div> </div> /* End of Banner code */ <div id="wholebody"> <div id="globalWrapper">


    Main.css: body { font-family:'Trebuchet MS', 'Verdana', 'Tahoma', sans-serif; background: #ebf1eb url(.gif) 0 0 no-repeat; color: black; margin: 0; padding: 0; } /* scale back up to a sane default */ /* Start of Banner code */ #header { border-bottom:1px solid #665566; } .BannerContainer { background: url(/board/extensions/Banner/background.gif) top left #fff; text-align: center; } .Banner { margin-left: auto; margin-right: auto; width: 800px; text-align: left; } .Banner { padding-top: 20px; padding-bottom: 20px; } .BannerLogo { display: block; position: absolute; width: 88px; height: 22px; background: url(lussumo.logo.gif) no-repeat; text-decoration: none; margin-left: 712px; cursor: pointer; z-index: 500; } .BannerMenu { padding-top: 2px; padding-bottom: 2px; font-family: trebuchet ms, arial; font-size: 14px; } .BannerMenu a, .BannerMenu a:link, .BannerMenu a:visited { border: 0px; color: #000000; text-decoration: none; } .BannerMenu a:hover { border: 0px; color: #000000; text-decoration: underline; } /* End of Banner code */ #wholebody { position: absolute; top: 70px; /* Adjust the above value to work with the height of the header */ } #globalWrapper { font-size: 80%; width: 100%; margin: 0; padding: 0;

    As you can see, I use the same background picture for both my Vanilla and MediaWiki sites.

    The only thing is that if I want to make a change in the menu, I have to repeat it in the wiki too but it's really no big deal... just copy-paste.


    Hope this helps,

    SiG
  • Options
    jimw, StuffDisplayer is good but it only works withing Vanilla so can't user that same banner in other applications.
  • Options
    How can I make my code format as code... [code] [/code] don't work here...
  • Options
    <code></code> does though.
  • Options
    I tried that but was on Text mode... Works only in HTML...

    got it, thanks Minisweeper!
This discussion has been closed.