Res facta quae tamen fingi potuit (pauamma) wrote in lj_dev,
Res facta quae tamen fingi potuit
pauamma
lj_dev

Stripping the entry form

Patch synopsis:
- Strip Embed Media text from entry form into new itemcode entryform.insert.embedmedia
- Move <a...> and </a> from string and into BML code, so the item can be used in FAQs (deadphrase entryform.plainswitch2, add entryform.plainswitch3)

If you try it, let me know if you run into any problems. If you need the patch as a plain text file, let me know.


--- livejournal/cgi-bin/weblib.pl.rev13554      Mon Feb 18 13:20:01 2008
+++ livejournal/cgi-bin/weblib.pl       Mon Feb 18 14:45:19 2008
@@ -1250,7 +1250,7 @@
                                 'disabled' => $opts->{'disabled_save'}}) . "\n";
         $out .= "<ul id='entry-tabs' style='display: none;'>\n";
         $out .= "<li id='jrich'>" . BML::ml("entryform.htmlokay.rich4", { 'opts' => 'href="javascript:void(0);" onclick="return useRichText(\'draft\', \'' . $LJ::WSTATPREFIX. '\');"' })  . "</li>\n";
-        $out .= "<li id='jplain' class='on'>" . BML::ml("entryform.plainswitch2", { 'aopts' => 'href="javascript:void(0);" onclick="return usePlainText(\'draft\');"' }) . "</li>\n";
+        $out .= "<li id='jplain' class='on'><a href='javascript:void(0);' onclick='return usePlainText(\'draft\');'>" . BML::ml("entryform.plainswitch3") . "</a></li>\n";
         $out .= "</ul>";
         $out .= "</div><!-- end #entry -->\n\n";
         $$onload .= " showEntryTabs();";
@@ -1271,8 +1271,9 @@
     $out .= "<ul class='pkg'>\n";
     $out .= "<li class='image'><a href='javascript:void(0);' onclick='InOb.handleInsertImage();' title='"
         . BML::ml('fckland.ljimage') . "'>" . BML::ml('entryform.insert.image2') . "</a></li>\n";
-    $out .= "<li class='media'><a href='javascript:void(0);' onclick='InOb.handleInsertEmbed();' title='Embed Media'>"
-        . "Embed Media</a></li>\n" unless $LJ::DISABLED{embed_module};
+    my $embedmedia = BML::ml('entryform.insert.embedmedia');
+    $out .= "<li class='media'><a href='javascript:void(0);' onclick='InOb.handleInsertEmbed();' title='$embedmedia'>"
+        . "$embedmedia</a></li>\n" unless $LJ::DISABLED{embed_module};
     $out .= "</ul>\n";
     my $format_selected = $opts->{'prop_opt_preformatted'} || $opts->{'event_format'} ? "checked='checked'" : "";
     $out .= "<span id='linebreaks'><input type='checkbox' class='check' value='preformatted' name='event_format' id='event_format' $format_selected  />
--- livejournal/bin/upgrading/en.dat.rev13541   Mon Feb 18 13:16:31 2008
+++ livejournal/bin/upgrading/en.dat    Mon Feb 18 15:00:44 2008
@@ -1047,6 +1047,8 @@
 
 entryform.htmlokay.rte_nosupport=rte_nosupport=(Sorry, your browser does not currently support the rich text environment.)
 
+entryform.insert.embedmedia=Embed Media
+
 entryform.insert.header=Insert...
 
 entryform.insert.image=Image
@@ -1071,7 +1073,8 @@
 
 entryform.plainswitch=(Use the 'Source' button to edit HTML.  You also can <a [[aopts]]>switch</a> back to the plain text mode.)
 
-entryform.plainswitch2=<a [[aopts]]>HTML</a>
+entryform.plainswitch3|notes=entryform.plainswitch2 with the <a>...</a> removed
+entryform.plainswitch3=HTML
 
 entryform.postas=Post as:
 
--- livejournal/bin/upgrading/deadphrases.dat.rev13537  Mon Feb 18 13:15:49 2008
+++ livejournal/bin/upgrading/deadphrases.dat   Mon Feb 18 14:47:55 2008
@@ -64,6 +64,7 @@
 
 entryform.htmlokay.norich
 entryform.htmlokay.rich
+general entryform.plainswitch2
 general editform.userpics
 
 general /friends/add.bml.colors.hover

Tags: server, server: patch
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments