Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 03-06-2011, 02:10 AM
Paidy Paidy is offline
 
Join Date: Feb 2011
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Enable Javascript in CMS

Hi, I am trying to enable Javascript in articles in my CMS. I want to basically place a music player in some of my blog posts, but it doesn't render.


Example:

PHP Code:
<script type="text/javascript">var hcode="7f9uf2itkk62";var htitle="The Game - No Seeds (Prod. By Dre & Vidal) - STUDIOLEAKS.INFO.mp3";var hwidth="410";var zombie="raven";</script><script type="text/javascript" src="http://play.hulkshare.com/embed.js"></script

Thanks
Reply With Quote
  #2  
Old 03-06-2011, 02:30 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And what is the result of adding that - can we get a link to see it? And, does your usergroup have permission to post html in articles?
Reply With Quote
  #3  
Old 03-06-2011, 03:09 AM
Paidy Paidy is offline
 
Join Date: Feb 2011
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am an admin and yup the permissions are set.

The result of that code is a media player like here: http://hulkshare.com/l5y5kx6n8nu2

I found other people have placed mp3 players in their forums by adding an mp3 BBcode tag with <embed src="{param}" /> but when I do that it works fine in the BBCODE preview window but when I post on my forums it comes up as:

http://www1.hulkshare.com/d/6wg7ekoe5kuss3pdfwbacwrfujhvclx3246ksc7vr4/The%20Game%20-%20No%20Seeds%20(Produced%20by%20dr.dre)%20Studiol eaks.info.mp3" />

So I'm not too sure. I need an MP3 media player
Reply With Quote
  #4  
Old 03-06-2011, 03:43 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm confused by your first statement. You say you want to be able to put javascript in your CMS articles. Then you say you want to put it in your blog posts. The CMS articles and blog posts have nothing to do with each other. Then you talk about making BBCode and told us what the result is, but didn't both to tell us what you used in your bbcode and what the expected result should have been.

Exactly what is it that you want to be able to do? I cannot tell at all what you want from your descriptions.
Reply With Quote
  #5  
Old 03-06-2011, 03:05 PM
Paidy Paidy is offline
 
Join Date: Feb 2011
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My apologies for being confusing, I was just trying 100 different things at once and ended up getting confused in what I was trying to say.

I have managed to embed a media player using a custom BBCode on my CMS site but I am getting one peculiar error. On the main page of my CMS, my post with the media player in it shows a big black border around it and I'm not sure why.:



When I go into the physical post, the black border is gone:



Why would the black border show up on my CMS home page but not inside the actual post? I checked the source code of both pages and the html is the exact same.

For reference, the code I custom BBCode I am using is:

PHP Code:
<object type="application/x-shockwave-flash" data="/misc/audio-player/player.swf" id="audioplayer" height="24" width="290">
<
param name="movie" value="/misc/audio-player/player.swf"
<
param name="FlashVars" value="playerID=audioplayer&amp;soundFile={param}"
<
param name="quality" value="high"
<
param name="menu" value="false"
<
param name="wmode" value="transparent">
</
object
and I have the following options selected:

Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: Yes


Thanks for your help. Hopefully I was less confusing this time.
Reply With Quote
  #6  
Old 03-06-2011, 03:50 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would need a link to the CMS article in order to see why you are getting a black border. it's probably just some CSS on the page that you would be able to change. You could see it yourself if you have firebug for firefox to look at CSS.
Reply With Quote
  #7  
Old 03-06-2011, 04:43 PM
Paidy Paidy is offline
 
Join Date: Feb 2011
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup, my object on the main page was inheriting the .showobjectpreview css style which was giving it a weird size and border. Thanks for your help
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:58 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.03521 seconds
  • Memory Usage 2,215KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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