Ajutor:Sidebar-image
Paul (Discuție | contribuții) (Pagină nouă: How to add a banner to the MediaWiki sidebar From Collectivesolver To add a banner to the MediaWiki sidebar follow the next steps: 1. Find the file MonoBook.php in skins/MonoBook...) |
Paul (Discuție | contribuții) |
||
Linia 1: | Linia 1: | ||
− | How to add a banner to the MediaWiki sidebar | + | <a name="top" id="top"></a> |
− | From Collectivesolver | + | <h1 id="firstHeading" class="firstHeading">How to add a banner to the MediaWiki sidebar</h1> |
+ | <div id="bodyContent"> | ||
+ | <h3 id="siteSub">From Collectivesolver</h3> | ||
+ | <div id="contentSub"></div> | ||
+ | <div id="jump-to-nav">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div> <!-- start content --> | ||
− | To add a banner to the MediaWiki sidebar follow the next steps: | + | <p>To add a banner to the MediaWiki sidebar follow the next steps: |
+ | </p><p>1. Find the file MonoBook.php in skins/MonoBook.php path (if you're using monobook) | ||
+ | </p><p>2. Download the file. | ||
+ | </p> | ||
+ | 3. Go to line 201 or file the line: <div dir="ltr" style="text-align: left;"><div class="html4strict source-html4strict" style="font-family: monospace;"><pre class="de1"> <span class="sc2"><<span class="sy0">/</span><span class="kw2">div</span>></span><span class="sc-1"><!-- end of the left (by default at least) column --></span></pre></div></div> | ||
+ | <p>4. Add the next lines of code after the line you find above: | ||
+ | </p> | ||
+ | <div dir="ltr" style="text-align: left;"><div class="php source-php" style="font-family: monospace;"><pre class="de1"> <!-- begin of banner1 --> | ||
+ | <div class='generated-sidebar portlet'> | ||
− | + | <h5><span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-headingtext'</span><span class="br0">)</span> <span class="sy1">?></span></h5> | |
+ | <div style="border: 1px solid #B0B0B0; background-color: #FFFFFF;"> | ||
− | + | <a href="<span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-url'</span><span class="br0">)</span> <span class="sy1">?></span>"> | |
− | + | <img width="100%" title="<span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-alttext'</span><span class="br0">)</span> <span class="sy1">?></span>" | |
+ | alt="<span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-alttext'</span><span class="br0">)</span> <span class="sy1">?></span>" | ||
+ | src="<span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-imgsrc'</span><span class="br0">)</span> <span class="sy1">?></span>" /></a> | ||
− | + | </div></div> | |
+ | <!-- end of banner1 --> | ||
+ | | ||
+ | </div><!-- end of the left (by default at least) column --></pre></div></div> | ||
+ | <p>5. Create new articles / page named MediaWiki:sidebar-banner1-headingtext and write the banner heading. Example: Sponsor | ||
+ | </p><p>6. Create new articles / page named MediaWiki:sidebar-banner1-url and write the The destination URL of this banner. Example: <a href="http://www.website.com/abc.html" class="external free" title="http://www.website.com/abc.html" rel="nofollow">http://www.website.com/abc.html</a> | ||
+ | </p><p>7. Create new articles / page named MediaWiki:sidebar-banner1-alttext and write the alt="" parameter of an HTML <img> tag. Example: Best dog training | ||
− | + | </p><p>8. Create new articles / page named MediaWiki:sidebar-banner1-imgsrc and write the src="" parameter of an HTML <img> tag. The URL of the banner image. It may be the address of an image uploaded to your Wiki {{filepath:banner123.png}}, or the address of an external image. Example: <a href="http://www.website.com/banner123.gif" class="external free" title="http://www.website.com/banner123.gif" rel="nofollow">http://www.website.com/banner123.gif</a> | |
− | + | </p> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | 8. Create new articles / page named MediaWiki:sidebar-banner1-imgsrc and write the src="" parameter of an HTML | + |
Versiunea de la data 27 ianuarie 2012 01:37
<a name="top" id="top"></a>
How to add a banner to the MediaWiki sidebar
From Collectivesolver
To add a banner to the MediaWiki sidebar follow the next steps:
1. Find the file MonoBook.php in skins/MonoBook.php path (if you're using monobook)
2. Download the file.
3. Go to line 201 or file the line:<span class="sc2"><<span class="sy0">/</span><span class="kw2">div</span>></span><span class="sc-1"><!-- end of the left (by default at least) column --></span>
4. Add the next lines of code after the line you find above:
<!-- begin of banner1 --> <div class='generated-sidebar portlet'> <h5><span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-headingtext'</span><span class="br0">)</span> <span class="sy1">?></span></h5> <div style="border: 1px solid #B0B0B0; background-color: #FFFFFF;"> <a href="<span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-url'</span><span class="br0">)</span> <span class="sy1">?></span>"> <img width="100%" title="<span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-alttext'</span><span class="br0">)</span> <span class="sy1">?></span>" alt="<span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-alttext'</span><span class="br0">)</span> <span class="sy1">?></span>" src="<span class="kw2"><?php</span> <span class="re0">$this</span><span class="sy0">-></span><span class="me1">msg</span><span class="br0">(</span><span class="st_h">'sidebar-banner1-imgsrc'</span><span class="br0">)</span> <span class="sy1">?></span>" /></a> </div></div> <!-- end of banner1 --> </div><!-- end of the left (by default at least) column -->
5. Create new articles / page named MediaWiki:sidebar-banner1-headingtext and write the banner heading. Example: Sponsor
6. Create new articles / page named MediaWiki:sidebar-banner1-url and write the The destination URL of this banner. Example: <a href="http://www.website.com/abc.html" class="external free" title="http://www.website.com/abc.html" rel="nofollow">http://www.website.com/abc.html</a>
7. Create new articles / page named MediaWiki:sidebar-banner1-alttext and write the alt="" parameter of an HTML <img> tag. Example: Best dog training
8. Create new articles / page named MediaWiki:sidebar-banner1-imgsrc and write the src="" parameter of an HTML <img> tag. The URL of the banner image. It may be the address of an image uploaded to your Wiki , or the address of an external image. Example: <a href="http://www.website.com/banner123.gif" class="external free" title="http://www.website.com/banner123.gif" rel="nofollow">http://www.website.com/banner123.gif</a>