UBB.Dev
Posted By: AllenAyres [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 06/08/2003 9:47 AM
Modification Name: [6.4 +] Games 2.5.1

Author(s): AllenAyres and Burak

Description: Adds a game gallery to your forum

Demo: https://www.ubbdev.com/ubbcgi/games.cgi

Requirements: UBB 6.4+

Download Link: (1.8mb) - only the flash/graphics files
(6kb) - download this if just upgrading

(6kb) - download this for ubb 6.7

Credits: Josh Pettit for ubb.threads version - www.ubbdev.com
Burak for extensive work on v2

Notes: This is a beta quality version, let me know how it works for you. If you have a question about it, please post a link to your installation.

Install Notes: Set config options on line #22-26 in games.cgi. Upload in the directories specified in the zip, set permissions to 755 on the .cgi files and yer ready to waste hours of time on the games.

History: June 8, 2003 - [1.2a] original ubb version released
June 10, 2003 - [1.3] ubb subs used where possible
June 16, 2003 - [1.4] cleaned up some code (unreleased)
June 23, 2003 - [1.5] added ability to set to 'members only'
June 24, 2003 - [1.6] optimized code a bit
July 06, 2003 - [2.0] automatically scans /games folder and adds them to the index (unreleased)
July 06, 2003 - [2.0.1] small bugfixes and xhtml validation work
July 09, 2003 - [2.1] small bugfixes and combination of games.cgi and lib_games.cgi
July 14, 2003 - [2.1.1] Burak's fix for the pages bug
August 8, 2003 - [2.2] automatically determines the size of the game.swf file (unreleased)
August 23, 2003 - [2.2.1] bugfixes for above
Sept. 25, 2003 - [2.3] released for 6.6 smile
December 30, 2003 - [2.4] released for 6.7
February 6, 2004 - [2.5] minor code cleanup for 6.7
February 16, 2004 - [2.5.1] more minor code cleanup for 6.7

PS: I've scored 630,347 on crashdown tipsy
Quote
quote:
Originally posted by AllenAyres:
[b]PS: I've scored 201,392 on crashdown tipsy
It's no 279,014 is it? tipsy
I keep getting an Internal Server Error. I uploaded everything into the correct directories, CHMODDed everything correctly, and whenever I try to access I get an internal server error. I've never gotten this error before, and I don't get it with the boards, I don't know what went wrong

EDIT: I ported it to css, but can't tell if that worked yet.
Posted By: LK Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 06/08/2003 3:12 PM
go to your error log and paste the error please tipsy
I just installed it on a new site the way prescribed and it works fine... how's it going for you?

http://www.praisecafe.org/ubbcgi/games.cgi
Code
[/code]I checked out that line and it's from the ColorForums hack

Code
</pre></div></div>from within<br><br>[code]
make sure you have the latest modules uploaded... I believe that is part of the ubbcgi.pm file
Allen, You're The Greatest!!!!!

[Linked Image] [Linked Image] [Linked Image] [Linked Image]
where would I get this? I read the contents of ubbcgi.pm and it said to get an updated version, go to http://stein.cshl.org/WWW/software/CGI/ do I just download it and rename it ubbcgi.pm?

My version is 2.56 and the latest cgi.pm is 2.93.

Are they the sae thing? If not, where do I get it?
make sure you've uploaded all files from your Modules directory tipsy
I do have them all uploaded, I even reuploaded all of them fresh from the 6.5 zip
did you try to install it without 'porting it to css'?
yeah, of course. I uploaded files straight from the zip, chmodded the cgi files to 755, and the rest into the noncgi/games folder

Don't worry about it though, I noticed something more important in my error logs that I'm gonna work on now.
Posted By: Ed Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 06/09/2003 4:16 AM
Cool it works - Just what I need - more stress
weird, I commented out the one line and now have a fully functional games hack.

*goes off to ask LK importance of line*
cool smile

my next goal will be a setting to allow or disallow guests from viewing/playing smile
that would be awesome, I wanted to request it, but wanted to get it to work first
Posted By: LK Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 06/09/2003 1:23 PM
Try to uncomment the line you commented out (or just remove the "#" tipsy ), and in games.cgi, find:
Code
[/code]add below:[code]
(untested)
thanks LK smile I'll add that to the base code tonight in case others run into the same problem smile
Posted By: LK Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 06/09/2003 5:40 PM
no, it's not the best solution, because if it's in the base code you should remove "use CGI qw(:standard);" and change the line with $q = something with CGI. but I'm not sure how to change it and I can't test, so I said to add below... (which might cause a conflict and not work, I don't know)
Hey this is really cool.. Can someone tell me how to add a link to the games menu to the top nav bar. where my profile, faq etc.. sit..i looked but dont know enough cgi coding to figure it out
ok, thanks LK smile

reak, you can add a link to there in your public_common.pl file, look for the mainbuttons sub routine smile
works perfect! Thanks AA!
no problem, glad you like it smile
hey Allen, is there any chance in the next version this will be more intertwined with the boards, ie using the mainbuttonsline instead of having to hardcode it into the games.cgi page?
that's one of the goals smile
works great smile this will be fun, thx. smile
Another idea, coming from someone who isn't great at editing code, is to have a Control Panel interface that allows us to add and subtract different games from MiniClip .

I have one possible bug: http://ogzr.org/forum/games.cgi

The code centers the contents of my menu tables on the right and left. How do I fix that? smile
Ooooh! And if the Game page could have it's own "Who's Online"! laugh

Sorry, just thinking out loud. smile

Still, great work AA, Josh!
Quote
quote:
Originally posted by Stilgar:
Another idea, coming from someone who isn't great at editing code, is to have a Control Panel interface that allows us to add and subtract different games from MiniClip .

I have one possible bug: http://ogzr.org/forum/games.cgi

The code centers the contents of my menu tables on the right and left. How do I fix that? smile
looking at your code, I would add align="left" in the td declaration for those tables
ahhhh, thanks... that could help. tipsy
Version 1.3 added to the first post... more closely uses the ubb sub routines. To upgrade, upload games.cgi and lib_games.cgi smile
For those upgrading who don't have the calendar or the mod_wordlets installed, just comment out the require lines toward the top of games.cgi smile

[code][/code]
cool, updated... thanks.

What and where do I edit to make the table with the games width="100%" ?
how do you mean? the index or each individual game? Either way, you'd be editing inside games.cgi smile
the table that the games are listed in as a link. Now that you reminded me, the table that the game is viewd in while playing would be great too. Thanks AA. laugh
table width for those are set in your styles templates.. I beliave they are 95% for most. What are you seeing different?
Allen

I want to add the game link with the other UBB links at the top of the forum (i.e. login, register, search, faq, etc.). which file do I edit to do this? I thought it was the public_forum_summary.pl or public_common.pl, but I can't seem to find the line(s) to do this. help
Code
[/code]that's if you have the Wordlets Mod hack, if not

[code]
Allen, this version is so much better, the css only included changing cells,no real hard stuff.

Where do I go to change my mainbuttonsline?, it's smaller on the games page compared to everywhere else on my board
I'm using standard_title_table from public_common.pl (~ line #191), font size is set at one in there.

Hopefully I'll get the members-only thing done soon smile
I found the problem, it's with the css (runs over to colorforums thread)
Posted By: Ellen Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 06/22/2003 12:15 AM
Works perfectly for me! Thanks so much.
you're welcome smile

I still don't have the members-only thing done yet frown
doing the member's only thing, does that mean IP's that are banned can't access it?

Also, what kind of code would I need to edit Game wordlets in the cp?
It should check banned ip's, but since it's not done yet, I don't know if it will tipsy

I didn't make anything to where you had to edit ubb code to use this modification, there's lots of sites who can't modify base code (those running beta's for example), so I made it to set a couple variables and upload to run. It might be possible in the future to have a cp integrated into this itself, but that's probably a couple to three versions into the future smile

My first goal would be to limit it to regged/logged-in users to minimize bandwidth issues. My second goal is to develop an .htaccess file to keep other sites from hotlinking to your files (jpg/gif/swf). Any input is welcome from those with the skill sets to write it smile
oh, to answer more your wordlet question, you can edit them directly for now until I can add a 'cp' at some point in the future.
ok, borrowed from LK's shoutbox code to get a 'members only' status. Please test and let me know how it turns out. I've tested here:
http://www.praisecafe.org/ubbcgi/games.cgi

and it seems to be working fine rockband

ps: with the next release, I'll have the games and the ubb files in different download zips so you don't have to dl 2mb each time I update smile
I used beyond compare (just found out what that was, kept hearing about it) to make it work with css, and it does work. I logged out and it told me to log in. thumbsup
ah cool, thanks WA smile
Any other ideas? I probably won't mess with a control panel if all that's needed is setting one variable tipsy
how about something liek DPK's smiliemod. It scans noncgi/games for swf/dcr files, and gifs/jpgs, and allows you to add those without writing in the actual games.cgi
whooo, that'd be good... tho possibly way outta my range of coding skills. tipsy

I'll need to see how he did it and go from there smile
ah dude, i just updated to version 1.5 today and now there is a 1.6? laugh

wassup? i'm on dial up here!
just download the 6kb zip... it's the only files updated smile If 1.5 is working for you, there's no big reason to update, I just cleaned it a bit more smile
i did and thanks for the hard work laugh it's bad enough the users on our board browse instead of working at their desk, now they have games to play. laugh
You're welcome - yes, they're addicting wink
Trying to link it at the top and I get the seperation line but no link.

Here is what I have...

[code][/code]Any know what I may be doing wrong???

Thasnk and GREAT hack!!! thumbsup
did you do the second part to what I said earlier?...

[code][/code]edit: your link is wrong too. do both of what I said
Thanks for the reply Al...

I did it as you said and played with it a few other ways and I cannot get the link to show. I c/p the code you listed above... I have Calandar and wordlet mods installed. No errors, just simply not there.

I may be confused, what was the "second part of what I said earlier"... that may be what I am missing.

Thanks for the help smile
I was making sure you added the line to vars_wordlets_mods.cgi If it's not added, you'll get a separator, but no link
Posted By: Hexican Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/05/2003 10:46 PM
Al... Yes, I have it. I'll try it again, I am sure I missing something obvious.

The help is most appreciated!!!
Hey Allen, I was wondering how I would go about games.cgi using the $show_logout from public_common.pl. It would be nice to be notified of a pm on the games page too, because sadly, that's where a lot of my members spend their time frown
a new version is in the works smile
OK, thanks to Burak for some great work, it's now updated so that it scans your /games folder for .gif files and loads them as icons with links to your games.swf files - You must name the icon and the .swf with the same name for this to work correctly (ex: crash.gif and crash.swf).

Have fun... now you can upload most any flash game for playing and specify how many games per page you'd like to appear. Thanks Burak thumbsup
Where do I d/l the new update? confused
it's always linked in the first post - the large dl is the games files, the smaller one is the ubb cgi files smile
Allen, I tried doing Battleships.gif and Battleships.swf and it did not work. After playing around, these are the things that work.

format for getting it to work

{gamename}bigicon.(gif/jpg) < image
{gamename}.swf < gamename must be lowercase there.

that's the only way I'm getting them to work
ok, lowercase then? I haven't linked all ours here yet smile
any chance of getting the PM envelope to show up when we have a PM? maybe as an addon or something
Posted By: jlm Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/07/2003 12:24 PM
I've done everything by the instructions but i get this


FYI
I can not open games dir for reading: No such file or directory
Posted By: Burak Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/07/2003 3:55 PM
open games.cgi and set the options correctly. Directory option must be an existing physical path...
i cannot get this mofo working:


dir => "/u292/ncfb/ubb/games",
url => "http://myhost.com/ubb/games",
max => 8,
prg => 'http://myhost.com/cgi-bin/games.cgi',
members_only => 0,
);

