2021-08-16, 07:39 AM
Pages: 1 2
2021-08-16, 11:21 AM
What filters have you got set up (in terms of how the replacements are configured) and what bbcode are you using? I tried using just the [b] tag here and it worked as expected: https://community.mybb.com/thread-233314.html
2021-08-16, 02:05 PM
this is what i am trying to do. basically replace test.com/abc.jpg to abc.com/abc.jpg
input
[img]https://test.com/abc.jpg[/img]
output
[img]https://abc.com/abc.jpg[/img]
2021-08-17, 09:11 AM
Word filter is not applied to URL in IMG tag.
This can be achieved by changing the PHP hard code in class_parser.php: function mycode_parse_img()
You need to add the following method: "parse_badwords($url);"
[ETS]
This can be achieved by changing the PHP hard code in class_parser.php: function mycode_parse_img()
You need to add the following method: "parse_badwords($url);"
[ETS]
2021-08-17, 09:32 AM
If it's a definitive changement, it's better to run a SQL query
update mybb_posts set message=replace(message, 'https://test.com', 'https://abc.com')
2021-08-17, 09:50 AM
Maybe you can make this with a custom MyCode instead, but consider @Crazycat's comment.
2021-08-18, 01:24 AM
wordpress jetpack photon has free cdn for images. i was wondering if i could make all bbcode image like this
https://i2.wp.com/community.mybb.com/upl..._25096.jpg
here is more info
https://jetpack.com/support/site-accelerator/
https://i2.wp.com/community.mybb.com/upl..._25096.jpg
here is more info
https://jetpack.com/support/site-accelerator/
2021-08-18, 10:51 AM
Ok, I understand.
selfishly, I would say that using the CDN is only interresting for the pictures on your own server.
Peharps can you try to add a MyCode:
Regular expression
Replacement
(set it at position 1 in MyCode order)
This will only work for post contents, if you want to use CDN for all your pictures, you'll have to use a short plugin to replace the urls on the fly.
selfishly, I would say that using the CDN is only interresting for the pictures on your own server.
Peharps can you try to add a MyCode:
Regular expression
https://your.forum.url/(.+)\.(jpg|jpeg|gif|png)
Replacement
https://i2.wp.com/your.forum.url/$1.$2
(set it at position 1 in MyCode order)
This will only work for post contents, if you want to use CDN for all your pictures, you'll have to use a short plugin to replace the urls on the fly.
2021-08-18, 12:18 PM
thank you so much, exactly that's what i was looking for.
https://regex101.com/r/8aFecr/1
can you please tell where am i doing it wrong?
https://i.imgur.com/lT2txmD.png
however thread output not adding the correct url which i am trying to get.
(2021-08-18, 10:51 AM)Crazycat Wrote: [ -> ]Ok, I understand.i am not good with regex. i tried to make something
selfishly, I would say that using the CDN is only interresting for the pictures on your own server.
Peharps can you try to add a MyCode:
Regular expression
https://your.forum.url/(.+)\.(jpg|jpeg|gif|png)
Replacement
https://i2.wp.com/your.forum.url/$1.$2
(set it at position 1 in MyCode order)
This will only work for post contents, if you want to use CDN for all your pictures, you'll have to use a short plugin to replace the urls on the fly.
https://regex101.com/r/8aFecr/1
can you please tell where am i doing it wrong?
https://i.imgur.com/lT2txmD.png
however thread output not adding the correct url which i am trying to get.
2021-08-19, 03:09 PM
i getting strange problem. this link is working only for first [img] bbcode but if there is second [img] bbcode in same post, for second bbcode image link is not changing.
Pages: 1 2