Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles

Reply
 
Thread Tools
Swf File Widget
Xencored
Join Date: Sep 2008
Posts: 1,337

 

UK, Scuny
Show Printable Version Email this Page Subscription
Xencored Xencored is offline 05-20-2010, 10:00 PM

Hello

This is a simple way to get a .Swf file as a widget (more of a how-to than a mod)
Demo if needed

Here is a image of the Widget



First of Upload your .swf file to your forum Root and remmber the name of it
Example "miku.swf"

Goto your adminCP
vBulletin CMS>>Widgets
Than at the bottom we want "Create Widget" click it

Widget Type = Static HTML
Title = Anything you like (for me i entered "Miku Clock")
Description = Again anything you like
And Save it

After you have saved the widget find it on the list and Hit Configure on the very right of the widget

Add this code in the "Enter Static HTML" box

Code:
			<object width="145" height="170">
<param name="" value="miku.swf">
<embed src="miku.swf" width="145" height="170">
</embed>
</object>
Red = Size
Green = File name (the one you uploaded at the start to Root)
remmber to change these

Hit save

Now go
vBulletin CMS>>Layout Manager
Edit your Grid where you want it to show



Now in the Widgets box find the Name of your new Widget hit the ">" button next to it
Now just move it to where you want it to show

Save and thats it all done
Attached Images
File Type: png miku widg.png (44.1 KB, 0 views)
File Type: jpg grid.jpg (69.3 KB, 0 views)
Attached Files
File Type: txt read-me.txt (4.4 KB, 36 views)
Reply With Quote
  #12  
Old 05-23-2010, 02:35 PM
Xencored Xencored is offline
 
Join Date: Sep 2008
Location: UK, Scuny
Posts: 1,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by baghdad4ever View Post
is there any chance to put 10 swf files in certain folder and the widget show them randomly?
Hmm i guess so ill look into it for you

Quote:
Originally Posted by Jaske View Post
would this work in vBadvanced (modules) ?
Never used Vbad mate so no idea sorry
Reply With Quote
  #13  
Old 06-10-2010, 10:46 AM
baghdad4ever baghdad4ever is offline
 
Join Date: Apr 2007
Location: baghdad
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Animemike View Post
Hmm i guess so ill look into it for you


Never used Vbad mate so no idea sorry
thanks

im waiting you
Reply With Quote
  #14  
Old 06-17-2010, 11:07 PM
Xencored Xencored is offline
 
Join Date: Sep 2008
Location: UK, Scuny
Posts: 1,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by baghdad4ever View Post
thanks

im waiting you
Not tested but this might work

Code:
<script type="text/javascript"> 
<!-- 

var swf1="1.swf" 
var swf2="2.swf" 
var swf3="3.swf" 
var swf4="4.swf" 
var swf5="5.swf" 
var swf6="6.swf" 
var swf7="7.swf" 
var swf8="8.swf" 
var swf9="9.swf" 
var swf10="10.swf" 
var x=Math.round(Math.random()*9) 
if (x==0) x=swf1 
else if (x==1) x=swf2 
else if (x==2) x=swf3 
else if (x==3) x=swf4 
else if (x==4) x=swf5 
else if (x==5) x=swf6 
else if (x==6) x=swf7 
else if (x==7) x=swf8 
else if (x==8) x=swf9 
else x=swf10 

document.write('<embed src='+'"'+x+'"'+' width="145px"; height="170" >') 

//--> 
</script>
Reply With Quote
  #15  
Old 06-19-2010, 12:38 PM
baghdad4ever baghdad4ever is offline
 
Join Date: Apr 2007
Location: baghdad
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Animemike View Post
Not tested but this might work

Code:
<script type="text/javascript"> 
<!-- 

var swf1="1.swf" 
var swf2="2.swf" 
var swf3="3.swf" 
var swf4="4.swf" 
var swf5="5.swf" 
var swf6="6.swf" 
var swf7="7.swf" 
var swf8="8.swf" 
var swf9="9.swf" 
var swf10="10.swf" 
var x=Math.round(Math.random()*9) 
if (x==0) x=swf1 
else if (x==1) x=swf2 
else if (x==2) x=swf3 
else if (x==3) x=swf4 
else if (x==4) x=swf5 
else if (x==5) x=swf6 
else if (x==6) x=swf7 
else if (x==7) x=swf8 
else if (x==8) x=swf9 
else x=swf10 

document.write('<embed src='+'"'+x+'"'+' width="145px"; height="170" >') 

//--> 
</script>

thanks

can you explain plz how to use this code?
Reply With Quote
  #16  
Old 06-19-2010, 06:32 PM
Xencored Xencored is offline
 
Join Date: Sep 2008
Location: UK, Scuny
Posts: 1,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by baghdad4ever View Post
thanks

can you explain plz how to use this code?
Same as above
"Add this code in the "Enter Static HTML" box"

Add the url for your SWFs over 1.swf 2 3 4 5 etc...
Reply With Quote
  #17  
Old 07-14-2010, 06:20 PM
vikris's Avatar
vikris vikris is offline
 
Join Date: Feb 2010
Location: Skopje, Macedonia
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfectly with jpg files also!

My question is how to put in the code link, when someone clicks on the image to be redirected somewhere?

Thanks!

--------------- Added [DATE]1279139477[/DATE] at [TIME]1279139477[/TIME] ---------------

Sorry for double post. In IE 8 gives blank. All other browsers show correctly.
Reply With Quote
  #18  
Old 07-23-2010, 05:40 PM
Xencored Xencored is offline
 
Join Date: Sep 2008
Location: UK, Scuny
Posts: 1,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The swf works fine on IE if your using images than thats something ive not tryed
Reply With Quote
  #19  
Old 07-16-2011, 02:16 AM
Mondi Mondi is offline
 
Join Date: Sep 2006
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very helpful - thanks heaps.

You just saved me hours.....
Reply With Quote
  #20  
Old 08-04-2011, 01:42 AM
montda montda is offline
 
Join Date: May 2004
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OMG I was thinking to add this on my site, suddenly i found this post ! XD love u Vodkaholic <3

--------------- Added [DATE]1312477958[/DATE] at [TIME]1312477958[/TIME] ---------------

It's working fine with me but there some kind of problem in width and height with different screens :/ isn't there code in html to make it auto size?
Reply With Quote
Reply

Thread Tools

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:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04653 seconds
  • Memory Usage 2,318KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete