[MOD] TinyMCE editor for Story Submission at Step 2

Register an Account
Pligg Chat Room
Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-22-2007, 04:12 AM
dollars5's Avatar
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.
  #2 (permalink)  
Old 03-22-2007, 08:25 AM
jitgos's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: Indiana (soon New Hampshire)
Posts: 315
That's great! Thanks.
  #3 (permalink)  
Old 03-22-2007, 09:25 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
Cool. I'll get tis up and running and see what we can do about adding it to Pligg.
  #4 (permalink)  
Old 03-24-2007, 02:20 AM
New Pligger
 
Join Date: Jan 2007
Posts: 1
how cna i embed Youtube video within tiny MCE?

i am runnign a module of pligg 9.1 which supports videos
  #5 (permalink)  
Old 03-24-2007, 03:35 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
I have not tested but you can try the embed video (a flimstrip icon) in this tinyMCE toolbar to see how it helps - again - that part is untested.

This really is a simplest mod - just only few lines of code from what I have seen on Wordpress and I did it quick so no much testing went through.

If any one interested to improve it - pls do let know know how you have improved in here that would really be nice.

And for mod writters - the TinyMCE comes with a kewl spellchecker - if any one wants to play around with it that would be really good.
  #6 (permalink)  
Old 03-24-2007, 04:56 AM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Galleria
 
Join Date: Jun 2006
Posts: 3,832
dollars5

I tested this out and it works pretty well.


Download the full Pligg Module Pack





  #7 (permalink)  
Old 03-24-2007, 06:20 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
Thanks for reporting Chuck. btw - did you try the video (flash) embed?
  #8 (permalink)  
Old 03-24-2007, 11:00 PM
Casual Pligger
 
Join Date: Jul 2006
Posts: 60
i've actually got a lot of editorial going into my site...but one question: in the admin panel where one adds html tags, it is not staying in the yget template - rather it cuts the line off (usually first four or five in the list, like a maximum characters issue)

any thoughts on why this is happening?
  #9 (permalink)  
Old 03-25-2007, 06:44 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
Tested with yget - but could not confirm the above issue, may be you should try the latest nightly from svn, where this might have been an issue and probably fixed.
  #10 (permalink)  
Old 04-10-2007, 05:59 AM
Casual Pligger
 
Join Date: Jan 2007
Posts: 30
I have now TinyMCE editor in my Pligg.
As my site is in portuguese, I downloaded the portuguese version. Now I have both versions.
Here is the problem: I can't make as default the portuguese version.
Can you help me, please?
Thank you.

José
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning messages in the 3rd step of submission - Please help PurpleCow Questions and Comments 12 10-02-2007 09:27 PM
"Confirm" message box when trying to modify submission in Step 3 nothingman Questions and Comments 0 09-22-2007 05:53 PM
[SOLVED] how to make url submission as not a mandatory step sharatthakur Questions and Comments 2 07-02-2007 12:36 PM
Step 2 Submission Formatting Problem csakon Questions and Comments 0 04-15-2007 10:05 PM
Pligg step 3 of 3 submission error xur17 Questions and Comments 1 04-20-2006 07:22 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development