PDA

View Full Version : Flash Gallery Hack v 1.1


Lanigironu
08-23-2002, 10:00 PM
New version 1.1 released, screenshots and what's new in the new version available here (https://vborg.vbsupport.ru/showthread.php?postid=290721#post290721).

This is an extension of Erwin's Flash player hack. It creates a semi-database-driven gallery for all games/movies you have available with information such as author of Flash, size of file, thumbnail, link to run the file, username (if available) of person that sumbitted it, and a link to a leaderboard if available (currently only the Tetris available from john.eovie has that).

The Flash file controls work pretty much like the announcement ones (I got most of the code from there), and are very simple.

There are only two edits to files (an entry for Who's Online and inserting a link to the options in the admin control panel), plus an optional edit if you want to be able to prevent certain groups/people from using the gallery.

This is designed for vB 2.2.6 only, I did not test it with any other version of the board, technically it should work, but I cannot promise anything. This is my first hack as I am new to PHP, but I have done extensive testing to this and will try to help solve any problems if they arise to the best of my knowledge.

Thanks to Fallout2Man for helping me a lot with this hack.

Screenshots coming up in the next posts.

Lanigironu
08-24-2002, 01:36 AM
PS. Working version available here (http://www.otaku-haven.com/forum/showgallery.php?gallery=games).

This is the window for making a new entry.

Lanigironu
08-24-2002, 01:37 AM
This is how it looks in the control panel navbar.

Lanigironu
08-24-2002, 02:16 AM
This is the modify option.

Lanigironu
08-24-2002, 02:22 AM
Edit screen.

Velocd
08-24-2002, 03:06 AM
Interesting....I may just install Erwins hack because of your addition. Good job, it looks pro
:p

eXtremeTim
08-24-2002, 03:22 AM
Nice hack. But im not gonna use erwins flash player hack. I will have no need since im getting johns arcade hack.

Lanigironu
08-24-2002, 03:40 AM
Thanks, velocd, I still have many features to implement for an updated version (including possibly encrypting and storing the thumbnails and files in the database).

PS. If you have john's Tetris hack, I have instructions in the end of the installation instructions to make the gallery give a correct link for it instead of the flash.php one without any coding.

Lanigironu
08-24-2002, 04:08 AM
If you have any suggestions for the next version, please post them.

Ninth Dimension
08-24-2002, 09:52 AM
I like the look of this :)

NexDog
08-24-2002, 10:44 AM
Yep, looks pretty sweet. Going to wait and see what John's index page is going to be like but I see no reason why this can't be integrated.

Damn, those file sizes are scary though. Hope John's games don't put us out of business. :D

kmfdm_kid2000
08-24-2002, 10:53 AM
Yes, that's a concern I had myself. I'm not going to install games that are large, so they don't eat bandwidth. Tetris, Pong, Frogger, and pac man arent too bad though, I can live with their file sizes, and that vB Tetris is just plain BAD @$$!!! Both of these hacks I absolutely love :D

Chris M
08-24-2002, 03:40 PM
Very nice:)

Satan

Lanigironu
08-24-2002, 05:57 PM
Thank you very much for the positive input.

I am currently working on making general settings for the galleries such as disabling thumbnails (in case you don't want to use them), setting the amount of rows and columns per page, and splitting into pages. I will probably finish these later today and release v1.1.

If you have any suggestions, please post them and I might even release them today.

Travis641
08-25-2002, 05:26 AM
...The instructions say vB Flash Player 1.1 - Play Any Flash Game or Movie in vB (including Tetris!)

...Is this the right file?

Erwin
08-25-2002, 07:37 AM
LOL! That's the title of version 1.1 of my Flash Player hack instruction file! ;) You'll need to change it to avoid confusing people. :)

Travis641
08-25-2002, 08:13 AM
the rest of the zip is the same too??

Lanigironu
08-25-2002, 01:05 PM
Hmmm.. Some sort of glitch happened and put Erwin's file in my post.

It should be all fixed now. Sorry for the incovenience.

Demonslayer
08-25-2002, 05:49 PM
Thanks Lanigironu, I was wondering what was going on yesterday...all better now :D

Demonslayer
08-25-2002, 06:22 PM
umm...the sql query gives me an error....


You have an error in your SQL syntax near 'UNSIGNEDDEFAULT '0' NOT NULL ,

`name` VARCHAR( 100 ) NOT NULL ,

