Docskillz

The Good Stuff => SMF Arcade Support => Topic started by: thedukeisnotdead on November 09, 2014, 01:33:49 AM

Title: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: thedukeisnotdead on November 09, 2014, 01:33:49 AM
Hi,

The short of it is, I add games to our Arcade in batches. I also would like to set the category at install time.

I change the first number assigned in the array from 0 to x depending on the Cat number.

The problem is, when you go into the arcade, the number of games in that category do not get updated during the install.

Im using Skin/PDL for Arcade RC2.

Im assuming the first piece of code below set num_games to 0. Perhaps if an increment statement was used that would take care of the issue.  I am not up on php coding and am not familiar with 'num_games' => 0 being changed to increment num_games by 1.  If someone could confirm or guide me in the right direction, I would appreciate it.


Code is from Subs-ArcadeAdmin.php

Thank you in advance.

Dukie

function updateCategoryStats()
{
global $smcFunc;

$smcFunc['db_query']('', '
UPDATE {db_prefix}arcade_categories
SET num_games = {int:num_games}',
array(
'num_games' => 0,
)
);


$smcFunc['db_insert']('ignore',
'{db_prefix}arcade_games',
array(
'id_cat' => 'int',
'internal_name' => 'string',
'game_name' => 'string',
'submit_system' => 'string',
'description' => 'string',
'help' => 'string',
'enabled' => 'int',
'num_rates' => 'int',
'num_plays' => 'int',
'game_file' => 'string',
'game_directory' => 'string',
'extra_data' => 'string',
),
array(
2,
$game['internal_name'],
$game['name'],
$game['submit_system'],
'',
'',
1,
0,
0,
$game['game_file'],
$game['game_directory'],
'',
),
array()
);
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: Skhilled on November 09, 2014, 08:23:56 AM
Unfortunately, I'm not much of a coder either.  :rofl1:

That version I just made some cosmetic changes so it looks a tad better...easy stuff. The PDL/Combo mod was made by Underdog/Napalm. He may be able to help. His site is here:

http://www.web-develop.ca/ (http://www.web-develop.ca/)
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: thedukeisnotdead on November 09, 2014, 02:12:12 PM
Quote from: Skhilled on November 09, 2014, 08:23:56 AM
Unfortunately, I'm not much of a coder either.  :rofl1:

That version I just made some cosmetic changes so it looks a tad better...easy stuff. The PDL/Combo mod was made by Underdog/Napalm. He may be able to help. His site is here:

http://www.web-develop.ca/ (http://www.web-develop.ca/)

Thanks Skhilled..

The cosmetic changes look great and installs nicely
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: thedukeisnotdead on November 09, 2014, 03:04:41 PM
Actually, now that I think about it, after you install a game or games, a simple mysql row count could be done and then the category db can be updated
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: Skhilled on November 09, 2014, 04:21:03 PM
Let me know how it turns out. Maybe we can add it to the arcade.  :happy:
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: thedukeisnotdead on November 09, 2014, 11:12:01 PM
Quote from: Skhilled on November 09, 2014, 04:21:03 PM
Let me know how it turns out. Maybe we can add it to the arcade.  :happy:
Will do..

:happy:
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: thedukeisnotdead on November 25, 2014, 11:08:24 PM
Well, SMF forum is telling me to come over here for support.

Im assuming 2.1x is going to render the arcade unusable, in its current coding.
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: Skhilled on November 26, 2014, 08:03:57 AM
Quote from: thedukeisnotdead on November 25, 2014, 11:08:24 PM
Well, SMF forum is telling me to come over here for support.
Support for what you were trying to do? I could have told you they won't help. They barely help for SMF issues and they surely won't help for mods. That is why I sent you to http://www.web-develop.ca/ (http://www.web-develop.ca/)

If he doesn't want to help then you are out of luck.

Quote from: thedukeisnotdead on November 25, 2014, 11:08:24 PM
Im assuming 2.1x is going to render the arcade unusable, in its current coding.

As far as I'm aware of, SMF 2.0 mods and themes will not work with SMF 2.1 because of the many coding and database changes. That's not to say that you can't try but you will not get support at SMF for mods and themes unless they are available in their downloads and even then they may tell you to go to the creator of the mod or theme.

I have no idea if Underdog/Napalm will create another update for the arcade but I do know it is beyond my capabilities.

Besides, it would be fruitless to try to make changes for them now when SMF 2.1 currently has many bugs and features that do not work yet. Who knows what other changes they will make and how many betas they will release before it is finalized.
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: MC73 on November 28, 2014, 09:07:43 PM
I tried installing 2.6 RC1 on my local, and there has been some coding changes that make smf arcade unstable. Management area within the installation into 2.1 beta causes errors making it  unable to upload or manage games. Just thought i would through that in, just incase someone tries it on smf 2.1 beta.
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: Skhilled on November 29, 2014, 03:20:19 AM
Hey MC73. How's it going?

Thanks for the heads up. I've bee nso busy with Thanksgiving I've forgot to even install 2.1 yet. I'm going to install it now...
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: MC73 on November 29, 2014, 10:47:53 PM
Doing good here. Pretty much still helping SMF Arcade from being a dying bread still by giving a little support since it closed. Its still sad to see many sites close. Glad to see yours still going  :bow:
Title: Re: [SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category
Post by: Skhilled on November 30, 2014, 02:49:11 AM
Thanks, but I'm no coder so I have no idea how much longer I'll be able to help with supporting it. If SMF makes another upgrade that kills it I guess it's over.

I've not been happy with SMF for awhile now and have changed one of my sites to phpBB. If they keep screwing up who knows about this one.