Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • [SC] Add Flash BBCode to post page
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
[SC] Add Flash BBCode to post page
Tweet Topic Started: Aug 21 2008, 07:47 PM (1,831 Views)
Logan18 Oct 8 2008, 05:41 PM Post #11


Posts:
11
Group:
Member
Member
#1,160
Joined:
Oct 8, 2008
Coding language
HTML/CSS
Works great! Thanks a ton!
Offline Profile Goto Top
 
darthkid Dec 17 2008, 01:22 AM Post #12


Posts:
4
Group:
Member
Member
#1,808
Joined:
Dec 16, 2008
Thanks, it works great!
Offline Profile Goto Top
 
Rovvrem Forums Dec 22 2008, 07:59 PM Post #13


Posts:
2
Group:
Member
Member
#1,845
Joined:
Dec 22, 2008
Coding language
ASP.Net
JadedOne
Sep 27 2008, 10:06 PM
The text gets removed and the only thing left is the Flash tags with the right information in there when I try to add a video after I've typed out a post. So I have to add the video first when using this and then type out whatever post I'm making......
Been messing with this code (hope the author doesn't mind) and found a few alterations that can be made.

Change the line starting document.forms to the following. This will add the Flash code to the end of your message and not clear the message completely.

Code:
 
document.forms['posting'].post.value=document.forms['posting'].post.value + "[flash="+width+","+height+"]"+url+"[/flash]"


The 1st 2 lines that start with var can be altered to work slightly different...
Code:
 
var height = prompt("Height of the File?",250);
var width = prompt("Width of the File?",300);

The above will enter default values into the prompts (change the numbers if you want different sized videos) whilst still allowing your members to overwrite these values if they wish.

Code:
 
var height = 250;
var width = 300;

This will not prompt your members for the sizes, instead using your settings. Again the numbers can be altered to suit your forum.
Cleaner code would add the set sizes into the document.forms line and remove the 2 var lines, but the above is the easier edit.


The only problem I have now is that the cursor disappears from the message box (loses focus) after the flash code has been entered meaning that you have to click into the message box to get the cursor back and continue typing. Any Ideas? Fixed - See below

It would also be nice if this would work entering the code at the cursor position instead of at the end of the message but its no big problem.
Edited by Rovvrem Forums, Dec 23 2008, 04:27 PM.
Offline Profile Goto Top
 
Rovvrem Forums Dec 23 2008, 04:30 PM Post #14


Posts:
2
Group:
Member
Member
#1,845
Joined:
Dec 22, 2008
Coding language
ASP.Net
Copy and paste the following code under the document.forms line to place the cursor back at the end of you message.

Code:
 
document.forms['posting'].post.focus();
Offline Profile Goto Top
 
Eldiablo Dec 29 2008, 11:04 AM Post #15


Posts:
1
Group:
Member
Member
#1,888
Joined:
Dec 29, 2008
Rovvrem: Worked perfectly. Thank you. :)
Offline Profile Goto Top
 
sokor Jun 13 2009, 09:07 AM Post #16


Posts:
31
Group:
Member
Member
#3,204
Joined:
Jun 13, 2009
wow thnx!
Im looking for this code and now i see it. <3
Offline Profile Goto Top
 
JadedOne Jul 8 2009, 07:31 PM Post #17
Member Avatar


Posts:
14
Group:
Member
Member
#479
Joined:
Aug 6, 2008
Thanks Rowrem!

I just now checked this thread because I saw it had recent replies. I hadn't checked it due to the fact that I started a thread in the code support section about the problems I was having and didn't thnk to check in here again.
Edited by JadedOne, Jul 8 2009, 07:32 PM.
Offline Profile Goto Top
 
99mangoes Jul 20 2009, 03:25 PM Post #18


Posts:
11
Group:
Member
Member
#3,335
Joined:
Jul 20, 2009
Coding language
HTML/CSS
This works great. Thanks.
To Hell & Back
Offline Profile Goto Top
 
jhojho Jul 4 2010, 12:21 AM Post #19


Posts:
3
Group:
Member
Member
#3,888
Joined:
Jul 3, 2010
thanks, for the help, its is very cool
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2

Track Topic · E-mail Topic Time: 7:49 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy