Page 1 of 2

image in posting areas...

Posted: Thu Nov 14, 2019 9:31 pm
by .Josh
As show in this picture here: https://ibb.co/FX5mSgC

Can anyone guide me on how to add an image into the posting areas please?

Re: image in posting areas...

Posted: Thu Nov 14, 2019 9:42 pm
by Gumboots
Add this to the end of any convenient CSS file:

Code: Select all

#message {
    background-image: url(path_to_your_image_goes_here) 100% 0 no-repeat;
}

Re: image in posting areas...

Posted: Thu Nov 14, 2019 11:00 pm
by .Josh
sorry for sounding silly but when you say convenient css file which would it be for the postbit? sorry new to phpbb

Re: image in posting areas...

Posted: Thu Nov 14, 2019 11:08 pm
by Gumboots
It this instance it doesn't greatly matter. Responsive.css loads last in most styles, so would be as good as any.

Don't worry, I'm pretty new here myself. They're a good crew and tolerant of n00bs., ;)

Re: image in posting areas...

Posted: Fri Nov 15, 2019 7:28 pm
by eeji

Re: image in posting areas...

Posted: Fri Nov 15, 2019 8:17 pm
by Gumboots
You guys do love your bloat. :D

Re: image in posting areas...

Posted: Fri Nov 15, 2019 8:20 pm
by Lumpy Burgertushie
not sure what that means. the whole point of phpbb and extensions is to reduce the bloat in the core. only those that want something will install the extension for it. that keeps the bloat of editing core files down etc.

robert

Re: image in posting areas...

Posted: Fri Nov 15, 2019 8:32 pm
by eeji
Gumboots wrote:
Fri Nov 15, 2019 8:17 pm
You guys do love your bloat. :D
The OP doesn't stipulate whether it's a simple customisation of an off the shelf style or whether they are making lots of edits to warrant a child style, or their level of familiarisation with the system so the best recommendation imo is to use an extension. Come update time it will just work, without the added task of updating a child or reapplying edits to the core.

Re: image in posting areas...

Posted: Fri Nov 15, 2019 8:36 pm
by Gumboots
Yes I understand that. My point was that all the extension does is add this:

Code: Select all

#message-box textarea {
	background: #FFFFFF url("./message.png") right bottom no-repeat;
}
Which is exactly the same (in terms of rendered result) as the code I gave:

Code: Select all

#message {
    background-image: url(path_to_your_image_goes_here) 100% 0 no-repeat;
}
Yet to do this, the extension requires 7 directories and 4 files, and a separate request to the server for the CSS file. For one line of CSS.* That is what I meant by "bloat".

Now sure, I get that it provides a no-brainer way of doing this for people who know no coding whatsoever. My preference would still be to skip the bloat and just add the line of CSS to an existing file. It's simpler and cleaner, IMO.

*Here's one thing I have noticed about The Gospel According to phpBB. Yes, it is n00b-proof and yes, that is a valid consideration. However, I'm looking at things from the perspective of a fairly competent admin who can whip off a bit of custom CSS or template code without much drama, and who is concerned about members or guests on less-than-ideal connections.

With the way extensions are usually done, every one of them will create its own CSS file. And, they often do this for one line of code. That means if someone rocks up to your site on a basic cable connection, every one of those CSS files will tie up a connection to the sever for anything up to half a second. If you have a couple of dozen such extensions, this all adds up. It's not an overhead I'd be prepared to accept. Nor would I want to have to deal with said files, in all their glorious multiplicity, whenever I want to change the presentation a bit. YMMV.

Re: image in posting areas...

Posted: Fri Nov 15, 2019 9:37 pm
by eeji
I gotta agree with you, the simpler extensions (such as this) are overly complicated :)

Re: image in posting areas...

Posted: Fri Nov 15, 2019 9:48 pm
by Gumboots
I think when you get down to this level, and if you want to keep things as simple as possible for beginners, the best compromise is a custom.css that loads after {STYLESHEETS}. Anyone who could tie their own shoelaces could add that to their template if instructions were given. It's a handy way of applying tweaks with negligible overhead, and a backup copy can be saved before upgrading to a new version of phpBB. Once you have run the upgrade process, just upload your backup custom.css. Sorted.

Re: image in posting areas...

Posted: Fri Nov 15, 2019 10:35 pm
by Lumpy Burgertushie
I don't argue with your thinking, however, the extra files etc. don't even add any noticeable load time on my very slow internet. when you are talking about pure text files like css even at download speeds like mine ( around 3 to 5 MBs ) you are not talking about a noticeable difference.

to me, the definition of bloat is adding things to the core that can be done with an extension and would only become "bloat" to those that use that extension.


also, keep in mind that there are over 200,000 videos alone online showing people how to tie shoelaces.

robert

Re: image in posting areas...

Posted: Fri Nov 15, 2019 10:49 pm
by Gumboots
They're not an issue once they are cached in the browser. They are an issue on initial visit, or if you have had to clear cache (and yes, I have been running and analysing waterfalls, so I know exactly what they are doing).

But even leaving aside the issue of caching times, it's still more convenient for me to have such code snippets not strewn all through the installation. I find I always end up rewriting the presentation anyway to get it the way I like it.

Re: image in posting areas...

Posted: Fri Nov 15, 2019 11:03 pm
by Talk19Zehn
No, the code is not identical:
a)
#message {
b)
# message-box textarea {

... pay attention to the a) contact form and compared to the b) answer area and the differences become clearer.

Re: image in posting areas...

Posted: Fri Nov 15, 2019 11:09 pm
by Gumboots
In terms of what is rendered in the posting area, which was what the initial question was about, they are identical. The OP did not ask about the contact form.