`filesize` INT' at line 3

Demonslayer
08-25-2002, 07:01 PM
I made the sql table myself but it doesn't seem to work properly....:(

Lanigironu
08-25-2002, 08:52 PM
Hmmm.... Something is wrong. I copied and pasted the outputed command that PHPMyAdmin gave me, but when I try it in the SQL window it gives me the same error.

I'll see if I can figure it out.

Lanigironu
08-25-2002, 09:08 PM
Ignore this post. Thanks to futureal, the query is in my next post.

Demonslayer
08-25-2002, 09:33 PM
I still get errors...:(

(Btw. shouldn't this "CREATE TABLE 'flash2'" say flash, not flash2?

Lanigironu
08-25-2002, 09:43 PM
Ok, here's the fixed query, thanks to futureal:

CREATE TABLE flash (
flashid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
userid INT(10) UNSIGNED NOT NULL DEFAULT '0',
name VARCHAR(100) NOT NULL,
filesize INT(5) DEFAULT '0' NOT NULL,
filename VARCHAR(50) NOT NULL,
thumb VARCHAR(100) NOT NULL,
author VARCHAR(50) NOT NULL,
type VARCHAR(50) NOT NULL,
height INT(5) DEFAULT '480' NOT NULL,
width INT(5) DEFAULT '640' NOT NULL,
dateline INT(10) UNSIGNED NOT NULL DEFAULT '0',
leaderboardurl VARCHAR(50) NOT NULL,
INDEX (userid)
)

Lanigironu
08-25-2002, 09:44 PM
Yes, yes it should. Sorry about that. I was trying to make a new table to see if it works, instead of overwriting my own one.

Lanigironu
08-25-2002, 09:59 PM
There, it's all fixed now. I'll replace it in the instructions.

Lanigironu
08-25-2002, 10:03 PM
Done.

Demonslayer
08-25-2002, 10:10 PM
thanks :)

Demonslayer
08-25-2002, 10:11 PM
you should fix your instructions and that query with 1 thing.....the table name is flash, not flash2 :)

Lanigironu
08-25-2002, 10:24 PM
I already did both.

Lanigironu
08-26-2002, 03:51 PM
Ok, new version released. In this version you can turn off the gallery for maintanance, disable thumbnails and specify the number of entries per row/column. Extra entries split off into pages with the usual vB controls.

Here's a screenshot of the new admin controls (located with the rest of the vB settings):

Lanigironu
08-26-2002, 03:53 PM
Here's a screenshot of the way it looks (I only had 2 entries per page because I have 4 in total, I wanted to see how it splits into pages, you can specify as many as you want):

snyx
08-27-2002, 08:20 AM
I cant run any of these queries?
INSERT INTO `settinggroupid` ( `settinggroupid` , `title , `displayorder` ) VALUES ('32', 'Arcade Gallery Options', '32');You have an error in your SQL syntax near 'displayorder` ) VALUES ('32', 'Arcade Gallery Options', '32')' at line 1
INSERT INTO `setting` ( `settingid` , `settinggroupid` , `title` , `varname` , `value` , `description` , `optioncode` , `displayorder` ) VALUES (NULL , '32', 'Aracde Gallery Active', 'aracde_on', '1', 'This will turn off the gallery. It can be useful when trying to add Aracde files or making modifications.', yesno', '1');
You have an error in your SQL syntax near '', '1')' at line 1

ack, what now :p

