b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: admin ] [ index: admin ] [ all elements ]

Source for file tools.php

Documentation is available at tools.php

  1. <?php
  2. /**
  3.  * Tools
  4.  *
  5.  * b2evolution - {@link http://b2evolution.net/}
  6.  * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  7.  * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  8.  *
  9.  * @package admin
  10.  * @author This file built upon code from original b2 - http://cafelog.com/
  11.  */
  12.  
  13. /**
  14.  * Includes:
  15.  */
  16. require_oncedirname(__FILE__).'/_header.php' )// this will actually load blog params for req blog
  17. $admin_tab 'tools';
  18. $admin_pagetitle T_('Tools');
  19. requiredirname(__FILE__).'/_menutop.php' );
  20. requiredirname(__FILE__).'/_menutop_end.php' );
  21. ?>
  22.  
  23. <div class="panelblock">
  24.     <h2><?php echo T_('Bookmarklet'?></h2>
  25.  
  26.     <?php
  27.     if($is_NS4 || $is_gecko)
  28.     {
  29.         ?>
  30.         <p><?php echo T_('Add this link to your Favorites/Bookmarks:'?><br />
  31.         <a href="javascript:Q=document.selection?document.selection.createRange().text:document.getSelection();void(window.open('<?php echo $admin_url ?>/b2bookmarklet.php?text='+escape(Q)+'&amp;popupurl='+escape(location.href)+'&amp;popuptitle='+escape(document.title),'b2evobookmarklet','scrollbars=yes,resizable=yes,width=750,height=550,left=25,top=15,status=yes'));"><?php echo T_('b2evo bookmarklet'?></a></p>
  32.         <?php
  33.     }
  34.     elseif ($is_winIE)
  35.     {
  36.         ?>
  37.         <p><?php echo T_('Add this link to your Favorites/Bookmarks:'?><br />
  38.         <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo $admin_url ?>/b2bookmarklet.php?text='+escape(Q)+'&amp;popupurl='+escape(location.href)+'&amp;popuptitle='+escape(document.title),'b2evobookmarklet','scrollbars=yes,resizable=yes,width=750,height=550,left=25,top=15,status=yes'));btw.focus();"><?php echo T_('b2evo bookmarklet'?></a>
  39.         </p>
  40.         <?php
  41.     }
  42.     elseif($is_opera)
  43.     {
  44.         ?>
  45.         <p><?php echo T_('Add this link to your Favorites/Bookmarks:'?><br />
  46.         <a href="javascript:void(window.open('<?php echo $admin_url ?>/b2bookmarklet.php?popupurl='+escape(location.href)+'&amp;popuptitle='+escape(document.title),'b2evobookmarklet','scrollbars=yes,resizable=yes,width=750,height=550,left=25,top=15,status=yes'));"><?php echo T_('b2evo bookmarklet'?></a></p>
  47.         <?php
  48.     }
  49.     elseif($is_macIE)
  50.     {
  51.         ?>
  52.         <p><?php echo T_('Add this link to your Favorites/Bookmarks:'?><br />
  53.         <a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo $admin_url ?>/b2bookmarklet.php?text='+escape(document.getSelection())+'&amp;popupurl='+escape(location.href)+'&amp;popuptitle='+escape(document.title),'b2evobookmarklet','scrollbars=yes,resizable=yes,width=750,height=550,left=25,top=15,status=yes'));btw.focus();"><?php echo T_('b2evo bookmarklet'?></a></p>
  54.         <?php
  55.     }
  56.     ?>
  57. </div>
  58.  
  59. <?php
  60.     // Sidebar:
  61.     if ($is_gecko)
  62.     {
  63.         ?>
  64.         <div class="panelblock">
  65.         <script type="text/javascript">
  66.             <!--
  67.             function addsidebar()
  68.             {
  69.                 if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
  70.                     window.sidebar.addPanel("<?php echo T_('Post to b2evolution'?>","<?php echo $admin_url ?>/b2sidebar.php","");
  71.                 else
  72.                     alert('<?php echo str_replace"'""\'"T_('No Sidebar found! You must use Mozilla 0.9.4 or later!')) ?>');
  73.             }
  74.             // -->
  75.         </script>
  76.         <h2><?php echo T_('SideBar'?></h2>
  77.         <p><?php printfT_('Add the <a %s>b2evo sidebar</a> !')'href="#" onclick="addsidebar()"' )?></p>
  78.         </div>
  79.         <?php
  80.     }
  81.     elseif($is_winIE || $is_macIE)
  82.     {
  83.         ?>
  84.         <div class="panelblock">
  85.             <h2><?php echo T_('SideBar'?></h2>
  86.             <p><?php echo T_('Add this link to your favorites:'?><br />
  87.             <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(_search=open('<?php echo $admin_url ?>/b2sidebar.php?popuptitle='+escape(document.title)+'&amp;popupurl='+escape(location.href)+'&amp;text='+escape(Q),'_search'))"><?php echo T_('b2evo sidebar'?></a></p>
  88.         </div>
  89.         <?php
  90.     }
  91.     ?>
  92.  
  93. <div class="panelblock">
  94.     <h2><?php echo T_('Movable Type Import'?></h2>
  95.     <ol>
  96.         <li><?php echo T_('Use MT\'s export functionnality to create a .TXT file containing your posts;'?></li>
  97.         <li><?php echo T_('Place that file into the /admin folder on your server;'?></li>
  98.         <li><?php printfT_('Follow the insctructions in the <a %s>MT migration utility</a>.')' href="import-mt.php"' ?></li>
  99.     </ol>
  100. </div>
  101.  
  102. <?php
  103. requiredirname(__FILE__)'/_footer.php' );
  104. ?>

Documentation generated on Tue, 20 May 2008 01:52:02 +0200 by phpDocumentor 1.4.2