Question about post...
 
Notifications
Clear all

Question about posting by copy and paste [solved]

5 Posts
2 Users
0 Reactions
1,099 Views
(@guest6310)
Posts: 0
 

Hi, this isn't a problem or an error. Just a quick question.

I was wondering if it is possible to turn off the option of posting stories by copying and pasting and only allow users to post by uploading? If this is possible, how can this be done?


 
Posted : 11/03/2009 12:37 am
(@guest1448)
Posts: 0
 

Hmm, not sure, but you could try to open includes/storyform.php and place a readonly option in every textarea labeled with "storytext".

HTH
Steffen


 
Posted : 11/03/2009 5:04 am
(@becca)
Posts: 553
Honorable Member
 

Do you have TinyMCE enabled? If so, you can try adding the following to your configuration in your admin panel.

     tinyMCE.init({
      mode : "textareas",
      theme : "simple",
      setup : function(ed) { ed.onPaste.add( function(ed, e, o) {
              return tinymce.dom.Event.cancel(e);
            } );
      }
      });

-Source
That will atleast for the context menu of when you right click and paste.
You could also disable the buttons for copy and paste.


 
Posted : 11/03/2009 8:26 am
(@guest6310)
Posts: 0
 

I tried doing what you said, Becca, and it did disable copying and pasting text. πŸ™‚

I was actually hoping to completely get rid of that part of the form altogether (but I don't know very much about php so I didn't want to mess up the script by deleting parts). My main concern was that users would actually write their story in that Story Text box (thus not getting someone to beta their story and all that). So even though copying and pasting is now disabled... they can still type the text in there =/   Oh well, that's ok! I'll leave it with copying and pasting disabled for now so maybe it will push them towards just uploading their story lol. Thanks!

EDIT:

I decided to be brave and messed with the storyform.php that Steffen mentioned and I managed to completely remove the Story Text area so now it goes from Chapter Notes to Story Text (file). This is what I removed


<label for="storytext">"._STORYTEXTTEXT.":</label>".(!$storytext ? "<span style="font-weight: bold; color: red">*</span>" : "")."<br><textarea class="textbox" rows="15" id="storytext" name="storytext" cols="58">".$storytext."</textarea></div>";
if($tinyMCE)
$output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick="toogleEditorMode('storytext');" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
$output .= "<p><strong>"._OR."</strong> </p>

I do get an errors when I try to add a story as an admin (though, despite the errors, the story appears perfectly on the site anyway) but members do not get an error. I have no clue why admins would get an error and members would not, but there is only one admin on the site (me) so its no problem. Thanks for all your help πŸ™‚


 
Posted : 11/03/2009 3:11 pm
(@becca)
Posts: 553
Honorable Member
 

Just for future reference I don't know if you removed the actual lines of coding themselves, but what you could do is leave the lines there if something goes wrong and just 'comment' them out so that the script does not read them. They'll still be there just in case, but the script won't use them.

So it would be:


/*
<label for="storytext">"._STORYTEXTTEXT.":</label>".(!$storytext ? "<span style="font-weight: bold; color: red">*</span>" : "")."<br><textarea class="textbox" rows="15" id="storytext" name="storytext" cols="58">".$storytext."</textarea></div>";
if($tinyMCE)
$output .= "<div class='tinytoggle'><input type='checkbox' name='toggle' onclick="toogleEditorMode('storytext');" checked><label for='toggle'>"._TINYMCETOGGLE."</label></div>";
$output .= "<p><strong>"._OR."</strong> </p>
*/

Hope this helps, glad it seems to have gotten it solved.


 
Posted : 11/03/2009 5:53 pm
Share: