Announcement

Collapse
No announcement yet.

.swf files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roody
    replied
    Originally posted by SloppyGoat
    It works great in my 2.3 version. No html required. I have it working on Gamma too, but I wish I could figure out a way to prompt for the dimensions like the method above.
    What settings do you have enabled in Admin CP to allow this?

    Leave a comment:


  • SloppyGoat
    replied
    It works great in my 2.3 version. No html required. I have it working on Gamma too, but I wish I could figure out a way to prompt for the dimensions like the method above.

    Leave a comment:


  • Roody
    replied
    Ok thanks for the information Steve.

    Leave a comment:


  • Steve Machol
    replied
    I could be wrong but I believe what you want requires anabling HTML in sigs which I strongly advise against.

    Leave a comment:


  • Roody
    replied
    Originally posted by Roody
    I'm wanting to add .swf files as extensions that are allowable in sigs. Except for the attachment section where I did add .swf I cant find where to allow this.

    Any ideas?
    bumping this up.

    Leave a comment:


  • Roody
    replied
    Originally posted by SloppyGoat
    I guess it's safe to post this here. I don't think it's considered hacking. If so, I apologize. You might not need a button. If not, just stop after creating the swf vbcode. The tag will work fine. The rest is just to add the button and javascript dialogue.

    ** CREATING THE [SWF] VBCODE **

    In your Admin CP, navigate to Custom vBcodes > Add, and enter the following values into the form:

    ##########################################################

    vB Code tag: swf

    vB Code replacement: <embed src="{option}" type="application/x-shockwave-flash" {param}></embed>

    vB Code example: [swf=http://www.yourdomain.com/flash.swf]width="100" height="200"[/swf]

    vB Code explanation: Embeds a Shockwave Flash movie into your message.

    Use {option} ?: Yes

    ##########################################################

    That's it! Now you can add Flash movie with the [swf] tag. If you would like to add a shortcut button to each posting screen, follow these instructions:

    ** CREATING THE VBCODE BUTTON **

    Open the file vbcode.js (in the root directory) and find:

    ##########################################################

    // *******************************************************

    function dolist(theform) {
    // inserts list with option to have numbered or alphabetical type
    listtype = prompt(list_type_prompt, "");
    if ((listtype == "a") || (listtype == "1")) {
    thelist = "
    1. \n";
      listend = "
    ";
    }
    else {
    thelist = "
    • \n";
      listend = "
    ";
    }
    listentry = "initial";
    while ((listentry != "") && (listentry != null)) {
    listentry = prompt(list_item_prompt, "");
    if ((listentry != "") && (listentry != null))
    thelist = thelist+"[*]"+listentry+"\n";
    }
    theform.message.value += thelist+listend;
    theform.message.focus();
    }

    // *******************************************************

    ##########################################################

    And AFTER that add:

    ##########################################################

    function flash(theform,thetype) {
    // inserts flash vbcode - [swf=mylink]width="width" height="height"[/swf]
    swftext = prompt(attributes_swf_prompt,"");
    var prompttext;
    prompt_text = link_swf_prompt;
    prompt_contents = "http://";
    swfurl = prompt(prompt_text,prompt_contents);
    if ((swfurl != null) && (swfurl != "")) {
    if ((swftext != null) && (swftext != ""))
    theform.message.value += "["+thetype+"="+swfurl+"]"+swftext+"[/"+thetype+"] ";
    else
    theform.message.value += "["+thetype+"]"+swfurl+"[/"+thetype+"] ";
    }
    theform.message.focus();
    }

    // *******************************************************

    ##########################################################

    Now open vbcode_language.js (in the root directory) and find:

    ##########################################################

    img_text = "Insert an image into your message";

    ##########################################################

    And AFTER that add:

    ##########################################################

    swf_text = "Insert a Flash movie into your message";

    ##########################################################

    Now find:

    ##########################################################

    link_email_prompt = "Enter the email address for the link";

    ##########################################################

    And AFTER that add:

    ##########################################################

    link_swf_prompt = "Enter the URL of the movie";
    attributes_swf_prompt = "Enter the width and height of the movie\nwidth='xxx' height='yyy'";

    ##########################################################

    Now to edit the templates... navigate to the vbcode_buttons template (vBcode Templates [expand] > vbcode_buttons) and find:

    ##########################################################

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

    ##########################################################

    And AFTER that add:

    ##########################################################

    <input type="button" class="bginput" value="SWF" title="Insert Flash" onclick="flash(this.form,'SWF')" onmouseover="stat('swf')">

    ##########################################################

    Done!
    Thanks for the help. Unfortunately, adding the custom vbCode like you mentioned didn't seem to do the trick. I made sure to copy and paste your code so as to ensure it was done correct. I then went and added [swf] tags around the URL that has a .swf file and instead of playing it, it just showed me the tags with the URL.

    Any ideas?

    Leave a comment:


  • Steve Machol
    replied
    Posting the vB Code is okay but please refrain from posting vB file code changes. Unfortunately you'll need to wait until vbulletin.org allows vB3 hacking discussions to do this.

    Leave a comment:


  • SloppyGoat
    replied
    I guess it's safe to post this here. I don't think it's considered hacking. If so, I apologize. You might not need a button. If not, just stop after creating the swf vbcode. The tag will work fine. The rest is just to add the button and javascript dialogue.

    ** CREATING THE [SWF] VBCODE **

    In your Admin CP, navigate to Custom vBcodes > Add, and enter the following values into the form:

    ##########################################################

    vB Code tag: swf

    vB Code replacement: <embed src="{option}" type="application/x-shockwave-flash" {param}></embed>

    vB Code example: [swf=http://www.yourdomain.com/flash.swf]width="100" height="200"[/swf]

    vB Code explanation: Embeds a Shockwave Flash movie into your message.

    Use {option} ?: Yes

    ##########################################################

    That's it! Now you can add Flash movie with the [swf] tag. If you would like to add a shortcut button to each posting screen, follow these instructions:

    ** CREATING THE VBCODE BUTTON **

    Open the file vbcode.js (in the root directory) and find:

    ##########################################################

    // *******************************************************

    function dolist(theform) {
    // inserts list with option to have numbered or alphabetical type
    listtype = prompt(list_type_prompt, "");
    if ((listtype == "a") || (listtype == "1")) {
    thelist = "[list="+listtype+"]\n";
    listend = "[/list="+listtype+"] ";
    }
    else {
    thelist = "
    • \n";
      listend = "
    ";
    }
    listentry = "initial";
    while ((listentry != "") && (listentry != null)) {
    listentry = prompt(list_item_prompt, "");
    if ((listentry != "") && (listentry != null))
    thelist = thelist+"[*]"+listentry+"\n";
    }
    theform.message.value += thelist+listend;
    theform.message.focus();
    }

    // *******************************************************

    ##########################################################

    And AFTER that add:

    ##########################################################

    function flash(theform,thetype) {
    // inserts flash vbcode - [swf=mylink]width="width" height="height"[/swf]
    swftext = prompt(attributes_swf_prompt,"");
    var prompttext;
    prompt_text = link_swf_prompt;
    prompt_contents = "http://";
    swfurl = prompt(prompt_text,prompt_contents);
    if ((swfurl != null) && (swfurl != "")) {
    if ((swftext != null) && (swftext != ""))
    theform.message.value += "["+thetype+"="+swfurl+"]"+swftext+"[/"+thetype+"] ";
    else
    theform.message.value += "["+thetype+"]"+swfurl+"[/"+thetype+"] ";
    }
    theform.message.focus();
    }

    // *******************************************************

    ##########################################################

    Now open vbcode_language.js (in the root directory) and find:

    ##########################################################

    img_text = "Insert an image into your message";

    ##########################################################

    And AFTER that add:

    ##########################################################

    swf_text = "Insert a Flash movie into your message";

    ##########################################################

    Now find:

    ##########################################################

    link_email_prompt = "Enter the email address for the link";

    ##########################################################

    And AFTER that add:

    ##########################################################

    link_swf_prompt = "Enter the URL of the movie";
    attributes_swf_prompt = "Enter the width and height of the movie\nwidth='xxx' height='yyy'";

    ##########################################################

    Now to edit the templates... navigate to the vbcode_buttons template (vBcode Templates [expand] > vbcode_buttons) and find:

    ##########################################################

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

    ##########################################################

    And AFTER that add:

    ##########################################################

    <input type="button" class="bginput" value="SWF" title="Insert Flash" onclick="flash(this.form,'SWF')" onmouseover="stat('swf')">

    ##########################################################

    Done!

    Leave a comment:


  • Zachery
    replied
    to be honest i have no real clue >.< there was a big list of shared Bbcodes around here, if you read the howto in the manual i think you could figure it out

    Leave a comment:


  • Roody
    replied
    Originally posted by Faranth
    no you can make BB code to do it
    Pardon my ignorance, but can you walk me through how I do that exactly? Thx

    Leave a comment:


  • Zachery
    replied
    no you can make BB code to do it

    Leave a comment:


  • Roody
    replied
    Originally posted by Steve Machol
    That's the only place. Are you having a specific problem?
    Yeah I set it to allow .swf extensions, and made sure the link URL was correct, but Im getting a nice red X. Is Faranth's suggestion of turning on HTML in sigs my only option?

    Leave a comment:


  • Zachery
    replied
    youd need to either allow html or make a BB code to embed the swf file on the page

    Leave a comment:


  • Steve Machol
    replied
    That's the only place. Are you having a specific problem?

    Leave a comment:


  • Roody
    started a topic .swf files

    .swf files

    I'm wanting to add .swf files as extensions that are allowable in sigs. Except for the attachment section where I did add .swf I cant find where to allow this.

    Any ideas?

Related Topics

Collapse

  • webnsn
    URGENT
    by webnsn
    Thanks

    Now Only Biggest Question and Issue is

    tell me how to remove these Malware, Godaddy provided list of link but when i went to Sever Files and enter below path i can see...
    Sat 23rd Mar '13, 12:44am
Working...
X