Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-21-2013, 01:03 PM
Syxguns's Avatar
Syxguns Syxguns is offline
 
Join Date: Jul 2011
Posts: 280
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Using Multiple param in BBCode

Okay, I'm not a coder! I tend to search, try, copy, paste, and follow examples! LOL

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!
Reply With Quote
  #2  
Old 06-21-2013, 02:35 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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".
Reply With Quote
  #3  
Old 06-21-2013, 02:54 PM
Syxguns's Avatar
Syxguns Syxguns is offline
 
Join Date: Jul 2011
Posts: 280
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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....
Reply With Quote
  #4  
Old 06-21-2013, 06:56 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Syxguns View Post
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....
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.
Reply With Quote
  #5  
Old 06-22-2013, 12:29 AM
Syxguns's Avatar
Syxguns Syxguns is offline
 
Join Date: Jul 2011
Posts: 280
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:26 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.03520 seconds
  • Memory Usage 2,206KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete