[3.2.0] A picture instead of the text rules - Solved

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Scam Warning
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

[3.2.0] A picture instead of the text rules - Solved

Post by jan_2017 »

Hello.

I would like to insert a picture in some subforums to the place where in the acp the forum rules stand.

I can insert the pictures and it looks great. Unfortunately, the picture is too wide when I look at the phone. The picture has the dimensions 800x300 px.

What do I have to change that the image on the smartphone is displayed reduced in size?

Thanks
Last edited by jan_2017 on Sun Apr 22, 2018 5:12 pm, edited 3 times in total.
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: [3.2.0] Picture instead forumrules

Post by GanstaZ »

img width for that specific div element should be auto.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [3.2.0] Picture instead forumrules

Post by </Solidjeuh> »

jan_2017 wrote: Sat Apr 21, 2018 12:18 pm Hello.

I would like to insert a picture in some subforums to the place where in the acp the forum rules stand.

I can insert the pictures and it looks great. Unfortunately, the picture is too wide when I look at the phone. The picture has the dimensions 800x300 px.

What do I have to change that the image on the smartphone is displayed reduced in size?

Thanks
Change the size to 100% instead of 800px
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] Picture instead forumrules

Post by jan_2017 »

GanstaZ wrote: Sat Apr 21, 2018 12:39 pm img width for that specific div element should be auto.
In which CSS file do I have to change that?

bye Jan
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: [3.2.0] Picture instead forumrules

Post by GanstaZ »

Seems like it is custom coding, for example use common.css

Code: Select all

.class_name img {
    width: auto;
 }
May be changed to max-width by specific unit as (% or px)
.class_name should be changed to the one where image is in.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] Picture instead forumrules

Post by jan_2017 »

Ok I thought the change must be in color.css.

Could you show menan example what you mean with _class.name?

Thanks
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: [3.2.0] Picture instead forumrules

Post by GanstaZ »

If i knew in what div you put that image in, i would edit that code above.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] Picture instead forumrules

Post by jan_2017 »

GanstaZ wrote: Sat Apr 21, 2018 2:20 pm If i knew in what div you put that image in, i would edit that code above.
The solution from the German forum was described as follow.

Code: Select all

.imgrules img {
   max-width: 100%;
   height: auto;
   margin: 12px;
}
But i do not know where i must this part put in.

the next....in

viewtopic_body.html

put this

Code: Select all

<!-- IF S_FORUM_RULES -->
   <div class="rules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
      <div class="inner">

      <!-- IF U_FORUM_RULES -->
         <a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
      <!-- ELSE -->
         <strong>{L_FORUM_RULES}</strong><br />
         {FORUM_RULES}
      <!-- ENDIF -->

      </div>
   </div>
<!-- ENDIF -->
i test it but it doesn't work.

I think I have to complete the change in the CSS file color.css.
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: [3.2.0] Picture instead forumrules

Post by GanstaZ »

You said that you inserted a picture, where exactly did you insert it, can you show the code or do you use an extension to insert images?
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] Picture instead forumrules

Post by jan_2017 »

Hello i use bbcode [img] in the acp field forum rules.
The picture is on server in forum root.

I don't use any extension to show the picture in forum rules area.

Bye Jan
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: [3.2.0] A picture instead of the text rules

Post by GanstaZ »

Try something like this:

Code: Select all

.rules img {
    width: auto;
    margin: 0 auto;
 }
Use width auto or change to max-width
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] A picture instead of the text rules

Post by jan_2017 »

GanstaZ wrote: Sun Apr 22, 2018 12:43 pm Try something like this:

Code: Select all

.rules img {
    width: auto;
    margin: 0 auto;
 }
Use width auto or change to max-width
And I have to paste that now in the file color.css?
Under the line "rules"?

Thanks Jan
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: [3.2.0] A picture instead of the text rules

Post by GanstaZ »

To be honest it doesn't matter, but i would put it in common under rules.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
jan_2017
Registered User
Posts: 161
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] A picture instead of the text rules

Post by jan_2017 »

GanstaZ wrote: Sun Apr 22, 2018 12:54 pm To be honest it doesn't matter, but i would put it in common under rules.
Done. It doesn't work.

Do you think this is missing like this:

Code: Select all

@media only screen and (max-width: 300px), only screen and (max-device-width: 300px)
Bye Jan
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: [3.2.0] A picture instead of the text rules

Post by GanstaZ »

Can you give a link to your board so i can see whats cooking? You can try to change with auto to max-width: 800px
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
Post Reply

Return to “Extension Requests”