all the file permission are set correctly, just won't load the page.
where do you have it installed? It's not on your fbody site, please post a link smile
Yes, I reverted back to good ol' version 1.3 since I couldn't get it to work.
upgraded to 2.1, small bugfixes and combination of games.cgi and lib_games.cgi

A little more is coming, should be ready this weekend (late) or early next smile
Allen, would it be possible to do either this:

Quote
quote:
Originally posted by Weird Al:
any chance of getting the PM envelope to show up when we have a PM? maybe as an addon or something
or:

quote:
[qb]Originally posted by Weird Al:
Hey Allen, I was wondering how I would go about games.cgi using the $show_logout from public_common.pl. It would be nice to be notified of a pm on the games page too, because sadly, that's where a lot of my members spend their time frown [/qb]
smile
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/11/2003 8:06 AM
I found a bug!...

http://www.undergroundnews.com/cgi-bin/ubbcgi/games.cgi?page=4

Page 4 of games is the exact same as page one (ok, so i was bored)!

http://www.undergroundnews.com/cgi-bin/ubbcgi/games.cgi?page=1

frown ...
Posted By: Burak Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/11/2003 4:15 PM
actually it is not the same. page 4 is an "unknown" page and games.cgi prints page 1 instead of giving an error... the bug is the extra page 4 in the links...

try this one . It'll print page 1

install the new version (2.1)...
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/12/2003 9:11 PM
still gives same error frown
WA, I've tried it multiple times, be my guest if you can find the fix for it.

Gizzy, what error are you talking about? Do you have more games than 3 pages worth?
ok, I'll try.

Gizzy has exactly 3 pages worth, so I think all it is is that you automatically added a new page when he hit 3 times his limit per page, instead of checking if there was one available for the 4th page
hmmm... ok, it might need to be tweaked a bit more by Burak there smile
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/13/2003 11:26 AM
Well, I have 3 pages worth of games, but a fourth page apears with all of the content of page 1...
Posted By: CTM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/13/2003 12:30 PM
A brilliant "next step" for this hack would be a Top Scores list; you play the game, your score gets added to a list and you get a ranking at the end...

Just a thought, Allen, please keep up with developing this hack because it's a good one smile
hehe, have no idea how to pull the scores from th flash games tipsy
Posted By: Burak Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/14/2003 2:00 PM
ok...

find this code:

Code
[/code]replace with:

[code]
thank you burak, I'll update the files and post them tonight smile
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/15/2003 1:36 AM
omg, it works! 3 pages lol...
files updated with Burak's fix smile
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/15/2003 8:01 AM
awwe, i found it :-x
Posted By: Burak Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/15/2003 12:53 PM
smile
Would this work on 6.3.1.1 ?
Anybody tried?

Thanks
Allen, anyway of getting this to scan for .dcr files too? it's another kind of flash file miniclip uses
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/16/2003 12:38 AM
Allen, I just think you didn't plan on anyone throwin 3 pages worth of games up lol... If I get more time I'll throw up 10 just to see if it can handle it :x...

