Docskillz

The Good Stuff => SMF Arcade Support => Topic started by: dwd2000 on January 25, 2015, 11:12:11 PM

Title: Arcade point system
Post by: dwd2000 on January 25, 2015, 11:12:11 PM
Hi folks:
Before Jeza disappeared, he was working on a points system for the arcade.
A player got so many points for top score, so many for second, and again for third.
Players were ranked by points, and not just high scores.
It would actually be possible for someone without the most high scores to be ranked higher.
I had the hack on my computer, but it was 2 or 3 hard drives ago.

Does anyone have the hack so we can try to make it work?

Speaking of Jeza, does anyone know why he's not online any more?
Title: Re: Arcade point system
Post by: Skhilled on January 26, 2015, 09:51:54 AM
Quote from: dwd2000 on January 25, 2015, 11:12:11 PM
Hi folks:
Before Jeza disappeared, he was working on a points system for the arcade.
A player got so many points for top score, so many for second, and again for third.
Players were ranked by points, and not just high scores.
It would actually be possible for someone without the most high scores to be ranked higher.
I had the hack on my computer, but it was 2 or 3 hard drives ago.

Does anyone have the hack so we can try to make it work?
Well, I used to have a copy but deleted it from my hd maybe 2 years ago while cleaning out old programs. What Jeza created worked off of a SMF Points mod (I forget the actual name of the mod) created my Daniel13 (or was it 14 or 15?). Anyway, Daniel dropped the points mod and had left SMF. Without the points mod being updated anymore, Jeza dropped support for his arcade points mod.

So, if you want to do it you'll have to update a points mod like the outdated one here:

http://custom.simplemachines.org/mods/index.php?mod=1741

wmd2005 may still have a copy of it and may be willing to help. He's now Lead Customizer at SMF.

Then, you'll have to create your own mod for the arcade. Yeah, a lot of work. LOL

Quote from: dwd2000 on January 25, 2015, 11:12:11 PM
Speaking of Jeza, does anyone know why he's not online any more?

He had RL problems and dropped off the grid... I hope he is OK.
Title: Re: Arcade point system
Post by: dwd2000 on January 28, 2015, 01:11:09 PM
Found the old point system script. :)      (attached)

It obviously doesn't work "as is", but might if I took the time to do all the manual changes.

If anyone here would like to tackle it, it might be of value to someone other than me.
Title: Re: Arcade point system
Post by: Skhilled on January 29, 2015, 08:30:51 AM
Like I mentioned, you'll need to get the SMF points mod working first...if I remember correctly. Then Jeza's arcade addon needs to be fixed to work with it.

Both predate the SMF hooks system that is now in place, I believe. So, you'll probably need a lot of code rewriting. I'm not experienced enough to do that and is why I suggested you talk to wmd2005. Or maybe Underdog may wish to help but I do know he's quite busy.

EDIT: Just for the heck of it I tried to install it and almost half of it gave "Test Failed" for the files and it couldn't even find /Themes/default/style.css which has been moved to /Themes/default/css/style.css. A lot of SMF coding was moved around to other files and it seems the arcade coding and files has changed to the point it cannot find most of the coding in the arcade files themselves.

I'm thinking a total rewrite is in order...or a lot of work is needed.
Title: Re: Arcade point system
Post by: dwd2000 on January 29, 2015, 01:38:19 PM
I got the same errors when I tried to install it too.  :(

I may have time to work on it a bit.
Jeza and I had it working a while back on our test sites, and didn't need the points mod, so this maybe a separate script.

Anyone else interested in it?
Title: Re: Arcade point system
Post by: Skhilled on January 30, 2015, 08:48:56 AM
You are probably right and i'm thinking of somwthing else that used the points mod.
Title: Re: Arcade point system
Post by: dwd2000 on March 14, 2015, 08:48:26 PM
Got it working with WAMP,  SMF 2.0.9, the Emulator, manual edits and a few four letter words.

One problem I can't quite figure out is that the "Leaderboard" is just showing code, rather than the actual leaderboard.

Title: Re: Arcade point system
Post by: Skhilled on March 14, 2015, 09:25:51 PM
Coding and four letter words go hand and hand.  :hah:

Something is not closed properly...

EDIT: I did a quick search of the code and the code showing is in JezaList.Template.php at the beginning. You probably did not close something properly in used improper nesting.
Title: Re: Arcade point system
Post by: dwd2000 on March 14, 2015, 10:54:33 PM
Actually, the only coding I did was the manual edits when installing it.
Damn it Jim...I'm a tweaker, not a coder.  :rofl1:
Title: Re: Arcade point system
Post by: Skhilled on March 15, 2015, 06:53:06 AM
LOL! I've been so busy with making this lasagna earlier that I've been getting everything all wrong today. LOL

Code only shows onscreen when something is not closed properly or maybe put in the wrong place.

This file is no longer in the right place:

./Themes/default/style.css - it is now in ./Themes/default/css/style.css

That tells me the code was written before SMF 2.0 Final because that is when that particular change took place. So, the many errrors may be because of the many coding changes to SMF and the Arcade when SMF 2.0 went final. Which means the points system possibly needs to be rewritten or have those parts of the coding changed.

And I've got a ton of errors tring to install it. I didn't try to fix them, just want to see how many there were.
Title: Re: Arcade point system
Post by: Skhilled on March 15, 2015, 07:12:42 AM
OK, I took a look at the first "Test Failed" I got. It is for /Sources/ArcadeList.php. In the first image below, the points code is looking for:

$txt['arcade_guest']

But as you can see in the 2nd image, the arcade coding has changed to:

$txt['guest']

So, you would need to change all instances of the points system code to:

$txt['guest'] - to match the arcade's coding changes.

Keep in mind that is only one issue...there are many others, I assume. This still does not explain the onscreen coding you are getting but does point out one of the many possible problems with this old code.
Title: Re: Arcade point system
Post by: Skhilled on March 15, 2015, 08:32:18 AM
Ok, found out the file path in install.xml is wrong for the /Themes directory. In the file it is:

<file name="$themes_dir/default/index.template.php"> - for instance. When it should be:

<file name="$themedir/default/index.template.php">

All instances in install.xml need to be changed to reflect this...

EDIT: Disregard the above...  :baghead:

I compared one of Underdog's install.xml files with the one from points to make sure the paths were correct after installing it a few times and getting the same errors.  ???

The install.xml files had old incorrect paths and is why some of the code was not installing properly. There are still some edits where the code is there and it should work but it doesn't install it correctly and gives Test Failed's but I can't figure out why atm.

Anyways, here's what I fixed so far but it's still not right.
Title: Re: Arcade point system
Post by: dwd2000 on March 15, 2015, 10:20:04 PM
Quote from: Skhilled on March 15, 2015, 07:12:42 AM
OK, I took a look at the first "Test Failed" I got. It is for /Sources/ArcadeList.php. In the first image below, the points code is looking for:

$txt['arcade_guest']

But as you can see in the 2nd image, the arcade coding has changed to:

$txt['guest']

So, you would need to change all instances of the points system code to:

$txt['guest'] - to match the arcade's coding changes.

Keep in mind that is only one issue...there are many others, I assume. This still does not explain the onscreen coding you are getting but does point out one of the many possible problems with this old code.


Already found this. :)

