How to remove the mouse wheel Zoom Picture and Solve the signature image deformation problem.

xiaoxiao2021-03-06  85

Modify the inc / main.js file, at the 201 row, find

Function bbimg (o) {var zoom = parseint (O.Style.Zoom, 10) || 100; zoom = Event.wheeldelta / 12; if (zoom> 0)

O.Style.ZOOM = ZOOM '%'; returnaf false;}

Change to

Function bbimg (o) {// var zoom = parseint (O.Style.Zoom, 10) || 100; zoom = Event.wheeldelta / 12; if (zoom> 0)

O.Style.ZOOM = zoom '%'; // Return False;}

Enough. In fact, I did a comment, so that the two lines of code did not implement it. If you want to re-open this feature, just remove the fews //

Yes.

The above method is used to completely remove the picture wheel scaling (including signature and post pictures), want to set up, please modify:

INC / DV_UBBCODE.ASP (note! The above method and the method to mention below cannot be used at the same time, is a completely different two modifications

! )

turn up:

Private function bbimg (striZi) DIM s s = strText re.pattern = "] *)>" If ssize = 500 Then S = Re.Replace (s, "

(this.width> Screen.Width - "& SSIZE &") this.width = Screen.width - "& SSIZE &"; ">") Else S = Re.Replace (s, "

(this.width> Screen.Width - "& SSIZE &") this.width = Screen.width - "& Ssize &"; if (this.Height> 100)

THISHEIGHT = 100; ">") end if bbimg = send function

Pay attention to these lines of code! Among them, the first paragraph (if ... below the code, black words) is the picture of the post,

Two sections (the code below Else) is a picture of the image for the signature, the yellow basewheel = "" "Return Bbimg (this)"

Used to detect the mouse roller event, you want to remove the mouse wheel function, delete this code. for example:

The following code removes the mouse wheel operation in the signature: (pay attention to comparison!)

If SSIZE = 500 THEN S = Re.Replace (s, " Screen.Width - "& Ssize &"). Width = Screen.Width - "& SSIZE &"; ">") Else S = Re.Replace (s, " Screen.Width -" & Ssize & ")

THIS.WIDTH = Screen.Width - "& SSIZE &"; IF (this.Height> 100) this.height = 100; ">") end if

See it? In fact, it is very simple, huh, huh ~

By the way, the signature picture is in some cases (when height is greater than 100) will be flattened, that is because this line of code: if

(this.height> 100) this.height = 100; if you want to change the height to other values, then you will do it! Or directly delete this code

It will not limit the height of the signature picture.

PS: I don't know why, the width automatic scaling will implement "lock longitudinal ratio" effect, but the zoom height will block the picture (only partial figure)

The film will appear deformation), there are currently two solutions (optional one):

1. Modify if (this.height> 100) this.height = 100; is: if (this.height> 100) this.style.Height = 100;

Do that most pictures are scaled, only a few special pictures will be deformed.

2, modify if (this.height> 100) this.height = 100; 为 (this.Height> 100) {var rate = 100 /

THIS.HEIGHT; this.style.width = this.width * rat;}

The principle of method two Description: In fact, it is an algorithm that is changed to the width of the height to the width, because no image is shrunk for its Width

It will not be deformable (at least I have not found a picture that will be deformed), so I want to use which method is chosen. Generally

Recommended the first method, if there is still a picture to be deformed, try the second method. Thank you.

Some so-called "special effects" on the picture of the mobile network 7 are like this, there is a problem, I will continue to modify this post.

转载请注明原文地址:https://www.9cbs.com/read-105948.html

New Post(0)