Ajutor:Sidebar-image

De la wiki.pe-piata
Revizia pentru 27 ianuarie 2012 01:38; Paul (Discuție | contribuții)
(dif) ←Versiunea anterioară | afișează versiunea curentă (dif) | Versiunea următoare → (dif)
Salt la: navigare, căutare

<a name="top" id="top"></a>

How to add a banner to the MediaWiki sidebar

From Collectivesolver

Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a>

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>

Unelte personale
Cu mandrie sustinut de:
Grup Telemach
proiect initiat de:
pe-piata.ro