There was also one for the menu and a couple more.
It said "Couldn't find file", for the CSS, so I skipped it, hoping it wouldn't be much of a problem.

As for the different versions of SMF, I emulated the the install to compensate.
Just don't ask me to remember the emulated versions, but I did find the info within the install files.
Title: Re: Arcade point system
Post by: dwd2000 on March 15, 2015, 11:09:50 PM
Quote from: Skhilled on March 15, 2015, 06:53:06 AM

This file is no longer in the right place:

./Themes/default/style.css - it is now in ./Themes/default/css/style.css


Actually, there is no "style.css". (index.css though)
There's an "arcade.css" in the CSS folder, so I added the code to that.
Title: Re: Arcade point system
Post by: Skhilled on March 16, 2015, 09:11:32 AM
Yes, I meant to post that too yesterday but was busy and forgot. Anyhoo, I changed the install file to index.css instead. I totally forgot about arcade.css. LOL
Title: Re: Arcade point system
Post by: dwd2000 on March 16, 2015, 12:08:08 PM
Here's one:
I put:


loadTemplate('Leaderboard');
call_user_func('leaderList');


in a Simple Portal php block and got the same error.
Title: Re: Arcade point system
Post by: Skhilled on March 17, 2015, 09:10:37 AM
Well, if the mod doesn't work, I seriously doubt the block will. LOL
Title: Re: Arcade point system
Post by: dwd2000 on March 17, 2015, 11:45:32 PM
Quote from: Skhilled on March 17, 2015, 09:10:37 AM
Well, if the mod doesn't work, I seriously doubt the block will. LOL

Actually, I was just trying to mention that it might be the Leaderboard file that might be wrong, but I can't see anything that might cause it.

Again, I'm not a coder.
Title: Re: Arcade point system
Post by: dwd2000 on March 18, 2015, 03:52:13 AM
This might help.

I WAMPed a fresh install of the newest SMF, the arcade, PDL, and Beta7.
Yes, Installed Beta7 after PDL was installed.

With the exception of a double "function check_empty_folder" installation in the "Subs-ArcadeAdmin" file, it installed nicely.
Yes, lots of errors, but as I went through them, I was finding that the program was searching for already edited code, so I continued.

I got the same errors, but noticed that some things were not lining up properly. (see attachments)
The same things weren't lining up in my previous install either.
It may be just a missing div or table tag.
Title: Re: Arcade point system
Post by: Skhilled on March 18, 2015, 10:23:42 AM
Personally, I think there more to it than just the leaderboard file but could be wrong. If I get some time this weekend I'll try to go over things a bit more. However, I do have to try and get my PC parts (or some of them) so I can stop this rebooting and lockups.  :censored: Then, I'll have more time to concentrate.

I'm thinking there may be more strings/constants that may have changed and need to be tracked down like the "guests" one.
Title: Re: Arcade point system
Post by: dwd2000 on March 19, 2015, 11:47:32 PM
LEADERBOARD WORKS :) :) :)

Very top of the page.

Added "php" to "<?" = <?php

Now need to find out why some things aren't lining up properly.
I'm now thinking it maybe a font or padding or margin thing.

Title: Re: Arcade point system
Post by: Skhilled on March 20, 2015, 08:57:19 AM
LMAO! Of couse, it was something simple...
Title: Re: Arcade point system
Post by: dwd2000 on March 27, 2015, 04:25:59 AM
It's now live on my site.
Just a couple very minor bugs. (Spacing mostly)
Title: Re: Arcade point system
Post by: Skhilled on March 27, 2015, 08:43:16 AM
You are also missing 2 images...star2.gif and upshrink.gif
Title: Re: Arcade point system
Post by: Chen Zhen on March 30, 2015, 06:40:53 PM

Just to note that any instance of:  /$themes_dir/default/
should have been: /$themedir/
in both install xml files

(you have to also omit the directory of default because $themedir should do all theme directories)

Regards.
Title: Re: Arcade point system
Post by: Skhilled on March 31, 2015, 04:56:16 AM
Ah! Thanks! I knew I was close.  :rofl1: