Adding Background image to textarea

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
Post Reply
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Adding Background image to textarea

Post by Stoker »

Adding Background image to textarea
Written by Stoker

Lets add a background image to the posting textarea both on posting and quickreply.
Demo: This site

First we will add the background image to the Quickreply
Open styles/prosilver/template/quickreply_editor.html
Find:

Code: Select all

<textarea style="height: 9em;"
Replace with:

Code: Select all

<textarea style="height: 9em; background: #FFFFFF url('{ROOT_PATH}images/message.png') center no-repeat;"
Note that you need to find and replace above twice!

Next we will add the background image to the Posting Editor
Open styles/prosilver/template/posting_editor.html
Find:

Code: Select all

name="message" id="message"
Replace with:

Code: Select all

name="message" id="message" style="background: #FFFFFF url('{ROOT_PATH}images/message.png') center no-repeat;"

In this case the background image is named "message.png"
You can name it anything you want, just change it in the code too.
The image MUST be uploaded to your /images/ folder.
Board rules! No PM support
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

Adding Background image to textarea

Post by Terr0r »

thanks for this one Stoker
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

Adding Background image to textarea

Post by Blackwolf »

EDIT....I have been gimping.... :D just not sure how to make it a bit more opaque.....any clues?? :? and is the file size any issue??
message.png
Image
message.png.zip
(9.58 KiB) Downloaded 295 times
Happy & leaving it. Lots of good comments on the forum :D
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”
User avatar
mikef35
BBCoder III
BBCoder III
Posts: 147
Joined: 23 Feb 2012, 21:45

Adding Background image to textarea

Post by mikef35 »

Stoker,

Do you know what edits would have to be made to put the backround image in the PM text area?
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Adding Background image to textarea

Post by Stoker »

Maybe the code in first post can help?
Board rules! No PM support
User avatar
mikef35
BBCoder III
BBCoder III
Posts: 147
Joined: 23 Feb 2012, 21:45

Adding Background image to textarea

Post by mikef35 »

Stoker wrote:Maybe the code in first post can help?
Crap, sorry about that, I needed to refresh the screen for it to appear. Thanks
Post Reply