View Single Post
  #1 (permalink)  
Old 03-22-2007, 04:12 AM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
The following mod will outline how ti integrate tinyMCE with Pligg Story submission step 2. This will be useful for sites which focus on editorial content rather than news submissions.



Steps:
1] copy files tiny_mce to /3rdParty folder (if you chose to get files from the tinyMCE main site then please copy only the folder tiny_mce under /tinymce/jscripts/ to 3rdParty in Pligg base)

2] Enable HTML in submit from admin panel to include the following tags
Code:
<br><font><img><p><a><strong><ul><li><ol><u><em><span><pre><h1><h2><h3><hr><embed>
3] Edit Pligg.tpl to have the following lines after the
Code:
{checkForJs}
Code:
{if $pagename eq "submit"}
		<script language="javascript" type="text/javascript" src="{$my_pligg_base}/3rdparty/tiny_mce/tiny_mce.js"></script>
	{/if}
4] Edit submit_step_2.tpl to have the following lines after
Code:
{config_load file="/libs/lang.conf"}
add
Code:
{literal}
	<script language="javascript" type="text/javascript">
		tinyMCE.init({
			mode : "exact",
			elements : "bodytext",
			theme : "advanced",
			plugins : "advimage,advlink,emotions,iespell,insertdatetime,preview,media,visualchars,xhtmlxtras",
			theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,insertdate,inserttime,|,forecolor,backcolor,|,hr,removeformat,formatselect",
			theme_advanced_buttons2 : "link,unlink,image,media,|,undo,redo,cleanup,|,code,preview",
			theme_advanced_buttons3 : "",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_path_location : "bottom",
			extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
			browsers : "msie,gecko,opera,safari"
		});
	</script>
{/literal}
I have not tested it fully, only basic testing has been done.

Last edited by dollars5; 07-05-2007 at 11:46 PM.