Ejemplo n.º 1
0
<?php
// Bootstrap drupal
require_once('config.php');
$mce_path = wysiwyg_get_path('tinymce') . '/jscripts/tiny_mce';
$inner_path = str_replace("/", "\/", drupal_get_path('module', 'glossy_helper_plugins'));
global $base_url;
$base_url = preg_replace('/(' . $inner_path . '.*)/i', '', $base_url);
?>

<!DOCTYPE html>
<html lang="en">
	<head>
		<title><?php print 'Dropletz' . t('Shortcode'); ?></title>
		<meta charset="utf-8">
		<meta http-equiv="cache-control" content="no-cache" />
		<script language="javascript" type="text/javascript" src="<?php print $base_url; ?>/misc/jquery.js"></script>
		<script language="javascript" type="text/javascript" src="<?php print $base_url . $mce_path; ?>/tiny_mce.js"></script>
		<script language="javascript" type="text/javascript" src="<?php print $base_url . $mce_path; ?>/tiny_mce_popup.js"></script>
		<script language="javascript" type="text/javascript" src="<?php print $base_url . $mce_path; ?>/utils/mctabs.js"></script>
		<script language="javascript" type="text/javascript" src="<?php print $base_url . $mce_path; ?>/utils/form_utils.js"></script>
		<script language="javascript" type="text/javascript" src="js/dialog.js"></script>
	</head>
	<body id="link" onload="" style="display: none">

	<form onsubmit="shortcodeDialog.insert();return false;" action="#">
		<div class="tabs">
			<ul>
				<li id="style_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('style_tab','style_panel');" onmousedown="return false;"><?php print t('Styles'); ?></a></span></li>
			</ul>
		</div>
		
Ejemplo n.º 2
0
print $language->language;
?>
">
<head>
	<title>Choose Content To Insert</title>
	<?php 
print $head;
?>
	<?php 
print $styles;
?>
	<?php 
print $scripts;
?>
	<script type="text/javascript" src="<?php 
echo wysiwyg_get_path('tinymce', $base_path);
?>
/jscripts/tiny_mce/tiny_mce_popup.js"></script>

	<script type="text/javascript">
	$(document).ready(function() {
		$('a.tinymce_linkpicker').click(function(){
			var title = $(this).html();
			var href = tinyMCE.activeEditor.documentBaseURI.getURI() + 'node/' + $(this).attr('name');
			var insertText = ' <a href="' + href + '" title="' + title + '">' + title + '</a> ';
	
			tinyMCE.execCommand("mceInsertContent", false, insertText);
			tinyMCEPopup.close();
			return false;
		});
	});