PDA

View Full Version : [MyFirst vB2 Hack] Add BG Image to your posts



coffee
Thu 12th Apr '01, 3:57pm
Here you go : )

1. Open CP page
2. Under "Custom BB codes" click "Add"
3. Then enter the next:

vB Code tag:
bgb

vB Code replacement:


<table cellpadding="16" border="0" background="{option}"><tbody><tr><td>{param}</td></tr></tbody></table>


vB Code example:


Post Text Here


vB Code explanation:
Adding a background image to posts

Use Option:
yes


4. Click "Submit"

Now open your forum and start a new thread or reply and test your new code.

The next is only an example:




Then Enter Your Text Here
Then Close with this:



Try! It won't take you a min!

vB2 BETA 5 USERS ONLY:
Adding a button for [bgb] command (remember to say "Yes" for "Use vBCode quick links on your message input screens" on your profile options page):

5. Edit the template called "vbcode_buttons" just after this line:



<input type="button" value="IMG" title="Insert Image" onclick="vbcode(this.form,'IMG','http://')" onmouseover="stat('img')">
&nbsp;


Add this text:



<input type="button" value="BG Image" title="Background Image" onclick="namedlink(this.form,'BGB')" onmouseover="stat('bgb')">



6. Replace the files "vbcode_language.js" and "vbcode.js" located in your forum home with the copy attached HERE (http://www.vbulletin.com/forum/attachment.php?attachmentid=531)

tubedogg
Thu 12th Apr '01, 4:04pm
You should really use {option} and {param} instead of \5 and \7.

coffee
Thu 12th Apr '01, 4:16pm
Done!

ztsky
Fri 13th Apr '01, 2:32pm
a good idea,but how to add it to your vb code button?

coffee
Fri 13th Apr '01, 7:52pm
This file contains "vbcode_language.js" and "vbcode.js" compressed. Please read step No.6 above.

coffee
Fri 13th Apr '01, 7:57pm
Originally posted by ztsky
a good idea,but how to add it to your vb code button?


Done! ztsky

Please let me know if it's working : )

ztsky
Mon 23rd Apr '01, 3:16pm
Originally posted by coffee



Done! ztsky

Please let me know if it's working : )

The vbcode can work,but where is this button like this??
I try again and again,but nothing.:rolleyes:

fatal
Tue 24th Apr '01, 2:21pm
[IMG]http://sdfgsdfg

coffee
Tue 24th Apr '01, 2:44pm
Originally posted by ztsky


where is this button like this??
I try again and again,but nothing.:rolleyes:

Steps 5 and 6 should show that button! just make sure you edited vbcode_buttons template and copied the two attached *.js files to your forum home

If it won't show then please paste the vbcode_buttons template code here

coffee
Tue 24th Apr '01, 2:50pm
Originally posted by fatal
[IMG]http://sdfgsdfg

Thanks fatal for typing your first post here : )

Please let me know if any help is needed

Re: Image command, you can click the button that says IMG then just enter the internet address for the image you want to show in your post and don't forget to click CloseAllTags at the end before you send the post

Don't worry, we all passed through this stage as the start point is always from the begining!

fatal
Thu 3rd May '01, 9:24am
Originally posted by coffee


Thanks fatal for typing your first post here : )

Please let me know if any help is needed

Re: Image command, you can click the button that says IMG then just enter the internet address for the image you want to show in your post and don't forget to click CloseAllTags at the end before you send the post

Don't worry, we all passed through this stage as the start point is always from the begining!

Im really confused because i didnt make that post above????

This is the first time i have even looked at this thread...... perhaps someone is posting on my behalf.... :confused: