[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)
Anti-Spam Guide
jan_2017
Registered User
Posts: 111
Joined: Sun May 07, 2017 3:39 pm

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

Post by jan_2017 » 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
Last edited by jan_2017 on Sun Apr 22, 2018 5:12 pm, edited 3 times in total.

User avatar
GanstaZ
Registered User
Posts: 271
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: [3.2.0] Picture instead forumrules

Post by GanstaZ » Sat Apr 21, 2018 12:39 pm

img width for that specific div element should be auto.

User avatar
Froddelaar
Registered User
Posts: 775
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [3.2.0] Picture instead forumrules

Post by Froddelaar » Sat Apr 21, 2018 12:39 pm

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
Wij promoten UW muziek in ons forum & delen alles via Sociale media!
Muziek wordt ook toegevoegd in de playlist van
textradio.be!
Mail uw single + hoesje + info naar: info@muziekpromo.net of Solidjeuh@textradio.be
===============
Onze Website: https://www.muziekpromo.net

jan_2017
Registered User
Posts: 111
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] Picture instead forumrules

Post by jan_2017 » Sat Apr 21, 2018 12:43 pm

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: 271
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: [3.2.0] Picture instead forumrules

Post by GanstaZ » Sat Apr 21, 2018 12:53 pm

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.

jan_2017
Registered User
Posts: 111
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] Picture instead forumrules

Post by jan_2017 » Sat Apr 21, 2018 1:34 pm

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: 271
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: [3.2.0] Picture instead forumrules

Post by GanstaZ » Sat Apr 21, 2018 2:20 pm

If i knew in what div you put that image in, i would edit that code above.

jan_2017
Registered User
Posts: 111
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] Picture instead forumrules

Post by jan_2017 » Sat Apr 21, 2018 2:44 pm

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: 271
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: [3.2.0] Picture instead forumrules

Post by GanstaZ » Sat Apr 21, 2018 9:02 pm

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?

jan_2017
Registered User
Posts: 111
Joined: Sun May 07, 2017 3:39 pm

Re: [3.2.0] Picture instead forumrules

Post by jan_2017 » Sun Apr 22, 2018 7:43 am

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: 271
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

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

Post by GanstaZ » 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

jan_2017
Registered User
Posts: 111
Joined: Sun May 07, 2017 3:39 pm

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

Post by jan_2017 » Sun Apr 22, 2018 12:51 pm

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: 271
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

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

Post by GanstaZ » Sun Apr 22, 2018 12:54 pm

To be honest it doesn't matter, but i would put it in common under rules.

jan_2017
Registered User
Posts: 111
Joined: Sun May 07, 2017 3:39 pm

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

Post by jan_2017 » Sun Apr 22, 2018 1:27 pm

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: 271
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

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

Post by GanstaZ » Sun Apr 22, 2018 1:35 pm

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

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: Megamaw and 7 guests