Lanigironu
08-27-2002, 07:50 PM
Ok, I know what the problem is, the way PHPMySQL shows the queries is not even accepted by itself, quite funny. Basically you need to take out all the ` characters and it will work. I'll fix the instructions in a second.

Meanwhile, I have a little announcement about the future of this hack. I decided to integrate it with Erwin's Flash Player hack and make my own, free version of an arcade that will also play movies, manage the files and much more. The next version should be a fully functional gallery, and I hope to release it by the end of the week. :)

Lanigironu
08-27-2002, 08:01 PM
Ok, I fixed the instructions, both for upgrading and installing, just redownload the attachment.

snyx
08-28-2002, 03:09 AM
thx man

snyx
08-28-2002, 03:25 AM
same deal man? huh..

INSERT INTO settinggroupid ( settinggroupid , title , displayorder ) VALUES ('32', 'Flash Gallery Options', '32');
Table 'formkao_vb.settinggroupid' doesn't exist

INSERT INTO setting ( settingid , settinggroupid , title , varname , value , description , optioncode , displayorder ) VALUES (NULL , '32', 'Flash Gallery Active', 'flash_on', '1', 'This will turn off the gallery. It can be useful when trying to add Flash files or making modifications.', yesno', '1');
You have an error in your SQL syntax near '', '1')' at line 1

Lanigironu
08-29-2002, 06:04 AM
ARGH! This is absolutely ridiculous. Try these two queries:


INSERT INTO `settinggroupid` ( settinggroupid , title , displayorder ) VALUES ('32', 'Flash Gallery Options', '32');


And

INSERT INTO `setting` ( settingid , settinggroupid , title , varname , value , description , optioncode , displayorder ) VALUES (NULL , '32', 'Flash Gallery Active', 'flash_on', '1', 'This will turn off the gallery. It can be useful when trying to add Flash files or making modifications.', yesno', '1');


Or better yet, wait until futureal releases the vBProArcade hack. I will be integrating this hack into it.

NeRilkA
09-05-2002, 09:44 PM
Great hack ! useful ! bravo :)

but it doesn't "recognize" DCR file.. when i add a DCR game to the gallery it shows 0kb

i think there is somethin to add but i don't exactly how..

if (!strpos($filename,".")){
$size = filesize("../".$filename.".swf");
if ($size >= 1024){
$size = (int)($size / 1024);
}
}else{
$extra = strpos($filename,".");
$cleanname = substr_replace($filename,'',$extra+4);
$size = filesize("../".$cleanname);
if ($size >= 1024){
$size = (int)($size / 1024);
}
}

thanks

NeRilkA
09-06-2002, 04:28 PM
and there is another problem, if we have more than 3 pages, the third page turn back to the first one... :(

Lesane
10-15-2002, 07:26 AM
Originally posted by Lanigironu
ARGH! This is absolutely ridiculous. Try these two queries:


INSERT INTO `settinggroupid` ( settinggroupid , title , displayorder ) VALUES ('32', 'Flash Gallery Options', '32');


And

INSERT INTO `setting` ( settingid , settinggroupid , title , varname , value , description , optioncode , displayorder ) VALUES (NULL , '32', 'Flash Gallery Active', 'flash_on', '1', 'This will turn off the gallery. It can be useful when trying to add Flash files or making modifications.', yesno', '1');


Or better yet, wait until futureal releases the vBProArcade hack. I will be integrating this hack into it.

settinggroupid don't exists! You need to add it in settinggroup. The query should be:


INSERT INTO `settinggroup` ( settinggroupid , title , displayorder ) VALUES ('32', 'Flash Gallery Options', '32');


And for the second query, you forgot a ' near yesno' so it should be:

INSERT INTO `setting` ( settingid , settinggroupid , title , varname , value , description , optioncode , displayorder ) VALUES (NULL , '32', 'Flash Gallery Active', 'flash_on', '1', 'This will turn off the gallery. It can be useful when trying to add Flash files or making modifications.', 'yesno', '1');

And in step2 you have: 'unsigneddefault' 2 times. That ain't working, it must be 'unsigned default'. ;)

Cyberhouse
10-29-2002, 06:34 AM
Originally posted by Lesane


settinggroupid don't exists! You need to add it in settinggroup. The query should be:


INSERT INTO `settinggroup` ( settinggroupid , title , displayorder ) VALUES ('32', 'Flash Gallery Options', '32');





Invalid SQL: INSERT INTO `settinggroup` ( settinggroupid , title , displayorder ) VALUES ('32', 'Flash Gallery Options', '32');
mysql error: Duplicate entry '32' for key 1

mysql error number: 1062


I?m getting this error when i?m trying to run that query. Can somebody tell me why ? ;)

Cyberhouse
10-29-2002, 09:57 AM
Originally posted by Cyberhouse




Invalid SQL: INSERT INTO `settinggroup` ( settinggroupid , title , displayorder ) VALUES ('32', 'Flash Gallery Options', '32');
mysql error: Duplicate entry '32' for key 1

mysql error number: 1062


I?m getting this error when i?m trying to run that query. Can somebody tell me why ? ;)

Hmm sorry, but I have found why it?s not working ;)

Erwin
10-29-2002, 05:43 PM
change the value 32, to NULL and it will work. :)

Visionray
10-30-2002, 10:08 PM
This hack works great, much better than the other addon in my opinion.

You really should update your zip file on the first page though, I had to debug a lot of your code.

Thanks though, works great now!

Visionray
10-30-2002, 11:27 PM
$user = $DB_site->query_first("SELECT username FROM user WHERE

userid='$flashinfo[userid]'");
$username = $user[username];
$userid = $flashinfo[userid];

There seems to be a problem with this code here. In the gallery, the "submitted by" never shows the username.

Oxygen
01-18-2003, 03:37 PM
When I surpase several pages (2) it continues to load the first pages worth of flash files/thumbs?

Any ideas

Oxygen
01-18-2003, 06:33 PM
you have incorrect PHP (or it could have been my mistake implementing it)

$pagestart = ($pagenumber - 1) * $ppage;
should be:
$pagestart = ($pagenumber - 1) * $perpage;

Shadow_NL
03-01-2003, 05:25 AM
I have this hack installed but I don't really like it, could anyone tell me how I can remove the database entries?

Thanks in advance.

Termi
03-10-2003, 08:50 PM
Hi there

i've a litte prob

look at the picture pls

thx

Bison
04-24-2003, 12:59 PM
Hey guys,

I keep getting this error when I run the first query of this hack:

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: CREATE TABLE flash (
flashid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
userid INT( 10 ) UNSIGNEDDEFAULT '0' NOT NULL ,
name VARCHAR( 100 ) NOT NULL ,
filesize INT( 5 ) DEFAULT '0' NOT NULL ,
filename VARCHAR( 50 ) NOT NULL ,
thumb VARCHAR( 100 ) NOT NULL ,
author VARCHAR( 50 ) NOT NULL ,
type VARCHAR( 50 ) NOT NULL ,
height INT( 5 ) DEFAULT '480' NOT NULL ,
width INT( 5 ) DEFAULT '640' NOT NULL ,
dateline INT( 10 ) UNSIGNEDDEFAULT '0' NOT NULL ,
leaderboardurl VARCHAR( 50 ) NOT NULL ,
INDEX ( userid )
)
mysql error: You have an error in your SQL syntax near 'UNSIGNEDDEFAULT '0' NOT NULL ,
name VARCHAR( 100 ) NOT NULL ,
filesize INT( 5 ' at line 3

WCW Fan
07-29-2003, 06:24 PM
Would it be possible to be able to link the flash media from another source other than your forum root as I want to put the flash on my personal server and then use it for the gallery so is it possible

Gizmo99
08-02-2003, 04:05 PM
Ok Installed change the relavent bits as the download is wrong.

Question

3b says u can stop people seeing the gallery. How ??? have set a user so they cant see it and they still can !!! Also can find re reference to the checking if they can/cant see it it in gallery.php

Please help I and trying to make it so some user groups can't see it

Cheers

Giz

StrykerContact
09-20-2003, 06:43 PM
Oh man this hack is totally bogus...so far the first 3 sql queries do not work and I have had to change some of the parts to get it to work, now I'm stuck on the third one. This hack should not be here, the instructions for the mysql queries are not working. Somebody post a correct install.txt with fixed queries. Thanks.

Holidazed
10-14-2003, 11:50 PM
Bison, I am getting the exact same message.

Come on. Please post a fix for this.

Holidazed
10-15-2003, 01:49 AM
Bison, I figured this part out.

This is the query you should use.

CREATE TABLE flash (
flashid INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
userid INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL ,
name VARCHAR( 100 ) NOT NULL ,
filesize INT( 5 ) DEFAULT '0' NOT NULL ,
filename VARCHAR( 50 ) NOT NULL ,
thumb VARCHAR( 100 ) NOT NULL ,
author VARCHAR( 50 ) NOT NULL ,
type VARCHAR( 50 ) NOT NULL ,
height INT( 5 ) DEFAULT '480' NOT NULL ,
width INT( 5 ) DEFAULT '640' NOT NULL ,
dateline INT( 10 ) UNSIGNE DDEFAULT '0' NOT NULL ,
leaderboardurl VARCHAR( 50 ) NOT NULL ,
INDEX ( userid )
);

gmarik
10-19-2003, 04:41 PM
<a href="http://www.otaku-haven.com/forum/showgallery.php?gallery=games" target="_blank">http://www.otaku-haven.com/forum/sho...?gallery=games</a> is not working for me. Any demos?