Page 1 of 1

Include statement always including file from parent style

Posted: Wed Dec 04, 2013 5:52 pm
by AwesomeStyle
Why is INCLUDE statement including a HTML file from parent style?
Ex: <!-- INCLUDE mods/reimg_content.html -->: ./styles/prosilver/template/mod/reimg_content.html.

I have a style with custom theme/imageset but it inherits the template from prosilver.
Some files like overall_header.html and overall_footer.html are in the template folder of my style.
The other template files are inherited from prosilver.

I want it to include the file from my style folder, not from the parent style folder.

Thanks.

Re: Include statement always including file from parent styl

Posted: Wed Dec 04, 2013 8:28 pm
by Lumpy Burgertushie
if you add the mods directory with the html file in it to your custom style template folder , then it will use that file.

If the mods directory is not in your custom template folder then it will inherit from prosilver.

robert

Re: Include statement always including file from parent styl

Posted: Fri Dec 06, 2013 4:24 pm
by AwesomeStyle
My image still doesn't resize. View the post here.
In the original post the image is resized.

Also, the BBCode won't work (check the portal -> 1st post). Original post is here.

How can I fix the ReIMG and BBCode problem?
I am including overall_header.html and overall_footer.html in the portal2_body.html file.

Thanks!

EDIT: I disabled the forum and forgot to enable it when making this post. You should be able to access the forum.

Re: Include statement always including file from parent styl

Posted: Fri Dec 06, 2013 11:24 pm
by AmigoJack
AwesomeStyle wrote:My image still doesn't resize
Most probably because /portal.php alone renders 49 Errors and 24 warnings für XHTML and chances are the needed JS for image resizing is not included. Maybe you should not ignore what Lumpy told you.
AwesomeStyle wrote:the BBCode won't work
It does, since it still renders <ul> and <li> elements. Your CSS just displays it differently.
AwesomeStyle wrote:fix the ReIMG
Ask the MOD author.
AwesomeStyle wrote:BBCode problem
Ask someone who understands XHTML and CSS.

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 8:51 am
by AwesomeStyle
I have now fixed the <ul> and <li> elements (as you can see on the website) and some XHTML validation errors.

About the ReIMG, my reimg_content.html files are located here:
  1. styles/*censored*/template/mods/reimg_content.html
  2. styles/prosilver/template/mods/reimg_content.html
I am using phpBB version 3.0.11 so I downloaded and installed ReIMG for version 3.0.10.
It seems that the /*censored*.php file does not parse variables(?) like S_REIMG.
When I removed <!-- IF S_REIMG --> from the reimg_content.html file, I was able to find ReIMG code in the rendered portal.php HTML.

Thanks!

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 9:16 am
by AmigoJack
AwesomeStyle wrote:When I removed <!-- IF S_REIMG -->
Instead search all PHP files for 'S_REIMG' and copy the found code to /portal.php.

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 12:41 pm
by AwesomeStyle
I found the ReIMG hook file (includes\hooks\hook_reimg.php) but when I add define('LOAD_REIMG', true); to my custom portal template file, the error is the same.

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 1:33 pm
by AmigoJack
AmigoJack wrote:Ask the MOD author.

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 1:34 pm
by AwesomeStyle
Thanks for the answer, you can close this topic.

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 1:38 pm
by ViolaF
You must make the s_rimg and all other rimg variables global.
Also you must make the rimg code global (so it works also for portal).
Thats the whole story ;)

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 1:39 pm
by ViolaF
s_rimg = s_reimg
rimg = reimg

:lol:

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 1:59 pm
by AwesomeStyle
Still no success. I have also followed this tutorial.

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 2:05 pm
by Lumpy Burgertushie
did you see this:
https://www.phpbb.com/customise/db/mod/ ... 77#p257177

took me a couple of seconds to find.


robert

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 2:14 pm
by AwesomeStyle
I have the exact same code:
  • portal.php - (censored, private code)
  • portal2_body.html - (censored, private code)

Re: Include statement always including file from parent styl

Posted: Sat Dec 07, 2013 2:16 pm
by AwesomeStyle
I have fixed it, I moved the include code from overall_header.html to portal.php.