Announcement

Collapse
No announcement yet.

how to disable "Retrieve remote file and reference locally"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Answered] how to disable "Retrieve remote file and reference locally"

    Hello in this post u will see some members like me want to disable this option "Retrieve remote file and reference locally" in wysiwyg editor without disable attachments at all


    http://www.vbulletin.com/forum/proje...?issueid=34204


    the good way to do that in page 2 from Mr. Michael Henretty


    and this is the solution


    Originally posted by Michael Henretty
    If I understand you correctly, you want only the "From URL" option. Is that correct?

    Ok, here is a fix for you:

    [forum-path]/clientscripts/vbulletin_textedit.js

    around line 1720, look for
    Code:
    /**
    * Insert Image
    *
    * @param    event    Event object
    *
    * @return    boolean
    */
    vB_Text_Editor.prototype.insertimage = function(e, forceoldway)
    {
        if (this.wysiwyg_mode && typeof(vBulletin.attachinfo) !=  "undefined" && typeof(vBulletin.attachinfo.contenttypeid) !=  "undefined" && vBulletin.attachinfo.contenttypeid != 0  && typeof(forceoldway) == "undefined")
        {
    add to the "if" false &&, so that it looks like this:
    Code:
    if (false && this.wysiwyg_mode &&  typeof(vBulletin.attachinfo) != "undefined" &&  typeof(vBulletin.attachinfo.contenttypeid) != "undefined" &&  vBulletin.attachinfo.contenttypeid != 0 && typeof(forceoldway)  == "undefined")
    That should get rid of both the "From Computer" option, as well as the "Retrieve remote file and reference locally" option, but still allow you to upload attachments using the attachment manager.



    just after edit the file mak sure u refresh ur forum page and try to insert image using wysiwyg editor

  • #2
    Currently, we are taking it under consideration to add an admin option to be able to disable the new image uploader (so that only the old javascript pop-up comes up). The problem is, we are not sure how many users want this option. So please, if you are reading this thread and would find such an option useful, respond here and let us know.

    The option would still allow users to upload images from a website and store them locally using the attachment manager. But it would force the "Insert Image" button to only allow external URL image references (like 3.x).

    So what do you think?

    Comment


    • #3
      I want that too!
      It is better to have option in ACP to allow or disable that, than not have option at all.

      Many people don't want to have big backup (database, or files) because people like to upload pictures in post

      Comment


      • #4
        Originally posted by Sunka View Post
        Many people don't want to have big backup (database, or files) because people like to upload pictures in post
        Please keep in mind that this option will not prevent users from from uploading pictures to posts since they will still be able to do so with the regular attachment manager. This option would only affect the "Insert Image" dialog, in that it would no longer offer the "From Computer" tab, or the "Retrieve remote file and reference locally" check-box.

        Also, if you wanted to prevent users from uploading images to the server completely (not just posts) there are already global and usergroup permissions to do this.

        Comment


        • #5
          Originally posted by extra pc View Post
          Hello in this post u will see some members like me want to disable this option "Retrieve remote file and reference locally" in wysiwyg editor without disable attachments at all


          http://www.vbulletin.com/forum/proje...?issueid=34204


          the good way to do that in page 2 from Mr. Michael Henretty


          and this is the solution







          just after edit the file mak sure u refresh ur forum page and try to insert image using wysiwyg editor
          I tried that and it doesn't work.

          Click image for larger version

Name:	1..jpg
Views:	1
Size:	90.2 KB
ID:	3678210
          www.highperformancestangs.com

          Comment


          • #6
            Originally posted by burntire View Post
            I tried that and it doesn't work.
            Hmmm, did you try clearing your browser cache?

            Comment


            • #7
              Yes and a Ctrl-F5


              Code:
              if (false && this.wysiwyg_mode && typeof(vBulletin.attachinfo) != "undefined" && typeof(vBulletin.attachinfo.contenttypeid) != "undefined" && vBulletin.attachinfo.contenttypeid != 0 && typeof(forceoldway) == "undefined")
              www.highperformancestangs.com

              Comment


              • #8
                Originally posted by burntire View Post
                Yes and a Ctrl-F5
                Hmmm, ok. Can you try removing all the conditionals from that if statement, and just put false in there?

                So it would be something like:

                Code:
                /**
                * Insert Image
                *
                * @param    event    Event object
                *
                * @return    boolean
                */
                vB_Text_Editor.prototype.insertimage = function(e, forceoldway)
                {
                    if (false)
                    {
                ...
                ...
                    {

                Comment


                • #9
                  It is still showing the reterview from external url option. Is it tied to a template?
                  www.highperformancestangs.com

                  Comment


                  • #10
                    Originally posted by burntire View Post
                    Is it tied to a template?
                    Well, yes and no. It can make an ajax call to get that pop-up template, but we are trying to avoid that here, and instead use a regular javascript style pop-up (like in vb3).

                    Can you paste the code you have for that entire javascript function here? Mine looks like:

                    Code:
                    /**
                    * Insert Image
                    *
                    * @param	event	Event object
                    *
                    * @return	boolean
                    */
                    vB_Text_Editor.prototype.insertimage = function(e, forceoldway)
                    {
                    	if (this.wysiwyg_mode && typeof(vBulletin.attachinfo) != "undefined" && typeof(vBulletin.attachinfo.contenttypeid) != "undefined" && vBulletin.attachinfo.contenttypeid != 0 && typeof(forceoldway) == "undefined")
                    	{
                    		this.show_editor_progress();
                    
                    		YAHOO.util.Connect.asyncRequest("POST", "ajax.php?do=fetchhtml", {
                    			success: this.insertimage_ajax,
                    			failure: this.remove_editor_dialog,
                    			timeout: vB_Default_Timeout,
                    			argument: [this.editorid],
                    			scope: this
                    		}, SESSIONURL
                    			+ "&securitytoken="
                    			+ SECURITYTOKEN
                    			+ "&ajax=1"
                    			+ "&do=fetchhtml"
                    			+ "&template=editor_upload_overlay"
                    		);
                    	}
                    	else
                    	{
                    		img = this.show_prompt(vbphrase['enter_image_url'], 'http://', true);
                    		if (img = this.verify_prompt(img))
                    		{
                    			return this.apply_format('insertimage', false, img);
                    		}
                    		else
                    		{
                    			return false;
                    		}
                    	}
                    };

                    Comment


                    • #11
                      Code:
                      * Insert Image
                      *
                      * @param event Event object
                      *
                      * @return boolean
                      */
                      vB_Text_Editor.prototype.insertimage = function(e, forceoldway) 
                      { 
                           if (false) 
                          { 
                      ... 
                      ... 
                          {
                        this.show_editor_progress();
                        YAHOO.util.Connect.asyncRequest("POST", "ajax.php?do=fetchhtml", {
                         success: this.insertimage_ajax,
                         failure: this.remove_editor_dialog,
                         timeout: vB_Default_Timeout,
                         argument: [this.editorid],
                         scope: this
                        }, SESSIONURL
                         + "&securitytoken="
                         + SECURITYTOKEN
                         + "&ajax=1"
                         + "&do=fetchhtml"
                         + "&template=editor_upload_overlay"
                        );
                       }
                       else
                       {
                        img = this.show_prompt(vbphrase['enter_image_url'], 'http://', true);
                        if (img = this.verify_prompt(img))
                        {
                         return this.apply_format('insertimage', false, img);
                        }
                        else
                        {
                         return false;
                        }
                       }
                      };
                      www.highperformancestangs.com

                      Comment


                      • #12
                        I deleted the entire vbulletin_textedit.js file from my server and the box still shows up?
                        www.highperformancestangs.com

                        Comment


                        • #13
                          Originally posted by burntire View Post
                          I deleted the entire vbulletin_textedit.js file from my server and the box still shows up?
                          That's interesting. That means the page must not be using the file you have been editing. Or there is a cached version of it somewhere.

                          Also, I think I wasn't quite as literally as I should have been when giving you code, the correct version of the function for you should look like this:

                          Code:
                          * Insert Image
                          *
                          * @param event Event object
                          *
                          * @return boolean
                          */
                          vB_Text_Editor.prototype.insertimage = function(e, forceoldway) 
                          { 
                               if (false) 
                              {
                            this.show_editor_progress();
                            YAHOO.util.Connect.asyncRequest("POST", "ajax.php?do=fetchhtml", {
                             success: this.insertimage_ajax,
                             failure: this.remove_editor_dialog,
                             timeout: vB_Default_Timeout,
                             argument: [this.editorid],
                             scope: this
                            }, SESSIONURL
                             + "&securitytoken="
                             + SECURITYTOKEN
                             + "&ajax=1"
                             + "&do=fetchhtml"
                             + "&template=editor_upload_overlay"
                            );
                           }
                           else
                           {
                            img = this.show_prompt(vbphrase['enter_image_url'], 'http://', true);
                            if (img = this.verify_prompt(img))
                            {
                             return this.apply_format('insertimage', false, img);
                            }
                            else
                            {
                             return false;
                            }
                           }
                          };

                          Comment


                          • #14
                            No matter what I do I can't get things to change. I can PM you a login on my site if you want to see.
                            www.highperformancestangs.com

                            Comment


                            • #15
                              Originally posted by Michael Henretty View Post
                              The problem is, we are not sure how many users want this option. So please, if you are reading this thread and would find such an option useful, respond here and let us know.
                              Well, you already know my answer.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X