Include statement always including file from parent style

Discussion forum for MOD Writers regarding MOD Development.
Locked
AwesomeStyle
Registered User
Posts: 64
Joined: Tue Jul 16, 2013 7:10 pm

Include statement always including file from parent style

Post by AwesomeStyle » Wed Dec 04, 2013 5:52 pm

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.
I will install MODs for your forum as cheap as 5-15$ in BitCoin depending on the MOD install level & time. Contact via PM.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66487
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Include statement always including file from parent styl

Post by Lumpy Burgertushie » Wed Dec 04, 2013 8:28 pm

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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

AwesomeStyle
Registered User
Posts: 64
Joined: Tue Jul 16, 2013 7:10 pm

Re: Include statement always including file from parent styl

Post by AwesomeStyle » Fri Dec 06, 2013 4:24 pm

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.
I will install MODs for your forum as cheap as 5-15$ in BitCoin depending on the MOD install level & time. Contact via PM.

User avatar
AmigoJack
Registered User
Posts: 5602
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Include statement always including file from parent styl

Post by AmigoJack » Fri Dec 06, 2013 11:24 pm

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.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

AwesomeStyle
Registered User
Posts: 64
Joined: Tue Jul 16, 2013 7:10 pm

Re: Include statement always including file from parent styl

Post by AwesomeStyle » Sat Dec 07, 2013 8:51 am

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!
Last edited by AwesomeStyle on Sun Jan 26, 2014 7:35 pm, edited 1 time in total.
I will install MODs for your forum as cheap as 5-15$ in BitCoin depending on the MOD install level & time. Contact via PM.

User avatar
AmigoJack
Registered User
Posts: 5602
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Include statement always including file from parent styl

Post by AmigoJack » Sat Dec 07, 2013 9:16 am

AwesomeStyle wrote:When I removed <!-- IF S_REIMG -->
Instead search all PHP files for 'S_REIMG' and copy the found code to /portal.php.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

AwesomeStyle
Registered User
Posts: 64
Joined: Tue Jul 16, 2013 7:10 pm

Re: Include statement always including file from parent styl

Post by AwesomeStyle » Sat Dec 07, 2013 12:41 pm

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.
I will install MODs for your forum as cheap as 5-15$ in BitCoin depending on the MOD install level & time. Contact via PM.

User avatar
AmigoJack
Registered User
Posts: 5602
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Include statement always including file from parent styl

Post by AmigoJack » Sat Dec 07, 2013 1:33 pm

AmigoJack wrote:Ask the MOD author.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

AwesomeStyle
Registered User
Posts: 64
Joined: Tue Jul 16, 2013 7:10 pm

Re: Include statement always including file from parent styl

Post by AwesomeStyle » Sat Dec 07, 2013 1:34 pm

Thanks for the answer, you can close this topic.
I will install MODs for your forum as cheap as 5-15$ in BitCoin depending on the MOD install level & time. Contact via PM.

User avatar
ViolaF
Registered User
Posts: 1453
Joined: Tue Aug 14, 2012 11:52 pm

Re: Include statement always including file from parent styl

Post by ViolaF » Sat Dec 07, 2013 1:38 pm

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 ;)

User avatar
ViolaF
Registered User
Posts: 1453
Joined: Tue Aug 14, 2012 11:52 pm

Re: Include statement always including file from parent styl

Post by ViolaF » Sat Dec 07, 2013 1:39 pm

s_rimg = s_reimg
rimg = reimg

:lol:

AwesomeStyle
Registered User
Posts: 64
Joined: Tue Jul 16, 2013 7:10 pm

Re: Include statement always including file from parent styl

Post by AwesomeStyle » Sat Dec 07, 2013 1:59 pm

Still no success. I have also followed this tutorial.
I will install MODs for your forum as cheap as 5-15$ in BitCoin depending on the MOD install level & time. Contact via PM.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66487
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Include statement always including file from parent styl

Post by Lumpy Burgertushie » Sat Dec 07, 2013 2:05 pm

did you see this:
https://www.phpbb.com/customise/db/mod/ ... 77#p257177

took me a couple of seconds to find.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

AwesomeStyle
Registered User
Posts: 64
Joined: Tue Jul 16, 2013 7:10 pm

Re: Include statement always including file from parent styl

Post by AwesomeStyle » Sat Dec 07, 2013 2:14 pm

I have the exact same code:
  • portal.php - (censored, private code)
  • portal2_body.html - (censored, private code)
Last edited by AwesomeStyle on Sat Dec 07, 2013 2:21 pm, edited 1 time in total.
I will install MODs for your forum as cheap as 5-15$ in BitCoin depending on the MOD install level & time. Contact via PM.

AwesomeStyle
Registered User
Posts: 64
Joined: Tue Jul 16, 2013 7:10 pm

Re: Include statement always including file from parent styl

Post by AwesomeStyle » Sat Dec 07, 2013 2:16 pm

I have fixed it, I moved the include code from overall_header.html to portal.php.
I will install MODs for your forum as cheap as 5-15$ in BitCoin depending on the MOD install level & time. Contact via PM.

Locked

Return to “[3.0.x] MOD Writers Discussion”