Sorry, but I have to ask if you have set the mode of the extension to "enabled" in the ACP configuration page.Cin- wrote:I've checked everything ten times or so, but all settings are okay.
It's that the extension does nothing. No URL's are changed at all.
It does work on vanilla 3.2.0-RC1.Cin- wrote: If it works on a vanilla phpBB 3.2 install it should work on my board too. It's just that I use nginx+apache as a configuration and thought it might have something to do with this.
I'll keep looking, maybe try another server. I'll let you know if I find the problem (and if it's related to your extension).
Edit: It also doesn't work on a fresh phpBB 3.2.0-RC2 install on my own PC (wamp). It's not my proxyaddress, because when i manually add it to the URL of an image and use img tags, the image shows via cloudinary.
So posting [ img] http://s21.postimg.org/g21720t9j/image.jpg [ /img] => shows the insecure image (URL not changed)
Posting [ img] https://res.cloudinary.com/XXX/image/fe ... /image.jpg [ /img] => shows the secure image via cloudinary
So manually adding the proxyaddress works. Is it possible that your extension just isnt compatible with 3.2-RC2?
OK, if the avatars are being re-written, then the extension is basically configured and working, but something might have changed in RC2 to break compatibility. Can you examine the output html code and post an example of an image tag that should be rewritten but isn't? (in case the html has changed).Cin- wrote:Okay, now it works for avatars (I have the last post avatar extension installed) and those URLs are being rewritten (3.2-RC2). I never looked at the avatars because I don't enable external linking so all avatars are uploaded anyway. Both modes (camo + simple) work.
The images in my posts aren't rewritten though. I thought the locations you included should make that happen, no?
Code: Select all
<div id="post_content593450">
<h3 ><a href="#p593450">Fotografie...</a></h3>
<p class="author">
<a class="unread" href="./viewtopic.php?p=593450#p593450" title="Bericht">
<i class="icon fa-envelope fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Bericht</span>
</a>
<span class="responsive-hide">door <strong><a href="./memberlist.php?mode=viewprofile&u=2" style="color: #0099CC;" class="username-coloured">Cin</a></strong> » </span>54 minuten geleden
</p>
<div class="content"><img src="http://i997.photobucket.com/albums/af93/tcfcfphotos/be1d7160.jpg" class="postimage" alt="Afbeelding"></div>
</div>
I think that what you want is what the extension does.Cin- wrote:Edit:
I looked into the template locations and now I'm starting to think I misunderstood what this extension does. I thought it would rewrite the URLs of images when people post these on my forum. Because I recently switched to SSL-only and get the mixed secure/not-secure warning in chrome when viewing posts that contain images from an http site.
I thought the location postrow - message would identify unsecure URLs present in posts, but now I'm starting to think i'm wrong?
//Original message:
I tried the training mode, it doesn't appear to do anything.
Thanks for doing that research, it should make it much easier to find the problem, but it is a bit worrying that an upgraded board behaves differently to a fresh install. Do you know if there any intentional difference?Cin- wrote:Thanks, no hurry though
I just tested a 3.1 board on my pc (wamp) and it works as it should. When I disable the location "postrow - message" on the 3.1 board, it indeed removes the proxy from the tagged URLs inside a post.
On my 3.2-RC2 server deleting all of the directly mapped domains or posting an avatar url doesn't help (avatars are rewritten but images inside posts not).
When I do a clean install of 3.2 RC1 or RC2 on my local pc (wamp) the extension doesn't work either. When I install 3.1 (extension works), then upgrade to 3.2 (RC 1 or 2) the extension doesn't work anymore (avatars are rewritten but images inside posts not).
Have you tried using the training mode? it should find it for you.kaspir wrote:Anyone know how to add the template for 'phpbb pages' ext?
I think you misunderstood me: the board doesn't behave differently between a fresh install or upgrade of 3.2, the extension behaves the same: avatar URLs (with last post avatar ext) are rewritten, but image URLs inside posts are not rewritten whereas in 3.1 everything works.v12mike wrote: Thanks for doing that research, it should make it much easier to find the problem, but it is a bit worrying that an upgraded board behaves differently to a fresh install. Do you know if there any intentional difference?
[edit] I have reproduced the problem on 3.2.0, I have found a change in the format of img tags in 3.2.0 which is upsetting this extension. I have raised a bug report against phpbb for this, if it turns out to be intentional, I will patch the extension to handle it.[/edit]
To clarify what I found: The difference in behaviour is that when an image link is encountered in a post, the [img]...[/img] BBCode is converted into an html <img ...> tag. In 3.2.0, the html tag is missing a / character that was present in 3.1.x. I think that this is probably a bug, as it is still present in other img tags generated by 3.2.0.Cin- wrote:I think you misunderstood me: the board doesn't behave differently between a fresh install or upgrade of 3.2, the extension behaves the same: avatar URLs (with last post avatar ext) are rewritten, but image URLs inside posts are not rewritten whereas in 3.1 everything works.v12mike wrote: Thanks for doing that research, it should make it much easier to find the problem, but it is a bit worrying that an upgraded board behaves differently to a fresh install. Do you know if there any intentional difference?
[edit] I have reproduced the problem on 3.2.0, I have found a change in the format of img tags in 3.2.0 which is upsetting this extension. I have raised a bug report against phpbb for this, if it turns out to be intentional, I will patch the extension to handle it.[/edit]
But I see you found the problem so great! Thanks for your work!
Code: Select all
http://img12.deviantart.net/f11c/i/2012/253/9/2/smb3dx_grass_land__mockup__by_dogmansp-d5ea0zf.gif
Joshy's fix does not have quite the right behaviour for some of the html tags generated by the forum (and other extensions).Cin- wrote:I tried the fix proposed by JoshyPHP on tracker.phpbb.com and it works.
However, I have one gif that is being rewritten but google/firefox console still tag it as an insecure link (very weird because in the source code it shows as https)
I thought you might use Joshy's fix, and since I lack the knowledge to see what exactly is wrong with this URL I thought I post it for you to find outCode: Select all
http://img12.deviantart.net/f11c/i/2012/253/9/2/smb3dx_grass_land__mockup__by_dogmansp-d5ea0zf.gif
Code: Select all
'#<img [^>]*src="(http://[^"]+)"[^>]*>#'