Log in

View Full Version : Template caching and template search issue


squishi
11-11-2014, 12:31 PM
I have made a change to the "postbit_attachmentthumbnail" template.
In there, I added a parameter to the URL of the attachment.
This is working for attachments that are not embedded.
For embedded attachments, the url parameter does not show.

So I reprocessed the post cache. Still, the parameter does not show.

Is there another template cache that I am not aware of?

I can see that I modified the correct template. It is the only one that contains the phrase "image_larger_version_x_y_z".

There is however another obscurity on my board.
When I search for the string "image_larger_version_x_y_z", the first few styles will not show that template in teh results.
When I search for the template name, the first few styles will show the template.

That's strange, and I think there could be a connection to the above issue?

I have already re-built the styles a few times. That did not help either.

kh99
11-11-2014, 01:00 PM
I don't know why the phrase would be missing from some of your styles. But I think maybe the problem is that embedded attachments don't use the template. I think the replacement for an embedded image is hard-coded in the bbcode processing code (specifically includes/class_bbcode.php, function handle_bbcode_img()).

squishi
11-11-2014, 03:40 PM
Thank you, kh99.
I did not expect it to be hardcoded. Modifying the php file solved the problem.

It's still curious that the template will not come up when I search the templates.

kh99
11-11-2014, 04:02 PM
Glad you found it. Re-reading the above, I noticed that for some reason I said it was in handle_bbcode_url() when it's really in handle_bbcode_img(), but I guess you figured that out.