Gorilla.php
changeset 1 f2ceea4fabe8
parent 0 cac93de16379
child 2 b6178b40aa09
equal deleted inserted replaced
0:cac93de16379 1:f2ceea4fabe8
     3 {
     3 {
     4   "Plugin Name"  : "Gorilla Paste",
     4   "Plugin Name"  : "Gorilla Paste",
     5   "Plugin URI"   : "http://enanocms.org/plugin/gorilla",
     5   "Plugin URI"   : "http://enanocms.org/plugin/gorilla",
     6   "Description"  : "For The Toughest Pasting Jobs On Earth.&trade; The pastebin, Enano style. <a href=\"http://enanocms.org/plugin/geshi\" onclick=\"window.open(this.href); return false;\">GeSHi plugin</a> highly recommended.",
     6   "Description"  : "For The Toughest Pasting Jobs On Earth.&trade; The pastebin, Enano style. <a href=\"http://enanocms.org/plugin/geshi\" onclick=\"window.open(this.href); return false;\">GeSHi plugin</a> highly recommended.",
     7   "Author"       : "Dan Fuhry",
     7   "Author"       : "Dan Fuhry",
     8   "Version"      : "0.1",
     8   "Version"      : "0.1.1",
     9   "Author URI"   : "http://enanocms.org/"
     9   "Author URI"   : "http://enanocms.org/",
       
    10   "Version list" : ['0.1', '0.1.1']
    10 }
    11 }
    11 **!*/
    12 **!*/
    12 
    13 
    13 // Register namespace and ACLs
    14 // Register namespace and ACLs
    14 $plugins->attachHook('acl_rule_init', 'gorilla_setupcore($this, $session);');
    15 $plugins->attachHook('acl_rule_init', 'gorilla_setupcore($this, $session);');
    77     
    78     
    78     list($flags, $highlight, $text, $title, $ttl) = $db->fetchrow_num();
    79     list($flags, $highlight, $text, $title, $ttl) = $db->fetchrow_num();
    79     $db->free_result();
    80     $db->free_result();
    80     $private = $flags & PASTE_PRIVATE ? true : false;
    81     $private = $flags & PASTE_PRIVATE ? true : false;
    81     $copy_from = $paste_id;
    82     $copy_from = $paste_id;
       
    83     
       
    84     if ( $flags & PASTE_PRIVATE )
       
    85     {
       
    86       if ( @$_GET['hash'] !== gorilla_sign($paste_id, $text) )
       
    87       {
       
    88         die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('gorilla_msg_wrong_hash') . '</p>');
       
    89       }
       
    90     }
    82   }
    91   }
    83   
    92   
    84   $output->header();
    93   $output->header();
    85   
    94   
    86   ?>
    95   ?>
   105       load_component(['jquery', 'jquery-ui']);
   114       load_component(['jquery', 'jquery-ui']);
   106       $('#gorilla_submit_result').empty().hide();
   115       $('#gorilla_submit_result').empty().hide();
   107       
   116       
   108       var whitey = whiteOutElement(document.forms['gorilla_create']);
   117       var whitey = whiteOutElement(document.forms['gorilla_create']);
   109       
   118       
       
   119       var parent = parseInt($('#gorilla_parent').val());
       
   120       if ( isNaN(parent) )
       
   121         parent = 0;
       
   122       
   110       var json_packet = {
   123       var json_packet = {
   111         highlight: $('#gorilla_highlight').val(),
   124         highlight: $('#gorilla_highlight').val(),
   112         text: $('#gorilla_create_text').val(),
   125         text: $('#gorilla_create_text').val(),
   113         is_private: $('#gorilla_private:checked').val() ? true : false,
   126         is_private: $('#gorilla_private:checked').val() ? true : false,
   114         nick: $('#gorilla_nick').val(),
   127         nick: $('#gorilla_nick').val(),
   115         title: $('#gorilla_title').val(),
   128         title: $('#gorilla_title').val(),
   116         ttl: parseInt($('.gorilla_ttl:checked').val())
   129         ttl: parseInt($('.gorilla_ttl:checked').val()),
       
   130         parent: parent,
       
   131         hash: $('#gorilla_hash').val();
   117       };
   132       };
   118       json_packet = ajaxEscape(toJSONString(json_packet));
   133       json_packet = ajaxEscape(toJSONString(json_packet));
   119       ajaxPost(makeUrlNS('Special', 'NewPaste/ajaxsubmit'), 'r=' + json_packet, function(ajax)
   134       ajaxPost(makeUrlNS('Special', 'NewPaste/ajaxsubmit'), 'r=' + json_packet, function(ajax)
   120         {
   135         {
   121           if ( ajax.readyState == 4 && ajax.status == 200 )
   136           if ( ajax.readyState == 4 && ajax.status == 200 )
   246         <label><input<?php if ( $ttl == 2592000                           ) echo ' checked="checked"'; ?> class="gorilla_ttl" type="radio" name="ttl" value="2592000" /> <?php echo $lang->get('gorilla_lbl_ttl_month'); ?></label>
   261         <label><input<?php if ( $ttl == 2592000                           ) echo ' checked="checked"'; ?> class="gorilla_ttl" type="radio" name="ttl" value="2592000" /> <?php echo $lang->get('gorilla_lbl_ttl_month'); ?></label>
   247         <label><input<?php if ( $ttl == 0                                 ) echo ' checked="checked"'; ?> class="gorilla_ttl" type="radio" name="ttl" value="0" /> <?php echo $lang->get('gorilla_lbl_ttl_forever'); ?></label>
   262         <label><input<?php if ( $ttl == 0                                 ) echo ' checked="checked"'; ?> class="gorilla_ttl" type="radio" name="ttl" value="0" /> <?php echo $lang->get('gorilla_lbl_ttl_forever'); ?></label>
   248         </em>
   263         </em>
   249       </p>
   264       </p>
   250       
   265       
       
   266       <!-- reply -->
       
   267       <p>
       
   268         <?php echo $lang->get('gorilla_lbl_reply'); ?><input id="gorilla_parent" name="parent" size="8" value="<?php echo $copy_from ? strval($copy_from) : ''; ?>" />
       
   269       </p>
       
   270       
   251       </div>
   271       </div>
   252     </fieldset>
   272     </fieldset>
       
   273     
       
   274     <!-- hash -->
       
   275     <?php if ( $private && $copy_from ): ?>
       
   276     <input type="hidden" name="hash" id="gorilla_hash" value="<?php echo gorilla_sign($paste_id, $text); ?>" />
       
   277     <?php else: ?>
       
   278     <input type="hidden" name="hash" id="gorilla_hash" value="" />
       
   279     <?php endif; ?>
   253   
   280   
   254     <!-- login notice -->
   281     <!-- login notice -->
   255   
   282   
   256     <?php if ( !$have_permission && !$session->user_logged_in ): ?>
   283     <?php if ( !$have_permission && !$session->user_logged_in ): ?>
   257     <div class="info-box-mini">
   284     <div class="info-box-mini">
   278       'highlight' => 'string',
   305       'highlight' => 'string',
   279       'text' => 'string',
   306       'text' => 'string',
   280       'is_private' => 'boolean',
   307       'is_private' => 'boolean',
   281       'nick' => 'string',
   308       'nick' => 'string',
   282       'title' => 'string',
   309       'title' => 'string',
   283       'ttl' => 'integer'
   310       'ttl' => 'integer',
       
   311       'parent' => 'integer',
       
   312       'hash' => 'string'
   284     );
   313     );
   285   
   314   
   286   $info = array();
   315   $info = array();
   287   
   316   
   288   if ( $is_ajax )
   317   if ( $is_ajax )
   316         'highlight' => $_POST['highlight'],
   345         'highlight' => $_POST['highlight'],
   317         'text' => $_POST['text'],
   346         'text' => $_POST['text'],
   318         'is_private' => isset($_POST['is_private']),
   347         'is_private' => isset($_POST['is_private']),
   319         'nick' => $_POST['nick'],
   348         'nick' => $_POST['nick'],
   320         'title' => $_POST['title'],
   349         'title' => $_POST['title'],
   321         'ttl' => intval($_POST['ttl'])
   350         'ttl' => intval($_POST['ttl']),
       
   351         'parent' => intval($_POST['parent']),
       
   352         'hash' => $_POST['hash']
   322       );
   353       );
       
   354   }
       
   355   
       
   356   if ( $info['parent'] )
       
   357   {
       
   358     // make sure we have the right hash
       
   359     $q = $db->sql_query('SELECT paste_text FROM ' . table_prefix . "pastes WHERE paste_id = {$info['parent']};");
       
   360     if ( !$q )
       
   361       $db->_die();
       
   362     
       
   363     if ( $db->numrows() > 0 )
       
   364     {
       
   365       list($old_text) = $db->fetchrow_num();
       
   366       if ( $info['hash'] !== gorilla_sign($info['parent'], $old_text) )
       
   367       {
       
   368         $info['parent'] = 0;
       
   369       }
       
   370     }
       
   371     else
       
   372     {
       
   373       $info['parent'] = 0;
       
   374     }
   323   }
   375   }
   324   
   376   
   325   if ( !$have_permission )
   377   if ( !$have_permission )
   326   {
   378   {
   327     return '1;<div class="error-box-mini">' . $lang->get('etc_access_denied') . '</div>';
   379     return '1;<div class="error-box-mini">' . $lang->get('etc_access_denied') . '</div>';
   357   $now = time();
   409   $now = time();
   358   $flags = 0;
   410   $flags = 0;
   359   if ( $info['is_private'] )
   411   if ( $info['is_private'] )
   360     $flags |= PASTE_PRIVATE;
   412     $flags |= PASTE_PRIVATE;
   361   
   413   
   362   $sql = 'INSERT INTO ' . table_prefix . "pastes( paste_title, paste_text, paste_author, paste_author_name, paste_author_ip, paste_language, paste_timestamp, paste_ttl, paste_flags ) VALUES\n"
   414   $sql = 'INSERT INTO ' . table_prefix . "pastes( paste_title, paste_text, paste_author, paste_author_name, paste_author_ip, paste_language, paste_timestamp, paste_ttl, paste_flags, paste_parent ) VALUES\n"
   363        . "  ( {$info_db['title']}, {$info_db['text']}, $session->user_id, {$info_db['nick']}, '{$_SERVER['REMOTE_ADDR']}', {$info_db['highlight']}, $now, {$info_db['ttl']}, $flags );";
   415   . "  ( {$info_db['title']}, {$info_db['text']}, $session->user_id, {$info_db['nick']}, '{$_SERVER['REMOTE_ADDR']}', {$info_db['highlight']}, $now, {$info_db['ttl']}, $flags, {$info_db['parent']} );";
   364        
   416        
   365   if ( !$db->sql_query($sql) )
   417   if ( !$db->sql_query($sql) )
   366     ( $is_ajax ) ? $db->die_json() : $db->_die();
   418     ( $is_ajax ) ? $db->die_json() : $db->_die();
   367   
   419   
   368   // avoid insert_id
   420   // avoid insert_id
   372   list($paste_id) = $db->fetchrow_num();
   424   list($paste_id) = $db->fetchrow_num();
   373   $db->free_result();
   425   $db->free_result();
   374   
   426   
   375   $params = false;
   427   $params = false;
   376   if ( $flags & PASTE_PRIVATE )
   428   if ( $flags & PASTE_PRIVATE )
   377     $params = 'hash=' . hmac_sha1($paste_id, sha1($info['text']));
   429     $params = 'hash=' . gorilla_sign($paste_id, $info['text']);
   378   
   430   
   379   $paste_url = makeUrlComplete('Paste', $paste_id, $params, true);
   431   $paste_url = makeUrlComplete('Paste', $paste_id, $params, true);
   380   
   432   
   381   return '0;'
   433   return '0;'
   382            . '<div class="info-box-mini">' . $lang->get('gorilla_msg_created') . '</div>'
   434            . '<div class="info-box-mini">' . $lang->get('gorilla_msg_created') . '</div>'
   496   global $output;
   548   global $output;
   497   
   549   
   498   extract($data);
   550   extract($data);
   499   $perms = $session->fetch_page_acl($paste_id, 'Paste');
   551   $perms = $session->fetch_page_acl($paste_id, 'Paste');
   500   
   552   
       
   553   $localhash = false;
       
   554   if ( $paste_flags & PASTE_PRIVATE )
       
   555   {
       
   556     $localhash = gorilla_sign($paste_id, $paste_text);
       
   557   }
       
   558   
       
   559   if ( $paste_flags & PASTE_PRIVATE || isset($_GET['delete']) )
       
   560   {
       
   561     if ( @$_GET['hash'] !== $localhash )
       
   562     {
       
   563       // allow viewing regardless if mod or admin
       
   564       if ( !($session->user_level >= USER_LEVEL_MOD && !isset($_GET['delete'])) )
       
   565       {
       
   566         die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('gorilla_msg_wrong_hash') . '</p>');
       
   567       }
       
   568     }
       
   569   }
       
   570   
   501   if ( isset($_GET['format']) )
   571   if ( isset($_GET['format']) )
   502   {
   572   {
   503     switch($_GET['format'])
   573     switch($_GET['format'])
   504     {
   574     {
   505       case 'text':
   575       case 'text':
   516         return true;
   586         return true;
   517         break;
   587         break;
   518     }
   588     }
   519   }
   589   }
   520   
   590   
   521   if ( $paste_flags & PASTE_PRIVATE || isset($_GET['delete']) )
       
   522   {
       
   523     if ( @$_GET['hash'] !== hmac_sha1($paste_id, sha1($paste_text)) )
       
   524     {
       
   525       die_friendly($lang->get('etc_access_denied_short'), '<p>' . $lang->get('gorilla_msg_wrong_hash') . '</p>');
       
   526     }
       
   527   }
       
   528   
       
   529   $output->header();
   591   $output->header();
   530   
   592   
   531   $perm = $paste_author == $session->user_id ? 'delete_paste_own' : 'delete_paste_others';
   593   $perm = $paste_author == $session->user_id ? 'delete_paste_own' : 'delete_paste_others';
   532   if ( isset($_GET['delete']) && !isset($_POST['cancel']) )
   594   if ( isset($_GET['delete']) && !isset($_POST['cancel']) )
   533   {
   595   {
   539       
   601       
   540       echo '<p>' . $lang->get('gorilla_msg_paste_deleted') . '</p>';
   602       echo '<p>' . $lang->get('gorilla_msg_paste_deleted') . '</p>';
   541     }
   603     }
   542     else
   604     else
   543     {
   605     {
   544       $submit_url = makeUrlNS('Paste', $paste_id, 'delete&hash=' . hmac_sha1($paste_id, sha1($paste_text)), true);
   606       $submit_url = makeUrlNS('Paste', $paste_id, 'delete&hash=' . gorilla_sign($paste_id, $paste_text), true);
   545       ?>
   607       ?>
   546       <form action="<?php echo $submit_url; ?>" method="post">
   608       <form action="<?php echo $submit_url; ?>" method="post">
   547         <p><?php echo $lang->get('gorilla_msg_delete_confirm'); ?></p>
   609         <p><?php echo $lang->get('gorilla_msg_delete_confirm'); ?></p>
   548         <p>
   610         <p>
   549           <input type="submit" value="<?php echo $lang->get('gorilla_btn_delete_confirm'); ?>" name="delete_confirm" style="font-weight: bold;" />
   611           <input type="submit" value="<?php echo $lang->get('gorilla_btn_delete_confirm'); ?>" name="delete_confirm" style="font-weight: bold;" />
   570   $date = enano_date('D, j M Y H:i:s', $paste_timestamp);
   632   $date = enano_date('D, j M Y H:i:s', $paste_timestamp);
   571   $pasteinfo = $lang->get('gorilla_msg_paste_info', array('user_link' => $user_link, 'date' => $date));
   633   $pasteinfo = $lang->get('gorilla_msg_paste_info', array('user_link' => $user_link, 'date' => $date));
   572   
   634   
   573   echo '<div class="mdg-infobox" style="margin: 10px 0;">';
   635   echo '<div class="mdg-infobox" style="margin: 10px 0;">';
   574   echo '<div style="float: right;">
   636   echo '<div style="float: right;">
   575           ' . $lang->get('gorilla_msg_other_formats', array('plain_link' => makeUrlNS('Paste', $paste_id, 'format=text', true), 'download_link' => makeUrlNS('Paste', $paste_id, 'format=download', true))) . '
   637           ' . $lang->get('gorilla_msg_other_formats', array('plain_link' => makeUrlNS('Paste', $paste_id, 'format=text' .  ( $localhash ? "&hash=$localhash" : '' ), true), 'download_link' => makeUrlNS('Paste', $paste_id, 'format=download' .  ( $localhash ? "&hash=$localhash" : '' ), true))) . '
   576           /
   638           /
   577           <a title="' . $lang->get('gorilla_tip_new_paste') . '" href="' . makeUrlNS('Special', 'NewPaste') . '">' . $lang->get('gorilla_btn_new_paste') . '</a>
   639           <a title="' . $lang->get('gorilla_tip_new_paste') . '" href="' . makeUrlNS('Special', 'NewPaste') . '">' . $lang->get('gorilla_btn_new_paste') . '</a>
   578           /
   640           /
   579           <a title="' . $lang->get('gorilla_tip_copy_from_this') . '" href="' . makeUrlNS('Special', 'NewPaste/Copy=' . $paste_id) . '">' . $lang->get('gorilla_btn_copy_from_this') . '</a>';
   641           <a title="' . $lang->get('gorilla_tip_copy_from_this') . '" href="' . makeUrlNS('Special', 'NewPaste/Copy=' . $paste_id, ( $paste_flags & PASTE_PRIVATE ? 'hash=' . gorilla_sign($paste_id, $paste_text) : false ), true) . '">' . $lang->get('gorilla_btn_copy_from_this') . '</a>';
       
   642           
       
   643   if ( $paste_parent )
       
   644   {
       
   645     // pull flags of parent
       
   646     $q = $db->sql_query('SELECT paste_text, paste_flags FROM ' . table_prefix . "pastes WHERE paste_id = $paste_parent;");
       
   647     if ( !$q )
       
   648       $db->_die();
       
   649     
       
   650     if ( $db->numrows() > 0 )
       
   651     {
       
   652       list($parent_text, $parent_flags) = $db->fetchrow_num();
       
   653       $parenthash = false;
       
   654       if ( $parent_flags & PASTE_PRIVATE )
       
   655       {
       
   656         $parenthash = gorilla_sign($paste_parent, $parent_text);
       
   657       }
       
   658       
       
   659       echo ' / ' . $lang->get('gorilla_msg_reply_to', array(
       
   660           'parent_link' => makeUrlNS('Paste', $paste_parent, ( $parenthash ? "hash=$parenthash" : '' ), true),
       
   661           'diff_link' => makeUrlNS('Paste', $paste_id, 'diff_parent' .  ( $localhash ? "&hash=$localhash" : '' ), true),
       
   662           'parent_id' => $paste_parent
       
   663         ));
       
   664     }
       
   665     $db->free_result($q);
       
   666   }
   580           
   667           
   581   if ( $perms->get_permissions($perm) && $session->user_logged_in )
   668   if ( $perms->get_permissions($perm) && $session->user_logged_in )
   582   {
   669   {
   583     echo ' / <a title="' . $lang->get('gorilla_tip_delete') . '" href="' . makeUrlNS('Paste', $paste_id, 'delete&hash=' . hmac_sha1($paste_id, sha1($paste_text)), true) . '">' . $lang->get('gorilla_btn_delete') . '</a>';
   670     echo ' / <a title="' . $lang->get('gorilla_tip_delete') . '" href="' . makeUrlNS('Paste', $paste_id, 'delete&hash=' . gorilla_sign($paste_id, $paste_text), true) . '">' . $lang->get('gorilla_btn_delete') . '</a>';
   584   }
   671   }
   585   if ( $perms->get_permissions('mod_misc') )
   672   if ( $perms->get_permissions('mod_misc') )
   586   {
   673   {
   587     echo ' / <span title="' . $lang->get('gorilla_tip_paste_ip') . '">' . $paste_author_ip . '</span>';
   674     echo ' / <span title="' . $lang->get('gorilla_tip_paste_ip') . '">' . $paste_author_ip . '</span>';
   588   }
   675   }
   589   
   676   
   590   echo '</div>';
   677   echo '</div>';
   591   echo $pasteinfo;
   678   echo $pasteinfo;
   592   echo '</div>';
   679   echo '</div>';
       
   680   
       
   681   if ( isset($_GET['diff_parent']) && isset($parent_text) )
       
   682   {
       
   683     echo '<p>' . $lang->get('gorilla_btn_view_normal', array('orig_url' => makeUrlNS('Paste', $paste_id, ( $localhash ? "hash=$localhash" : '' ), true))) . '</p>';
       
   684     // convert to unix newlines to avoid confusing the diff engine (seen on Chromium on Linux)
       
   685     echo RenderMan::diff(str_replace("\r\n", "\n", $parent_text), str_replace("\r\n", "\n", $paste_text));
       
   686     $output->footer();
       
   687     return;
       
   688   }
   593   
   689   
   594   if ( preg_match('/^## /m', $paste_text) )
   690   if ( preg_match('/^## /m', $paste_text) )
   595   {
   691   {
   596     gorilla_show_text_multi($paste_text, $paste_language);
   692     gorilla_show_text_multi($paste_text, $paste_language);
   597   }
   693   }
   633 }
   729 }
   634 
   730 
   635 function gorilla_show_text_multi($text, $lang)
   731 function gorilla_show_text_multi($text, $lang)
   636 {
   732 {
   637   $sections = preg_split('/^## .*$/m', $text);
   733   $sections = preg_split('/^## .*$/m', $text);
   638   $headingcount = preg_match_all('/^## (.+?)(?: \[([a-z_-]+)\])? *$/m', $text, $matches);
   734   $headingcount = preg_match_all('/^## (.+?)(?: \[([a-z_-]+)\])? *\r?$/m', $text, $matches);
   639   
   735   
   640   // if we have one heading less than the number of sections, print the first section
   736   // if we have one heading less than the number of sections, print the first section
   641   while ( count($sections) > $headingcount )
   737   while ( count($sections) > $headingcount )
   642   {
   738   {
   643     gorilla_show_text(trim($sections[0], "\r\n"), $lang);
   739     gorilla_show_text(trim($sections[0], "\r\n"), $lang);
   650   {
   746   {
   651     $clang = !empty($matches[2][$i]) ? $matches[2][$i] : $lang;
   747     $clang = !empty($matches[2][$i]) ? $matches[2][$i] : $lang;
   652     echo '<h2>' . htmlspecialchars(trim($matches[1][$i])) . '</h2>';
   748     echo '<h2>' . htmlspecialchars(trim($matches[1][$i])) . '</h2>';
   653     gorilla_show_text(trim($sections[$i], "\r\n"), $clang);
   749     gorilla_show_text(trim($sections[$i], "\r\n"), $clang);
   654   }
   750   }
       
   751 }
       
   752 
       
   753 function gorilla_sign($id, $text)
       
   754 {
       
   755   return hmac_sha1($id, sha1($text));
   655 }
   756 }
   656 
   757 
   657 // make sure pastes are pruned on a regular basis
   758 // make sure pastes are pruned on a regular basis
   658 function gorilla_prune_expired()
   759 function gorilla_prune_expired()
   659 {
   760 {
   675   paste_author_ip varchar(39) NOT NULL,
   776   paste_author_ip varchar(39) NOT NULL,
   676   paste_language varchar(32) NOT NULL DEFAULT 'plaintext',
   777   paste_language varchar(32) NOT NULL DEFAULT 'plaintext',
   677   paste_timestamp int(12) NOT NULL DEFAULT 0,
   778   paste_timestamp int(12) NOT NULL DEFAULT 0,
   678   paste_ttl int(12) NOT NULL DEFAULT 86400,
   779   paste_ttl int(12) NOT NULL DEFAULT 86400,
   679   paste_flags int(8) NOT NULL DEFAULT 0,
   780   paste_flags int(8) NOT NULL DEFAULT 0,
       
   781   paste_parent int(18) NOT NULL DEFAULT 0,
   680   PRIMARY KEY ( paste_id )
   782   PRIMARY KEY ( paste_id )
   681 ) ENGINE=`MyISAM` CHARSET=`UTF8` COLLATE=`utf8_bin`;
   783 ) ENGINE=`MyISAM` CHARSET=`UTF8` COLLATE=`utf8_bin`;
   682 
   784 
       
   785 **!*/
       
   786 
       
   787 /**!upgrade from="0.1"; to="0.1.1"; dbms="mysql"; **
       
   788 ALTER TABLE {{TABLE_PREFIX}}pastes ADD COLUMN paste_parent int(18) NOT NULL DEFAULT 0;
   683 **!*/
   789 **!*/
   684 
   790 
   685 /**!uninstall **
   791 /**!uninstall **
   686 DROP TABLE {{TABLE_PREFIX}}pastes;
   792 DROP TABLE {{TABLE_PREFIX}}pastes;
   687 **!*/
   793 **!*/
   714         lbl_ttl: 'Keep it for:',
   820         lbl_ttl: 'Keep it for:',
   715         lbl_ttl_hour: '1 hour',
   821         lbl_ttl_hour: '1 hour',
   716         lbl_ttl_day: '1 day',
   822         lbl_ttl_day: '1 day',
   717         lbl_ttl_month: '1 month',
   823         lbl_ttl_month: '1 month',
   718         lbl_ttl_forever: 'forever',
   824         lbl_ttl_forever: 'forever',
       
   825         lbl_reply: 'Reply to paste: #',
   719         msg_will_prompt_for_login: 'You are not logged in. You will be asked to log in when you click the submit button below.',
   826         msg_will_prompt_for_login: 'You are not logged in. You will be asked to log in when you click the submit button below.',
   720         btn_submit: 'Paste it!',
   827         btn_submit: 'Paste it!',
   721         
   828         
   722         msg_created: 'Paste created.',
   829         msg_created: 'Paste created.',
   723         msg_paste_url: 'Share this paste using the following URL:',
   830         msg_paste_url: 'Share this paste using the following URL:',
   734         btn_copy_from_this: 'cp',
   841         btn_copy_from_this: 'cp',
   735         tip_copy_from_this: 'Create a new paste, copying this one into the form',
   842         tip_copy_from_this: 'Create a new paste, copying this one into the form',
   736         btn_delete: 'rm',
   843         btn_delete: 'rm',
   737         tip_delete: 'Delete this paste',
   844         tip_delete: 'Delete this paste',
   738         tip_paste_ip: 'IP address of paste author',
   845         tip_paste_ip: 'IP address of paste author',
       
   846         msg_reply_to: 'parent: <a href="%parent_link%">#%parent_id%</a> (<a href="%diff_link%">diff</a>)',
       
   847         btn_view_normal: '<b>Difference from parent</b> (<a href="%orig_url%">back to paste</a>)',
   739         template_ns_string: 'paste',
   848         template_ns_string: 'paste',
   740         
   849         
   741         msg_paste_deleted: 'Paste deleted.',
   850         msg_paste_deleted: 'Paste deleted.',
   742         msg_delete_confirm: 'Really delete this paste?',
   851         msg_delete_confirm: 'Really delete this paste?',
   743         btn_delete_confirm: 'Delete',
   852         btn_delete_confirm: 'Delete',