Arcade Download 1.6

us Allon Prooit 4 years ago

This component is a basic rewrite of the original "games" component. It features DIABLO, DOOM II, and a dosbox interface that gives you numerous other games. You can easily modify it to feature other games that you can embed by changing the arcade.php file to link to them.

v1.0 - Includes Diablo, Doom II, and a link to DosBox games.
v1.1 - Added a full screen button for Diablo.
v1.2 - Complete rewrite. Made two separate pages for Diablo and Doom II (with DosBox). Full screen buttons for both games now. Installs an Arcade menu item with a submenu for the games. Easily change out the games and code for even more games in the arcade with this easy to edit and use component!
v1.3 - Added a 3rd game port to Diablo 2! Game only works on desktop and requires present or previous Diablo 2 purchase.
v1.4 - Added a 4th game to the line up, the original DOOM!!! Plus, altered the code so that Doom and Doom II are now mobile friendly.
v1.5 - Removed exorbitant code and added special icons for the games.
v1.6 - Added Duke Nukem, Wolfenstein, The Legend of Zelda, and Sonic the Hedgehog to the games roster!






German Michael Zülsdorff Replied 3 years ago

Yeah, you're almost done!
Change your css to

.menu-section-item-diablo:before {
    content: '' !important;
    background-image: url("<?php echo ossn_site_url();?>components/Arcade/images/diablo.png");
    background-repeat: no-repeat;
    height: 25px;
    width: 25px;
    margin-right: 7px;

Depending on the pngs you may have to twist the dimensions and margins a bit, but basically that's the way to address image icons.
And don't forget to remove your undefinded $icon lines from the com file - PHP8 will bomb out with a code like that.

us Allon Prooit Replied 3 years ago

Just uploaded a new version 1.4 with small code addition to show basic font awesome icons to the left of the games. Woohoo! Now, if someone can please help me make it show the special icons I made for the included games that would be awesome!

us Allon Prooit Replied 3 years ago

@~Z~ Man ... ok so I've been able to make a basic font awesome icon show by putting in the proper statement in the css page arcade.php. It reads like this...

.menu-section-item-diablo:before {
font-family: FontAwesome;
content: "\f11b"; }

However, I want to use my special icons located in the images folder. How do I change the content here to do such?

German Michael Zülsdorff Replied 3 years ago

Hmm ... maybe I'd better login as Arsalan Shah next time before giving advices? ;)

Anyway, the next step is right-clicking that '>' in front of a game name and choosing 'Inspect'
This should open the browser's developer console and point you to a <li class='.....'> What's the name of that class?

us Allon Prooit Replied 3 years ago

@Arsalan ... Thanks for clearing that up. I have uploaded a corrected version that has ossn removed from the function names.

Indonesian Arsalan Shah Replied 3 years ago


It means that you should not name functions like ossn_arcade_init or ossn_arcade_pages name them like arcade_init or arcade_pages

us Allon Prooit Replied 3 years ago

@~Z~ Man ... Not sure what you mean by there being any conflict with regard to functions on this one. There are only 2 functions defined in this component...

function ossn_arcade_init()


function ossn_arcade_pages($pages)

and that's it! There is no conflict with any other function and will likely never be. As for the issue with $icon, I've already indicated that this is a minor coding issue that I need help with. Any help is appreciated!

German Michael Zülsdorff Replied 3 years ago

again please read

PHP doesn't allow to use the same function more than once, and it's not acceptable for Arsalan to browse dozens of third party components for already exitsting functions with the same name if he wants to implement a new core function.

Next: What should the statement 'icon' => ($icon), do? I don't see $icon ever getting initialized.

us Allon Prooit Replied 3 years ago

Just uploaded a slight variation. This one has extra special icons for all the games. Still not able to get them to show. Any help is appreciated. I'd even be willing to throw some coin at anyone who can help. Other than that, I renamed the game Diablo 2 to Diablo II for consistencies sake. It all works pretty good!

us Allon Prooit Replied 3 years ago

Just uploaded a special v1.3 that now has 3 games... still having icon issues. Need help!
@David ... I haven't recieved your email yet. It's been a little while. Can you please resend? If you've found the solution please feel free to share here. Thanks!


Developer: Allon
License GPL v2
Type: Games
Requires Ossn Version : 5.6
Latest Version: 1.6
Last Updated 2 years ago
Repository Url View Repository