Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-22-2007, 04:12 AM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
Smile [MOD] TinyMCE editor for Story Submission at Step 2

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..
Reply With Quote
The Following 11 Users Say Thank You to dollars5 For This Useful Post:
  #2 (permalink)  
Old 03-22-2007, 08:25 AM
jitgos's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: Indiana (soon New Hampshire)
Posts: 339
Thanks: 94
Thanked 49 Times in 38 Posts
That's great! Thanks.
Reply With Quote
  #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,547
Thanks: 254
Thanked 649 Times in 513 Posts
Cool. I'll get tis up and running and see what we can do about adding it to Pligg.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #4 (permalink)  
Old 03-24-2007, 02:20 AM
New Pligger
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
how cna i embed Youtube video within tiny MCE?

i am runnign a module of pligg 9.1 which supports videos
Reply With Quote
  #5 (permalink)  
Old 03-24-2007, 03:35 AM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
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.
Reply With Quote
  #6 (permalink)  
Old 03-24-2007, 04:56 AM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,399
Thanks: 171
Thanked 439 Times in 278 Posts
dollars5

I tested this out and it works pretty well.
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
The Following User Says Thank You to chuckroast For This Useful Post:
  #7 (permalink)  
Old 03-24-2007, 06:20 AM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
Thanks for reporting Chuck. btw - did you try the video (flash) embed?
Reply With Quote
  #8 (permalink)  
Old 03-24-2007, 11:00 PM
Casual Pligger
 
Join Date: Jul 2006
Posts: 73
Thanks: 2
Thanked 2 Times in 1 Post
thanks, very nice

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?
Reply With Quote
  #9 (permalink)  
Old 03-25-2007, 06:44 AM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
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.
Reply With Quote
  #10 (permalink)  
Old 04-10-2007, 05:59 AM
Casual Pligger
 
Join Date: Jan 2007
Posts: 34
Thanks: 9
Thanked 0 Times in 0 Posts
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é
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
how to delete the summary field in step 2 of submission ivytony General Help 1 02-14-2008 02:26 PM
Warning messages in the 3rd step of submission - Please help PurpleCow General Help 12 10-02-2007 09:27 PM
"Confirm" message box when trying to modify submission in Step 3 nothingman General Help 0 09-22-2007 05:53 PM
Step 2 Submission Formatting Problem csakon General Help 0 04-15-2007 10:05 PM
Pligg step 3 of 3 submission error xur17 Installation and Upgrade Help 1 04-20-2006 07:22 PM


Search Engine Friendly URLs by vBSEO 3.2.0