Ajutor:Sidebar-image

De la wiki.pe-piata
(Diferența dintre versiuni)
Salt la: navigare, căutare
(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...)
 
m (A protejat "Ajutor:Sidebar-image" ([edit=sysop] (indefinit) [move=sysop] (indefinit)))
 
(O revizie intermediară efectuată de un utilizator neafișată)
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">&lt;<span class="sy0">/</span><span class="kw2">div</span>&gt;</span><span class="sc-1">&lt;!-- end of the left (by default at least) column --&gt;</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"> &lt;!-- begin of banner1 --&gt;
 +
&lt;div class='generated-sidebar portlet'&gt;
  
1. Find the file MonoBook.php in skins/MonoBook.php path (if you're using monobook)
+
&lt;h5&gt;<span class="kw2">&lt;?php</span> <span class="re0">$this</span><span class="sy0">-&gt;</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">?&gt;</span>&lt;/h5&gt;
 +
&lt;div style="border: 1px solid #B0B0B0; background-color: #FFFFFF;"&gt;
  
2. Download the file.
+
&lt;a href="<span class="kw2">&lt;?php</span> <span class="re0">$this</span><span class="sy0">-&gt;</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">?&gt;</span>"&gt;
3. Go to line 201 or file the line:
+
&lt;img width="100%" title="<span class="kw2">&lt;?php</span> <span class="re0">$this</span><span class="sy0">-&gt;</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">?&gt;</span>"
 +
alt="<span class="kw2">&lt;?php</span> <span class="re0">$this</span><span class="sy0">-&gt;</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">?&gt;</span>"
 +
src="<span class="kw2">&lt;?php</span> <span class="re0">$this</span><span class="sy0">-&gt;</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">?&gt;</span>" /&gt;&lt;/a&gt;
  
</div><!-- end of the left (by default at least) column -->
+
&lt;/div&gt;&lt;/div&gt;
 +
&lt;!-- end of banner1 --&gt;
 +
&nbsp;
 +
&lt;/div&gt;&lt;!-- end of the left (by default at least) column --&gt;</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 &lt;img&gt; tag. Example: Best dog training
  
4. Add the next lines of code after the line you find above:
+
</p><p>8. Create new articles / page named MediaWiki:sidebar-banner1-imgsrc and write the src="" parameter of an HTML &lt;img&gt; 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>
<!-- begin of banner1 -->
+
<div class='generated-sidebar portlet'>
+
<h5><?php $this->msg('sidebar-banner1-headingtext') ?></h5>
+
<div style="border: 1px solid #B0B0B0; background-color: #FFFFFF;">
+
<a href="<?php $this->msg('sidebar-banner1-url') ?>">
+
<img width="100%" title="<?php $this->msg('sidebar-banner1-alttext') ?>"
+
alt="<?php $this->msg('sidebar-banner1-alttext') ?>"
+
src="<?php $this->msg('sidebar-banner1-imgsrc') ?>" /></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: http://www.website.com/abc.html
+
 
+
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 {{filepath:banner123.png}}, or the address of an external image. Example: http://www.website.com/banner123.gif
+

Versiunea curentă din 27 ianuarie 2012 01:38

<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