[SMF Arcade 2.6 Rc 1][Skin/PDL] Auto assign Batch of games to a category

Started by thedukeisnotdead, November 09, 2014, 01:33:49 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

thedukeisnotdead

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()
);

Skhilled

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/

thedukeisnotdead

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/

Thanks Skhilled..

The cosmetic changes look great and installs nicely

thedukeisnotdead

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

Skhilled

Let me know how it turns out. Maybe we can add it to the arcade.  :happy:

thedukeisnotdead


thedukeisnotdead

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.

Skhilled

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/

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.

MC73

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.
Pay it forward, How many people have you helped out today.

Skhilled

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...

MC73

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:
Pay it forward, How many people have you helped out today.

Skhilled

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.