Felix, it SHOULD run with 6.3.1.1 since it's just an addon, try it, the worse that can happen is it not working.

Al, most of the DCR files they have are just loaders, I found that out the hard way frown ...
frown darn, I had a feeling it was that way

smile that Ant game kicks a**
Posted By: Burak Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/16/2003 3:33 PM
Quote
quote:
Originally posted by Felix 10:
Would this work on 6.3.1.1 ?
Anybody tried?

Thanks
actually, it is a standalone script, but UBB routines added around it. If it does not work, try to remove ubb related parts and add what 6.3.1.1 uses...
Posted By: Felix 10 Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 07/16/2003 11:29 PM
cleaning up the mess I brought in here.

smile
[code][/code]too many ' for one thing

also, dir usually means inside server, so go into your cp, go to Configuration settings, and look for PATH TO NONCGI. add /games to the end and that;s the DIR
Ops!
I didnt notice that extra '. Thanks.
what version ubb are you running?
6.3.1.1 Allen

Thank you
ahh... that explains it tipsy This works for 6.4-6.5, I have no idea about earlier versions - I don't keep them around or have time to test on them. You can pull that section about md5 out and see if it works, but that is unsupported smile

[code][/code]
hey Allen, in the 2.1 zip it has a .pm file, was that required?, if so, what was the name of it again, cause I didn't see it in the new zip

EDIT: nm, just read the code inside it
Yes Allen, that did it , thank you very much.

smile

Two more things:

1. there is a file bg1.swt in the noncgi folder. do you know what is that? is it another game without a .jpg?

2. for some unknown reason I dont get 2 of my links in the links line on the games.cgi page, Statisctics and IM. I did add a link in the public_forum.pl and wordelized the Games but everwhere else throught the UBB is fine! Any ideas why?

URL http://www.romanianational.com/cgi-bin/games.cgi

Thank you
Felix
it could be another game, not sure. Click on it and see which one plays smile

not sure which mods you have installed. If you are using a seperate wordlet file for those mods, you'll need to require them at the top like the others smile
Allen,

Any chance I could pay someone on the board to install the games for me? Is there any charge for the games code?
I don't have the time, and my coding skills are rusty.

P.S.
Spellcheck?
This forum has spellcheck?
Where did that come from?

I know, I know, newbies can be so annoying:-)

- Frank B.
Piano World
[email protected]
http://www.pianoworld.com/ubb/cgi-bin/ultimatebb.cgi
hey Allen, you wouldn't be able to make a version that worked with 6.6's universal headers etv, would you? smile
once 6.6 is final, yes smile
Where can you download the whole shabang? Looks like the first post is just the upgrade files but I'd like to download the whole thingie. laugh
There are 2 links, one is the cgi files, the other are the flash files. For a new install, just download both smile
Quote
quote:
Originally posted by AllenAyres:
once 6.6 is final, yes smile
laugh
bah tipsy

ok, I'll look at it smile
Posted By: RandyM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/15/2003 7:11 AM
Quote
quote:
Originally posted by AllenAyres:
bah tipsy

ok, I'll look at it smile
That evil accountability thing rears it's ugly head.
wink

heheh... working on a re-design for the site, it's keeping me busy smile
Posted By: RandyM Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/15/2003 7:18 AM
I know you're busy, I just had to throw that in. I may not get a new site done till UBB v7 the way things are going. time is way short right now.
Posted By: d-talk Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/17/2003 7:02 PM
Hi,

when I donwload the zip-file, there are now files at the cgi-bin and variables-folder...

What can I do?

Thanks
d-talk
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/17/2003 10:57 PM
put the cgi's in the cgi dir, and your variable files in the variable dir lol, it should be self explanitory, your board has: noncgi, cgi, variable directories, your variables are generally in the same dir as your cgi's.
Posted By: d-talk Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/18/2003 12:56 AM
Hi,

I said there are no files in your downloadable zip...
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/18/2003 2:57 AM
::points::

Quote
quote:
Originally posted by d-talk:
Hi,

when I donwload the zip-file, there are now files at the cgi-bin and variables-folder...

What can I do?

Thanks
d-talk
there isn't "the" zip file, theres two, if you are a new install you need to get BOTH files.
Posted By: d-talk Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/18/2003 5:44 PM
Is there any possibility to ad more games?

Thanks
d-talk
Yes, just go to miniclip.com and download some
Posted By: d-talk Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/20/2003 6:17 PM
Hello,

how can I add more Games at the index at games.cgi?

