vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB3 Flash Player - Play Any Flash Game / Movie - Tetris, Pacman, Frogger, Minesweeper (https://vborg.vbsupport.ru/showthread.php?t=59816)

blubber12 01-13-2004 12:22 AM

Thanks erwin..I was testing it out on a clean rc2 install, and decided to wait until I transfer my board. I will try the coding template first and if there are still problems I'll let you know. Thanks again.

shad-gt 01-13-2004 07:02 PM

Quote:

Originally Posted by speedway
Size definition is ignored in Mozilla Firebird

It Would be great if someone can fix this :)

fix:

Template:
Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
        <title>$vboptions[bbtitle] - $play</title>
        $headinclude
</head>
<body>
$header
$navbar
            <center>
              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="$w" height="$h">
                <param name="movie" value="games/$play.swf">
                <param name="quality" value="high">
                <if condition="$b"><param name=bgcolor VALUE="$b"></if>
                <embed src="games/$play.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="$w" height="$h"></embed></object>
              <br>
              <br>
            </center>
$footer
</body>
</html>


Erwin 01-13-2004 09:45 PM

Update Version 1.1 - Who's Online and Browser Width Bug Fix

Just replace the "flash" template with the contents in the install.txt file (which is the same as the contents in the post above this one - thanks shad-gt!).

Who's Online instructions in the install.txt file.

albibak 01-13-2004 09:54 PM

Thx for this update Erwin :)

deathemperor 01-14-2004 08:29 AM

I want to make a button in navbar for users to choose flash game, it's a popup html, with links to games or something like that. How can I do that ?
and this will be better if when users access to flash.php, it will show all the flash games or movies, users just have to choose from their and play ^ ^.

shad-gt 01-14-2004 09:14 PM

A little fix for this hack..

Code:

if(!file_exists("games/" . $play . ".swf")) {
        eval(print_standard_error('error_flash'));
}

is new.

A little error output, if someone edits the adress input line.


Code:

<?php

/*======================================================================*\
|| #################################################################### ||
|| # vB Flash Player 1.0 for vB3 RC2 by Erwin Loh                    # ||
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ?2000-2004 Dr. Erwin Loh            # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| #################################################################### ||
\*======================================================================*/

//Parameters:
//
//play = name of SWF file (without the .swf extension - make sure the capitals and small letters are the same!)
//w = width of Flash movie or game
//h = height of Flash movie or game
//b = background color of Flash movie or game (in hex WITHOUT the # eg. 000000 or FFFFFF)
//
//default width and height is 600 x 400
//default background color is the same as your forum page background color
//format - http://www.your-forums.com/forums/fl...?play=filename
//Or to customize width, height and background color
//format - http://www.your-forums.com/forums/fl...h=768&b=000000

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'flash');

// ################### PRE-CACHE TEMPLATES AND DATA ######################

// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array(
        'flash',
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

// guests cannot access Flash Player
if ($bbuserinfo['userid'] == 0)
{
        print_no_permission();
}

// ensure variables get passed through
        globalize($_REQUEST, array(
                'play' => STR,
                'w' => STR,
                'h' => STR,
                'b' => STR,
        ));       

// draw nav bar
$navbits = array('' => $play);

// main script

if(!file_exists("games/" . $play . ".swf")) {
        eval(print_standard_error('error_flash'));
}

if ($play) {
    if (!$w) {
    $w = 600;
    }
    if (!$h) {
    $h = 400;
    }
}
else
{
        eval(print_standard_error('error_flash'));
}

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('flash') . '");');

?>


CdaKnight 01-14-2004 09:27 PM

I agree with deathemperor1st, a file listing on flash.php would be awesome. Then we can just link to that, and users can deal. :)

???`S?LV?R???` 01-15-2004 06:50 PM

Heh I know this is sorta off subject but I noticed that the flash files work for logged in members only as the default, I was wondering If you could set this same sorta thing up for other files as well for Downloads, rather than using attachments since you need to make your mysql packets size uploads larger..etc By the way..... Erwin do you think you'd be able to make that? I'd really appreciate it. :) lol and if it's any sort of encouragement to have this made, I'll give someone a free month of webhosting for this.

ixian 01-15-2004 08:26 PM

Excellent hack.

And for those of you who wish to add a nav menu for it, and put all the links in there like SnowBot did, look no farther than this post on vb.com -> http://www.vbulletin.com/forum/showt...ht=navbar+menu

Chris Blount 01-16-2004 11:38 AM

Great hack! Thanks. Installing the games on the navbar was quite easy!


All times are GMT. The time now is 11:28 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.01162 seconds
  • Memory Usage 1,751KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete