cYbercOsmOnauT / wysiwygsceditorphpbb

8 stars 11 forks source link

Image with specific dimensions not parsed in posts #27

Closed Getekid closed 7 years ago

Getekid commented 7 years ago

When adding an image with specified dimensions then though it shows in the editor but not in the post.

The above makes sense since the bbcode generated is e.g. for width and height to 200px [img=200x200]ImageURL[/img] and the built-in img bbcode does not support this format.

Nitair commented 7 years ago

Its easy to fix.

Just open ./includes/acp/acp_bbcodes.php find $hard_coded and remove 'img',

Now you are able to set your custom [img]-tag. wysiwygsceditorphpbb uses "img=number x number"

Create BBCODE with following code

BBCode Usage [img={NUMBER1}x{NUMBER2}]{URL}[/img]

HTML replacement <img src="{URL}" style="width: {NUMBER1}px;height: {NUMBER2}px;" />

Help line Image with specified dimensions: [img=width x height]ImageURL[/img]

I will find a cleaner solution for this, but if you can't wait use my hacky workaround.

cYbercOsmOnauT commented 7 years ago

Nice. Thanks. So we have to use the hook and inject this into phpBB without changing the vanilla code.

Nitair commented 7 years ago

closed by #34

rubencm commented 6 years ago

@Nitair Now [img]URL[/img] without specify dimensions doesn't work