vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Using Multiple param in BBCode (https://vborg.vbsupport.ru/showthread.php?t=299357)

Syxguns 06-21-2013 01:03 PM

Using Multiple param in BBCode
 
Okay, I'm not a coder! I tend to search, try, copy, paste, and follow examples! LOL:D

So I've been searching forever for an MP3 player to embed in my forum posts. I finally found one that works great, but I need a little help with the BBCode Manager on it.

This is the code I'm using:
Code:

<object type="application/x-shockwave-flash"
data="https://www.mysite.com/music/MP3Player/button/musicplayer.swf?&song_url=https://www.mysite.com/music/sample_songs/{param1}/{param2}.mp3"
width="17" height="17">
<param name="movie"
value="https://www.mysite.com/music/MP3Player/button/musicplayer.swf?&song_url=https://www.mysite.com/music/sample_songs/{param1}/{param2}.mp3&" />
<img src="noflash.gif"
width="17" height="17" alt="" />
</object>

What you are looking at is a lot of mumbo jumbo to me, but for some reason it works even though the picture does not show up on the BBCode Manager. The image does show up on the forum, and that is what is important. If you can help with that as well I would appreciate it.

The item was downloaded from here: [URL=http://musicplayer.sourceforge.net/]Button Version 0.1[URL] There is a test page for the item and that is where I got the code from. The test page is here: Test Page so you don't have to read it all.

My primary problem is that my site requires a ton of sample songs that will go into designated folders, "{param1}", and within that folder is a specific MP3, "{param2}. The following are the test I've done so far.

1) typed entire URL - worked
2) used {param}.mp3 - worked
3) used {param1}{param2}.mp3 and typed: [MP3]Folder_Name/Song_Name[/MP3] - fail
4) used {param1}/{param2}.mp3 - failed
5) used {param1}{param2} and added the ".mp3" at the end of the text - failed

I've probably tried a couple of other ways of doing it as well. I tried no space between folder name and MP3. I've tried "/" between the two, I've even tried using a comma between the folder and MP3 name. The darn thing is that I've done this before, I just can't remember how I did it.

Any help you can provide will be greatly appreciated. This may mean that I have to use the {option} command, but I don't think I did that last time. Many thanks!

kh99 06-21-2013 02:35 PM

You only get one parameter and one option. In this example:
Code:

[mytag=option]This is the parameter[/mytag]
{option} would be "option" and {param} would be "This is the parameter".

Syxguns 06-21-2013 02:54 PM

Thanks kh99, but is there a way for me to accomplish this by using the {option}? Something like this maybe?

Code:

https://www.mysite.com/music/sample_songs/{option}/{param}.mp3
I could have sworn that I made it work before, but maybe I am wrong in my thinking....:confused:

kh99 06-21-2013 06:56 PM

Quote:

Originally Posted by Syxguns (Post 2429600)
Thanks kh99, but is there a way for me to accomplish this by using the {option}? Something like this maybe?

Code:

https://www.mysite.com/music/sample_songs/{option}/{param}.mp3
I could have sworn that I made it work before, but maybe I am wrong in my thinking....:confused:

You could do that, but users would have to enter the bbcode with one part in the option field and one part between the tags.

I think you could just do this:
Code:

[MP3]Folder_Name/Song_Name[/MP3]
then just use {param}.mp3.

Syxguns 06-22-2013 12:29 AM

Quote:

Originally Posted by kh99 (Post 2429654)
You could do that, but users would have to enter the bbcode with one part in the option field and one part between the tags.

I think you could just do this:
Code:

[MP3]Folder_Name/Song_Name[/MP3]
then just use {param}.mp3.

Appreciate the assistance. I will use the idea you just suggested.


All times are GMT. The time now is 08:24 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00985 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete