File: tools.php

package info (click to toggle)
b2evolution 0.9.2-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 12,972 kB
  • ctags: 5,460
  • sloc: php: 58,989; sh: 298; makefile: 36
file content (104 lines) | stat: -rw-r--r-- 4,427 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
/**
 * Tools
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
 * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @package admin
 * @author This file built upon code from original b2 - http://cafelog.com/
 */

/**
 * Includes:
 */
require_once( dirname(__FILE__).'/_header.php' ); // this will actually load blog params for req blog
$admin_tab = 'tools';
$admin_pagetitle = T_('Tools');
require( dirname(__FILE__).'/_menutop.php' );
require( dirname(__FILE__).'/_menutop_end.php' );
?>

<div class="panelblock">
	<h2><?php echo T_('Bookmarklet') ?></h2>

	<?php
	if($is_NS4 || $is_gecko)
	{
		?>
		<p><?php echo T_('Add this link to your Favorites/Bookmarks:') ?><br />
		<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>
		<?php
	}
	elseif ($is_winIE)
	{
		?>
		<p><?php echo T_('Add this link to your Favorites/Bookmarks:') ?><br />
		<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>
		</p>
		<?php
	}
	elseif($is_opera)
	{
		?>
		<p><?php echo T_('Add this link to your Favorites/Bookmarks:') ?><br />
		<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>
		<?php
	}
	elseif($is_macIE)
	{
		?>
		<p><?php echo T_('Add this link to your Favorites/Bookmarks:') ?><br />
		<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>
		<?php
	}
	?>
</div>

<?php
	// Sidebar:
	if ($is_gecko)
	{
		?>
		<div class="panelblock">
		<script type="text/javascript">
			<!--
			function addsidebar()
			{
				if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
					window.sidebar.addPanel("<?php echo T_('Post to b2evolution') ?>","<?php echo $admin_url ?>/b2sidebar.php","");
				else
					alert('<?php echo str_replace( "'", "\'", T_('No Sidebar found! You must use Mozilla 0.9.4 or later!')) ?>');
			}
			// -->
		</script>
		<h2><?php echo T_('SideBar') ?></h2>
		<p><?php printf( T_('Add the <a %s>b2evo sidebar</a> !'), 'href="#" onclick="addsidebar()"' ); ?></p>
		</div>
		<?php
	}
	elseif($is_winIE || $is_macIE)
	{
		?>
		<div class="panelblock">
			<h2><?php echo T_('SideBar') ?></h2>
			<p><?php echo T_('Add this link to your favorites:') ?><br />
			<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>
		</div>
		<?php
	}
	?>

<div class="panelblock">
	<h2><?php echo T_('Movable Type Import') ?></h2>
	<ol>
		<li><?php echo T_('Use MT\'s export functionnality to create a .TXT file containing your posts;') ?></li>
		<li><?php echo T_('Place that file into the /admin folder on your server;') ?></li>
		<li><?php printf( T_('Follow the insctructions in the <a %s>MT migration utility</a>.'), ' href="import-mt.php"' ) ?></li>
	</ol>
</div>

<?php
require( dirname(__FILE__). '/_footer.php' );
?>