Thanks
d-talk
find the game you like, upload it and a .gif file representative of the game (use the same name for each game.gif / game.swf smile
the full format for it is.

for the game allen.swf

upload allen.swf and allen_bigicon.(gif/jpg)

make sure it's all in lowercase letters
Quote
quote:
Originally posted by Weird Al:
hey Allen, you wouldn't be able to make a version that worked with 6.6's universal headers etv, would you? smile
Have been checking this out, it should already work with 6.6, as I'm calling $Header and $standard_title_table , nada else for the top smile Am I close?

tipsy
smile doesn't, tried it with the compact headers templates to test, it stays the old way

EDIT: Wow, 2 posts from 15000, congrats thumbsup
That is probably what the problem is, the compact headers. I haven't tested it with them. Do you have a link?
not any more, I tested it a while ago on my 6.6 Beta 1 board. I just know it didn't work smile
Posted By: LK Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 09/25/2003 3:55 PM
yeah, it doesn't work with compact headers because it relies on the universal headers, but instead of using the universal headers games.cgi makes its own header..
hmmmm... ok, it calls $header for its header, mebbe that ain't good enough anymo tipsy

I'll test it and fix tonight smile
ok, no changes to files:

https://www.ubbdev.com/ubbcgi/games.cgi

It looks a little funny because we use css here, but the headers/etc work fine tipsy
If you want, I'll post a css version later on, I'll be doing it for me tonight
um... if no difference in code... why 2.2.3?

smile and where's the new zip?
ok, I've uploaded my current files, it works here, so give it a shot. Unzip, set your url's/path's, upload and set permissions smile
I leave the Size.pm right? not upload it
yes, upload... it determines the size of your flash files.

It is a bit buggy tho, it doesn't work 100% on all games, some don't work for some reason
I'm downloading my server error log, I get a server error
ok, I got that fixed.

This requires the wordlets mods, which I hadn't installed yet

I uploaded the Size.pm to the cgi-bin/Modules folder, but I still get

Code
Can't locate Image/Size.pm in @INC (@INC contains: ./Modules . . 
what did I do?

[edited for screen width]
keep the Modules/Image/size.pm structure in place (when unzipping you should set folder structure to remain unchanged smile
got it smile

any change of getting a minimum size? one of my games is now 1px*1px
that's the one with the bug, not sure if it's a bug with the flash file or the size.pm smirk The only fix right now it to replace the bad one with one that works smirk
I wrote a fix that will detect if the bug is in effect, and if it is, default to a certain dimension.

Code
find:
# game_max_width: Maximum game width. The height will be calculated from this option. If you want to show the games in their original sizes, set this to zero.

add after:
# bug_fix_width: The width for any games will fall victim to the bug
# bug_fix_height: The width for any games will fall victim to the bug

find:
members_only => 0,
game_max_width => 600,

add after:
bug_fix_width => 400,
bug_fix_height => 400,

find:
if ($max and $width > $max) {
$height = $height / ($width / $max);
my $tmp = int $height;
if ($height - $tmp > 0.5) {
$height = $tmp + 1;
} else {
$height = $tmp;
}
$width = $max;
}

add after:
if ($width == '') {
$width = $opt{bug_fix_width};
}

if ($height == '') {
$height = $opt{bug_fix_height};
}
smile just set those 2 numbers to your desired dimensions for buggy games and voila smile
thank you Weird laugh

I'll update the files hopefully tomorrow smile
I wrote a mod for this mod. If you want to be able to customize the titles of games via wordlets, do these steps.

Disclaimer: This will only work if all the files in your noncgi/games/ folder all COMPLETELY lowercase. Not a single captital letter in any file, that means both the images and the swf file itself


In games.cgi
Code
FIND:

<font color="$vars_style{TableStripTextColor}" size="$vars_style{TextSize}" face="$vars_style{FontFace}"><b>$game</b></font></td></tr>

REPLACE WITH:

<font color="$vars_style{TableStripTextColor}" size="$vars_style{TextSize}" face="$vars_style{FontFace}"><b>$vars_wordlets_games{$game}</b></font></td></tr>

FIND:
$vars_wordlets_games{games_game}: $game

REPLACE WITH:

$vars_wordlets_games{games_game}: $vars_wordlets_games{$game}
FIND:

printf $opt{img_temp}, $name,"$opt{url}/$_",ucfirst lc $name,$name;

REPLACE WITH:

printf $opt{img_temp}, $name,"$opt{url}/$_",$vars_wordlets_games{$name},$vars_wordlets_games{$name};
Next, open vars_wordlets_games.cgi and follow this pattern to add the wordlets

Code
    q!the_name_of_the_swf_file_without_extension_LOWERCASE! => q!THE ACTUAL PHRASE YOU WANT TO SHOW UP!,
so if I had a game with the files...

alalalbigicon.jpg and alalal.swf (notice that is all lowercase), then you should add

Code
    q!alalal! => q!The AlAlAl Game!,
Voila smile
thanks Al, when I get a bit-o-time™ I'll update the mod smile
Posted By: d-talk Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 12/29/2003 12:42 PM
Hi,

I have a little problem with the games mod,

http://www.ubb-test67.board-world.net/cgi-bin/games.cgi

Can someone tell me what's that?
there's a WHOLE LOT of porting needed to work with 6.7 I've got it working on my board mostly, but Allen says he's gonna update it
Posted By: d-talk Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 12/29/2003 1:09 PM
Ok, thank you Al, than I have to wait :-(
files updated for 6.7 thumbsup To upgrade, set your paths/urls in the games.cgi file options and upload smile

demo: https://www.ubbdev.com/ubbcgi/games.cgi
Allen, look at the urls for the main button line. that's the error I was telling you about
Posted By: d-talk Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 12/30/2003 7:02 PM
Thank you Allen thumbsup
Quote
Originally posted by Weird Al:

Allen, look at the urls for the main button line. that's the error I was telling you about

hmmm... ok, I'll dig a bit and see where the probem is smile
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 01/03/2004 11:59 AM
Allen, it's lookin like 2.4 isn't Mozilla capable, whereas 2.2.3 is...

2.2.3 (works in mozilla) https://www.ubbdev.com/db/cgi/games.cgi
2.4 (doesn't work in mozilla) https://www.ubbdev.com/ubbcgi/games.cgi
I blame strict!
ok, thanks to charles for some pointers, 6.7 zip file has been updated to fix the mainbuttons line and the mozilla issue smile
breadcrumbs fixed with wierd al's help smile Zip updated smile
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 01/04/2004 10:16 AM
YEY, i can play dumb java games in mozilla agian! I shoudl get shouts for tellin al and allen :x...
tipsy
uh... Allen... Weird... not... Wierd tipsy
tipsy

kinda a cross between weird and wired tipsy
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 01/05/2004 7:22 AM
Weird Al is Wired...
Ya know Allen, this thread is getting kinda long, maybe you should start a new one (or we could stop replying, but seriously, how likely is that? tipsy )
hmmm... maybe for a v3 or something. Not sure what would rate a bit change like that tho smile
I have a clue...

ultimatebb.cgi?ubb=games

so you could show what game a person was playing, and you wouldn't have the issue with all the includes etc smile
but then those who beta-test can't use it and you'd have to modify your files everytime you installed it/upgraded your forum. Installation now is just a matter of uploading the files and setting permissions smile
they'd still have the 2.4 version tipsy

You even said there's no where else you can think of going with this version
hmmm... be my guest if you like smile
minor updates for 6.7 smile
how minor? I've tweaked out my copy and wouldn't want to redo it if you only added a
tipsy
If it's working for you under 6.7, you probably don't need to update. I removed an unused sub, and tweaked a couple other spots that I don't remember right now - the files are on my other computer at work smile

What changes did you make? Would they be useful in the released copy?
http://www.alforadmin.com/cgi-bin/games.cgi

wordletized stuff, gave some instructions, etc

smile if you get an error saying you have to join, just join, it won't kill you
Updated with more code cleanup for 6.7 smile
Ok ... for the idiots. I could never get the hack to work after the upgrade.

I was wondering if you could repack the whole shabang for ubb 6.7? That way we can just downlaod the whole package and upload everything over again.
There's a link in the first post for 6.7 files :

https://www.ubbdev.com/ubb/upload/00000494/games67.zip

what kinda probs are you having?
Make sure you reentered your paths, etc in the new games.cgi
Ok, how do you create the link in the upper right menu again?

I tried the instructions in the first couple pages of this topic but they don't seem to work for 6.7.
Sure, can you post a link to your games page? Will help with the diagnosis/repair smile
Quote
Originally posted by AllenAyres:

Sure, can you post a link to your games page? Will help with the diagnosis/repair smile

Yes, and also, could you allow unregistered users to view it, as it's telling me to log in tipsy
Quote
Originally posted by AllenAyres:

Sure, can you post a link to your games page? Will help with the diagnosis/repair smile
http://coloradof-body.com/cgi-bin/games.cgi

THAT is working fine, the upper menus aren't and also on the main page

maybe both you guys can fix it. i DO not have vars_wordlets_mod.cgi installed, if i do, it's a left over from a bunch of upgrades since version 6.XX.

i want the main page, http://coloradof-body.com/cgi-bin/ultimatebb.cgi to have the |games| link. i also would like to have the /cgi-bin/index.cgi page to have all the links also, i am missing several, also the same with /cgi-bin/links.cgi.

anyways, i know this is a lot of work BUT, i'm sure several people will be asking the same question once they get these great hacks installed.

for both you guys, logon is "test", password is "icle" tipsy
In links.cgi, add

Code
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_calendar.cgi");
with the lines that look like it.

oh, and install vars_wordlets_mods and then do what I said tipsy
Where can I download vars_wordlets_mod at? And I do not want to use multihack since I'm so dumb. frown

Also, I need the statistics link to show up on the index.cgi page.

I also need the games.cgi and links.cgi to show up in the menu on the index.cgi and ultimatebb.cgi page.

Just think when you are done with me! Next person to ask these questions, just link this topic! tipsy
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 03/20/2004 10:47 PM
https://www.ubbdev.com/ubb/ultimatebb.php/topic/33/71.html#000000
Quote
Originally posted by ¥øüñg Tæ ßÿüñ:

Originally posted by AllenAyres:
[qb]
Sure, can you post a link to your games page? Will help with the diagnosis/repair smile
[/qb]
http://coloradof-body.com/cgi-bin/games.cgi

THAT is working fine, the upper menus aren't and also on the main page

maybe both you guys can fix it. i DO not have vars_wordlets_mod.cgi installed, if i do, it's a left over from a bunch of upgrades since version 6.XX.

i want the main page, http://coloradof-body.com/cgi-bin/ultimatebb.cgi to have the |games| link. i also would like to have the /cgi-bin/index.cgi page to have all the links also, i am missing several, also the same with /cgi-bin/links.cgi.

anyways, i know this is a lot of work BUT, i'm sure several people will be asking the same question once they get these great hacks installed.

for both you guys, logon is "test", password is "icle" tipsy



Any updates on these? Getting links.cgi and games.cgi show up in ultimatebb.cgi menu and THEN afterwards getting all the menu links in ultimatebb.cgi to show up in links.cgi and games.cgi?

TIA
ok, to fix the games links, have you downloaded the latest files for 6.7? That bug was fixed recently if I remember right smile

Links.cgi needs work probably before it's ready for prime time frown
Quote
Originally posted by AllenAyres:

ok, to fix the games links, have you downloaded the latest files for 6.7? That bug was fixed recently if I remember right smile

Links.cgi needs work probably before it's ready for prime time frown
Yes, the games are working fine ... http://ColoradoF-Body.com/cgi-bin/games.cgi. I just need to add the 'statistics' link to the games.cgi page and also THEN add the games.cgi link to the ultimatebb.cgi menu page.

You can take a look at my site and you'll see what I mean.

The ultimatebb.cgi menu page is missing 'games'. The games.cgi menu is missing 'statistics'.
Posted By: Gizmo Re: [6.4 - 6.5 - 6.6 - 6.7] [beta] Games 2.5.1 - 03/24/2004 12:10 AM
the ultimatebb.cgi menu is missing games as the link isn't added to public_common.pl on install.

The games menu isn't loading statistics due to the on/off code that the statistics link uses, easy fix, just load up public_common and edit out the on/off portion of the statistics link...

All this can be found by searching public_common.pl for "# FAQ" and looking down...
Quote
Originally posted by Gizzy:

the ultimatebb.cgi menu is missing games as the link isn't added to public_common.pl on install.

The games menu isn't loading statistics due to the on/off code that the statistics link uses, easy fix, just load up public_common and edit out the on/off portion of the statistics link...

All this can be found by searching public_common.pl for "# FAQ" and looking down...

*hugs Gizzy*

I've been bashing my head all day trying to figure out why it'd do that to him. I forgot about that switch.
Quote
Originally posted by Gizzy:

the ultimatebb.cgi menu is missing games as the link isn't added to public_common.pl on install.
Yup ... so what do I add into public_common.pl. I know you're supposed to add some 'push' comment but the ones here in this topic doesn't work.
install vars wordlets mods?
Quote
Originally posted by Gizzy:

The games menu isn't loading statistics due to the on/off code that the statistics link uses, easy fix, just load up public_common and edit out the on/off portion of the statistics link...

All this can be found by searching public_common.pl for "# FAQ" and looking down...
Err ... off and on ... huh?


**************************************************
if ($vars_statistics{MBL}) {
# statistics
push(@items, qq($vars_wordlets{'statistics_pntf'}));
}
**************************************************
What do I need to modify?
Quote
Originally posted by Ian Spence:

install vars wordlets mods?
Well I didn't install it. It looks like it's in there though from a previous install. vars_wordlets_mods.cgi ... correct? It's in there.

*************************************************
%vars_wordlets_mods = (
q~ML_category~ => q~Category:~,
q~ML_category_all~ => q~Display All~,
q~ML_col_aim~ => q~AIM~,
q~ML_col_birthday~ => q~Birthday~,
q~ML_col_email~ => q~Email~,
q~ML_col_homepage~ => q~Homepage~,
q~ML_col_icq~ => q~ICQ~,
q~ML_col_interests~ => q~Interests~,
q~ML_col_joindate~ => q~Join Date~,
q~ML_col_location~ => q~Location~,
q~ML_col_memnum~ => q~Member #~,
q~ML_col_online~ => q~Online~,
q~ML_col_pm~ => q~PM~,
q~ML_col_postnum~ => q~Post #~,
q~ML_col_postnum_posts~ => q~posts~,
q~ML_col_pubname~ => q~Public Name~,
q~ML_error_no_results~ => q~No results were found for what you requested, please try another query.~,
q~ML_error_search_invalid~ => q~Invalid searchkeys.~,
q~ML_error_sort_incorrect~ => q~Incorrect sort type selected, please try again.~,
q~ML_image_next~ => q~Next~,
q~ML_image_previous~ => q~Previous~,
q~ML_memberlist~ => q~Memberlist~,
q~ML_memberlist_link~ => q~memberlist~,
q~ML_memberlist_settings~ => q~Memberlist Settings~,
q~ML_search~ => q~search:~,
q~ML_searchby~ => q~Search By:~,
q~ML_searchby_aim~ => q~AIM~,
q~ML_searchby_birthday~ => q~Birthday~,
q~ML_searchby_icq~ => q~ICQ~,
q~ML_searchby_interests~ => q~Interests~,
q~ML_searchby_joindate~ => q~Join Date~,
q~ML_searchby_location~ => q~Location~,
q~ML_searchby_postnum~ => q~Post #~,
q~ML_searchby_pubname~ => q~Public Name~,
q~ML_searchby_usrnum~ => q~Member #~,
q~ML_sort~ => q~Sort:~,
q~ML_sort_birthday~ => q~Birthday~,
q~ML_sort_joindate~ => q~Join Date~,
q~ML_sort_online~ => q~Online~,
q~ML_sort_posters~ => q~Posters~,
q~ML_sort_postnum~ => q~Post #~,
q~ML_sort_pubname~ => q~Public Name~,
q~ML_sort_top~ => q~Top~,
q~ML_sort_usrnum~ => q~Member #~,
q~ML_text_pages~ => q~Pages:~,
q~ML_text_results_out_of_a_possible~ => q~results out of a possible~,
q~ML_text_search_returned~ => q~Search returned~,
q~mod_wordlets~ => q~Modifications Wordlets~,
);
1;
*************************************************
You still have to install it, just don't overwrite that file
Oh boy. Is there a non multihack file I could use?
change

Code
 if ($vars_statistics{MBL}) {
# statistics
push(@items, qq(<a href="$ULTIMATEBB{'ubb=statistics'}">$vars_wordlets{'statistics_pntf'}</a>));
}
to

Code
# statistics
push(@items, qq(<a href="$ULTIMATEBB{'ubb=statistics'}">$vars_wordlets{'statistics_pntf'}</a>));
Quote
Originally posted by Ian Spence:

change

Code
 if ($vars_statistics{MBL}) {
# statistics
push(@items, qq(<a href="$ULTIMATEBB{'ubb=statistics'}">$vars_wordlets{'statistics_pntf'}</a>));
}
to

Code
# statistics
push(@items, qq(<a href="$ULTIMATEBB{'ubb=statistics'}">$vars_wordlets{'statistics_pntf'}</a>));
Hmm ... no workie. Also now I notice that when I hit 'calendar', the 'statistics' isn't there. yuck.
Ok, I added:

# statistics
push(@items, qq($vars_wordlets{'statistics_pntf'}));

to public_common.pl. on the main page of ultimatebb.cgi, 'statistics' is NOW gone, used to be there not anymore after changing the coding.

NOW, all I also need is the 'games' link on all menus.

We're almost there. This whole topic will be good for the archives.

Also, again, where can i get the non mhx version of vars wordlets?
uh... I get
Code
my profile | directory login | register  | search | faq | calendar | statistics | forum home
for both the games and the calendar.
Quote
Originally posted by Ian Spence:

uh... I get
Code
my profile | directory login | register  | search | faq | calendar | statistics | forum home
for both the games and the calendar.
my profile | directory login | register | search | faq | calendar | | games | statistics | forum home

is what i am looking for and when you click on any of those links, the same ALL links show up.
https://www.ubbdev.com/ubb/ultimatebb.php/topic/33/71.html#000000

install mod wordlets
Ok, we're almost there. All the links show up EXCEPT, go to the main ultimatebb.cgi and click on FAQ, the 'games' link is not there.

Also, go back to the main page, ultimatebb.cgi and click on 'games'. when you get to the games page, the 'games' link is gone and also all the menu links end in /cgi-bin/.
ok, here are the fixes.

Allen, pay attention to the one fix as it needs to be updated in the 6.7 zip.

In games.cgi
FIND:

Code
$MainButtonsLine = &MainButtonOptions;
ADD ABOVE!!:
Code
tie(%ULTIMATEBB, 'UBB::TiedURL');
Now, a few lines later is

Code
tie(%ULTIMATEBB, 'UBB::TiedURL');
Delete it.

As for the empty link,
FIND:
Code
	%vars_wordlets_games %opt $indexurl
ADD ON NEXT LINE;
Code
	%vars_wordlets_mods
FIND:

Code
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_games.cgi");
ADD AFTER:
Code
&RequireCode("$vars_config{VariablesPath}/vars_wordlets_mods.cgi");
smile those should fix everything
6.7 zip updated with bugfixes smile
just to clarify - does this mod steadfastly require the wordlets mod to be installed first? or is previous conversation just a special situation?
special situation
zip file updated with new size.pm module - doesn't really mean much to this mod at least not yet tipsy

http://search.cpan.org/~rjray/Image-Size-2.992/Size.pm
just a reminder, free games can be found here:

http://www.miniclip.com/Downloads.htm

smile
© UBB.Developers