Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image with specific dimensions not parsed in posts #27

Closed
Getekid opened this issue May 27, 2017 · 4 comments · Fixed by #34
Closed

Image with specific dimensions not parsed in posts #27

Getekid opened this issue May 27, 2017 · 4 comments · Fixed by #34

Comments

@Getekid
Copy link

Getekid commented May 27, 2017

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
Copy link
Collaborator

Nitair commented Jun 22, 2017

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
Copy link
Owner

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

@Nitair
Copy link
Collaborator

Nitair commented Jun 27, 2017

closed by #34

@Nitair Nitair closed this as completed Jun 27, 2017
@rubencm
Copy link

rubencm commented Feb 22, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants