WebDev

SMF Arcade => SMF Arcade Support + Plugins => Topic started by: Chen Zhen on July 06, 2013, 01:40:51 PM

Title: PDL/Skin Combo
Post by: Chen Zhen on July 06, 2013, 01:40:51 PM
SMF ARCADE PDL Package
For SMF Arcade v2.5 RC2


      This will add the following optional features to SMF Arcade:

Written by Underdog     



     
      After install, check the Admin / Arcade / Settings.
      Make/enable settings and features of this modification from the arcade admin settings menu.


     
PDL-Skin-Combo is for SMF Arcade v2.5 RC2



Version 1.0.3 is only necessary for those that lack the appropriate PEAR support.

Version 1.04 has some template fixes and includes PEAR support. It is advised for everyone to use this version.
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 14, 2014, 07:46:38 AM
When you switch to the Jeza Skin it breaks the template on the Stats page. I have not played any games yet but you can see it here:

http://docskillz.com/arcade/index.php?action=arcade;sa=stats (http://docskillz.com/arcade/index.php?action=arcade;sa=stats)

It is also missing the "Arcade" and "Statistics" buttons that are on the other pages. See first image.

Edit:

Also, Most Played for the Skin shows "No games available for playing" even though there are games installed but no one has played a game yet which is incorrect. It should say something like "No games played yet". See 2nd image.
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 14, 2014, 05:58:03 PM

Skhilled,

  Thanks for the report and I will take a look at those issues shortly. When I fix it a new version will be posted.
If you don't mind give it a good run through to see if I need to fix anything else prior to releasing a new version.

Thanks.
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 14, 2014, 06:32:44 PM
No problem. I am fixing up SMF Arcade RC2 version. There are a few cosmetic things out of place and I upgraded it to work with SMF 2.0.7. I was going to upgrade Jeza's Skin to work with 2.0.7 but noticed this mod and decided to use it at Beast's site instead. I figured I'd give it the once over to be sure first and noticed that. Been busy most of the day and haven't finished looking it over just yet...
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 14, 2014, 10:34:58 PM

The statistics page works fine although it will not show any data when no games have been played because it does not have any stats.
I could have it display that no games have been played.
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 15, 2014, 01:04:12 AM
Nope, does the same with stats. I played a game just to add stats to see.

http://docskillz.com/arcade/index.php?action=arcade;sa=stats
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 15, 2014, 01:20:56 AM

It is working for me, perhaps I changed something long ago on the version I have on my HDD ?

Please try the attachment and let me know if the stats page works properly on it.
This one includes some changes which you requested and the PEAR support is loaded only if those classes are not available.
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 15, 2014, 09:19:46 AM
Hmmm, I downloaded v1.0.2 since I believe I didn't need extra PEAR support. So, I've give this one a shot. :)
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 15, 2014, 10:08:38 AM
Ok, started over with a completely new forum and db. It still does it but only with the Jeza Skin. Using the default works fine. Not sure what the diff is, must be something with my server?
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 15, 2014, 04:09:38 PM
  The PEAR & PEAR5 support is only for .tar files whereas if you do not have the necessary classes loaded within PHP it will load them from supplied files. In most cases it will already be loaded into your PHP and it will not be necessary. There are a few people who had issues with that so I included it in the package.

  I should really rewrite the whole package because my coding practice has been honed in the past few years whereas I would never release something so disorganized. Jeza's template files are the worst although I did not code those & just used them as they were with the exception of adding a few things and fixing others.
It does work without error and is XHTML compliant but that's about it.

  Is this loaded on your forum? Shall I take a look at what you are referring to?



 

Title: Re: PDL/Skin Combo
Post by: Skhilled on June 15, 2014, 05:00:12 PM
It is a test site: http://docskillz.com/arcade

Registration is open atm. You should still have access to everything as before. If you need something just ask or change it yourself.

I did notice something strange in SMF that may be a cosmetic issue but with Curves only. If you go to Browse Packages where it says:"Modification Packages". You can see the titbg on the left side is not right. Never noticed that until I started testing this. The problem is that I do not see it when using my forums that I've upgraded (Docskillz, etc.) but see it on newly created forums. I'm wondering if there is a diff in coding between the upgrade and fresh install versions of SMF...
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 15, 2014, 09:22:03 PM

The stats page is showing up for me as a guest. My username doesn't seem to be in that database so I will register to test it with general permissions.

Title: Re: PDL/Skin Combo
Post by: Skhilled on June 16, 2014, 08:20:31 AM
Nope, that is a brand new site...I am the only user so far.
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 16, 2014, 07:01:00 PM

I signed on as a member and tested it whereas it seems to work fine for me.
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 17, 2014, 07:52:43 AM
Yes, it works but look at the bottom of the page...

(http://docskillz.com/arcade/stats.png)

That is what I'm talking about... I see it in all browsers.
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 17, 2014, 10:58:17 AM

Oh ok I did not know what you were referring to as I thought you meant it was not displaying any information.
I see the bottom of the template is messed up and needs to be fixed so I will do that & post another copy for you to test.
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 17, 2014, 11:21:16 AM
It looks ok on a local installation with the default theme.
Did you adjust something within the SMF Arcade package to possibly cause that?
I am using SMF Arcade 2.5 RC2 and the PDL/Skin 1.04 and it shows ok on default + 2 other custom themes.

Btw - when you edit the Arcade to release another version, delete the minesweeper game from the package.



Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 17, 2014, 11:29:41 AM

Try the plugin that is attached to this post.
Let me know if it has fixed the issue.

Regards.
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 18, 2014, 08:58:56 AM
I was using the version I had on my site...maybe there is something wrong with that one. But it does not do it until I install the combo. If I view the Stats without the combo it looks fine.

I planned on deleting all references to Minesweeper cause itself is no longer included but throws errors from it cause of the leftover code.

I'll try this one on a new forum and see...
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 18, 2014, 09:28:24 AM
Now this one works. I used v1.0.4 last time...I think. LOL I used the one in your last post and it works well now.

Hmmm, this one uses Jeza Skin but default. The other ones I tested used the default arcade skin and I had to switch to Jeza. I switched back and forth to make sure and the issue at the bottom of the page is now gone. :)
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on June 18, 2014, 10:08:01 AM

  The database values from when the mod installs remain. It defaults to the default skin only when it has not been installed prior or if that is what you had it set to from when it was previously installed.

  Yes it is fixed now although not so much for people using pretty url. Let me know if there is anything else to adjust in it.
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 18, 2014, 10:45:21 AM
Every time I installed it, it was a fresh install with a clean db except for the last time where I just deleted all arcade tables so to leave the users intact and you can still login.

Will play with it some more and see if I find anything else. But it looks great so far. :)
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 21, 2014, 08:30:00 PM
Quote from: Napalm on June 17, 2014, 11:21:16 AM
Btw - when you edit the Arcade to release another version, delete the minesweeper game from the package.

Works Ok except I can't fix the titlebg at the bottom left here:

http://www.docskillz.com/arcade/index.php?action=arcade (http://www.docskillz.com/arcade/index.php?action=arcade)

The left sides are squared and should be curved. I can fix it in index.css but that would require adding that code to main.xml...once i figure that out. LOL I would rather have it so it is incorporated into the arcade itself but whatever is needed will have to do.

Otherwise, the PDL/Skin combo seems to be working as it should. :)
Title: Re: PDL/Skin Combo
Post by: Skhilled on June 22, 2014, 07:29:11 AM
wOOOOOO hOOOOOOOOOOOOOO! Got it fixed courtesy of my friend Rocknroller!  8)

http://www.docskillz.com/arcade2/index.php?action=arcade (http://www.docskillz.com/arcade2/index.php?action=arcade)

Added the code to arcade.css so a lot of edited did not have to be done. Am zipping it up now.  ;D

EDIT: Done! Download is here:

http://www.docskillz.com/docs/index.php?action=tpmod;dl=item77

Post is here:

http://www.docskillz.com/docs/index.php?topic=323.0
Title: Re: PDL/Skin Combo
Post by: Skhilled on August 01, 2014, 03:29:19 AM
I have a user that was having problems trying to figure out which submit type the games used. So, he came up with code so that the arcade checks for the proper submit type. Please read this and tell me what you think of it:

http://www.docskillz.com/docs/index.php?topic=624.0
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on August 01, 2014, 07:53:40 PM
goto ??   :o ~ recurring goto commands should be avoided.
I do not think that will work at all.

The idea of correcting the save type is good though.
Although it requires something different than what was posted.

Please note that attaining games from an appropriate source that includes a properly configured php file should set the save type properly. Authors of custom games should also include a properly configured php file within thier compressed archive. Doing this will negate the need for what you describe.


Title: Re: PDL/Skin Combo
Post by: Skhilled on August 01, 2014, 09:56:32 PM
Yes, but a lot of the old games that I have in my downloads do not have the .php file included and never did. I think eeeK aka TheBoss was going to start doing that before he disappeared.
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on August 01, 2014, 10:43:18 PM

TheBoss used an older version of the SMF Arcade as his code base which did not need the php file as it figured out the save type at the time of committing the score to the database. I believe Niko changed it because it did not always work properly and the standard of other Arcade mods (for other forum platforms) use a php file configured with appropriate variables to make the necessary save type settings.

The arcade does record the necessary save type to the error log therefore at that point I should be able to rig something up that changes the type automatically. I can make it an admin setting to allow those changes to occur.
Title: Re: PDL/Skin Combo
Post by: Skhilled on August 01, 2014, 11:54:55 PM
Sounds good! MKJ did say the code he posted worked for him but I knew you'd find a different/better way to do it. ;)
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on August 04, 2014, 11:51:30 AM

His edit might work if it was adjusted with the last condition which was cut off in his post.




I have attached version 1.0.5 to the first post which has the edits that were requested.
The feature must be enabled at the bottom of the PDL admin settings.
This has only been briefly tested so I would appreciate some feedback.
If there is any issues please report it and let me know the game being used and a link to download it for testing.

Regards.
Title: Re: PDL/Skin Combo
Post by: adonix on February 06, 2015, 08:59:13 AM
giving error in installation  :'(

Modifications.english-utf8.php

i tried to found "// Arcade end" in Modifications.english-utf8.php, but not got.
please help...


Title: Re: PDL/Skin Combo
Post by: Chen Zhen on February 06, 2015, 11:09:18 AM
adonix,

  If the file that is showing an error does not exist in your languages directory then just ignore both errors to that file. It is supposed to skip that file if this is the case but as I said, if the file is non-existent then the errors can be ignored.
file: ../Themes/default/Modifications.english-utf8.php

If the file does indeed exist then perhaps there is a previous modification that had already edited the file in the same place that this mod is attempting to edit.
This is the edits to that file that this mod performs which can be added manually if necessary. Imo add it to the middle of the file.


/* Arcade - PDL Text Variables */
global $modSettings, $boardurl, $scripturl;
if (empty($modSettings['arcadeVersion'])) {$modSettings['arcadeVersion'] = '2.5 Rc1';}
$txt['arcade_download_gameplay'] = 'Download';
$txt['pdl_forum'] = '<img src="Themes/default/images/arc_icons/pdl_forum.gif" alt="Forum" title="Forum" />';
$txt['pdl_arcade'] = '<img src="Themes/default/images/arc_icons/pdl_arcade.gif" alt="Arcade" title="Arcade" />';
$txt['pdl_admin'] = '<img src="Themes/default/images/arc_icons/pdl_admin.gif" alt="Admin" title="Admin" />';
$txt['pdl_home'] = '<img src="Themes/default/images/arc_icons/pdl_home.gif" alt="Home" title="Home" />';
$txt['pdl_play'] = '<img src="Themes/default/images/arc_icons/pdl_play.gif" alt="Play" title="Play Game" />';
$txt['pdl_viewscore'] = '<img src="Themes/default/images/arc_icons/pdl_highscores.gif" alt="Highscores" title="Show Highscores" />';
$txt['pdl_random_game'] = '<img src="Themes/default/images/arc_icons/pdl_random.gif" alt="Random" title="Random Game" />';
$txt['pdl_edit_game'] = '<img src="Themes/default/images/arc_icons/pdl_edit.gif" alt="Edit" title="Edit" />';
$txt['pdl_download_game'] = '<img src="Themes/default/images/arc_icons/pdl_download.gif" alt="Download" title="Download" />';
$txt['pdl_login'] = '<img src="Themes/default/images/arc_icons/pdl_login.gif" alt="Login" title="Login" />';
$txt['pdl_logout'] = '<img src="Themes/default/images/arc_icons/pdl_logout.gif" alt="Logout" title="Logout" />';
$txt['pdl_register'] = '<img src="Themes/default/images/arc_icons/pdl_register.gif" alt="Register" title="Register" />';
$txt['pdl_reportbtn'] = '<img src="Themes/default/images/arc_icons/pdl_report.gif" alt="Report" title="Report" />';
$txt['arcade_download_gameplay'] = '<img src="' . $boardurl . '/Themes/default/images/arc_icons/dl_btn.png" width="70" height="18" title="Download" alt="Download"></img>';
$txt['pdl_erroricon'] = '<a href="'.$scripturl.'?action=arcade" target="_parent"><img src="'.$boardurl.'/Themes/default/images/arc_icons/arcade_popup_error.gif" alt="SMF ARCADE" title="SMF ARCADE" /></a><br />';
$txt['pdl_arcade_copyright'] = 'Powered by: <a href="http://www.smfarcade.info/">SMF Arcade ' . $modSettings['arcadeVersion'] . '</a> &copy; <a href="http://www.madjoki.com/">Niko Pahajoki</a> 2004-2010';
$txt['pdl_trademarks'] = '<a href="http://validator.w3.org/check/referer" title="Valid XHTML 1.0!">XHTML</a> <a href="'.$boardurl.'/index.php?action=.xml;type=rss">RSS</a> <a href="'.$boardurl.'/index.php?wap2">WAP2</a>';
$txt['ud_pdl_logo'] = 'Game Template by <a href="http://askusaquestion.net/">Underdog</a>';
$txt['ud_reports_logo'] = 'SMF Arcade PDL Modification by <a href="http://askusaquestion.net/">Underdog</a>';
$txt['permissionname_arcade_download'] = 'Download Games';
$txt['permissionname_arcade_report'] = 'Report Game Errors';
$txt['arcade_general_pdl_settings'] = 'PDL Settings';
$txt['arcade_general_pdl_reports'] = 'PDL Reports';
$txt['arcade_pdl_reps'] = 'Games With Reported Errors';
$txt['pdl_submit'] = 'Submit';
$txt['pdl_maintain1'] = '<img src="' . $boardurl . '/Themes/default/images/arc_icons/pdl_clean.gif" alt="CLEAN" title="Clear Cache" />';
$txt['pdl_maintain2'] = 'Maintain';
$txt['pdl_listplay'] = 'PLAY';
$txt['pdl_test'] = 'Test Game';
$txt['pdl_reports_id'] = 'Game ID';
$txt['pdl_reports_name'] = 'Game Name';
$txt['pdl_reports_userid'] = 'Reported By';
$txt['pdl_reports_year'] = 'Year';
$txt['pdl_reports_day'] = 'Day';
$txt['pdl_reports_repid'] = 'Report #';
$txt['pdl_reports_dcount'] = 'Download Count';
$txt['pdl_reports_delete'] = 'Delete Report';
$txt['show_pdl_report'] = 'Game Error Reported';
$txt['arcade_replay'] = 'Replay';
$txt['arcade_download_game'] = 'Download';
$txt['pdl_unassigned'] = 'Unassigned';
$txt['pdl_unlimited'] = 'Unlimited';
$txt['pdl_na'] = 'N/A';
$txt['pdl_gamedata'] = 'Game Information';
$txt['game_categories'] = 'Game Categories';
$txt['pdl']['help'] = 'Help';
$txt['pdl_button1'] = 'Download';
$txt['pdl_edit'] = 'Edit';
$txt['pdl_report'] = 'Report';
$txt['pdl_popplay'] = 'Play In Popup';
$txt['pdl_counter'] = 'Total Downloads: ';
$txt['pdl_max_limit'] = 'Limit';
$txt['pdl_disabled'] = 'Arcade is disabled.';
$txt['pdl_notfound'] = 'Game not found in database.';
$txt['pdl_gamedisable'] = 'Game has been disabled.';
$txt['pdl_reports_toggle'] = 'Enable/Disable Download';
$txt['pdl_dl_status'] = 'Download Status';
$txt['pdl_dl_enabled'] = 'Enabled';
$txt['pdl_dl_disabled'] = 'Disabled';
$txt['pdl_yes'] = 'Yes';
$txt['pdl_down'] = '<br /><br /><br />';
/* If you want a button for downloads, omit the remark tags from the line below  */
/* $txt['pdl_button1'] = '<img src="' . $boardurl . '/Themes/default/images/arc_icons/dl_btn.png" width="70" height="18" alt="Download" title="Download" />'; */
/* Drop down categories for jeza template */
$txt['game_categories'] = 'Game Categories';

/* Drop down categories for jeza template */
$txt['game_categories'] = 'Game Categories';


Regards.
Title: Re: PDL/Skin Combo
Post by: Skhilled on March 28, 2015, 06:46:36 AM
People seem to be having a problem with Today's Scores not showing for some reason with PDL 1.0.5. Please look into this when you have some extra time...I know you're busy atm.

Thanks...

EDIT: I forgot to mention that they are using Arcade 2.6 but some are using 2.5 and getting the same results...
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on March 30, 2015, 01:57:25 PM

Skhilled,

  What do you mean by "Today's Scores not showing" ?
Is the scoring system working properly? Is it just not displaying the new score(s) for the same day & then it appears to update at a later time (ie. for a new session)?
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on March 30, 2015, 10:01:18 PM

I adjusted the arcade listed here with the needed fix which also emends what was reported on your forum.
However, I did not use your 2.6 version of the arcade but rather named the version listed here as RC3.
It also already includes the PDL/Skin combo edits within that installation.

The edits you need for the PDL/Skin combo to work with version RC2 have also been completed.

Regards.
Title: Re: PDL/Skin Combo
Post by: Skhilled on April 11, 2015, 05:36:40 PM
Sorry, but I've been very busy trying to get my new PC built. Thanks, I'll download this.

EDIT: So far, I see 2 issues which are the same with versions on my site.

1.  When you add or edit a comment, it works but clicking the "Save" button does not send you to the correct screen and still shows the "Save button". It should go back to the original screen with the "Edit" button but showing the edit you've just made. Even refreshing the screen does not work. You have to go to another screen first then back to the Highscores page to see it.

2.  Today's Scores is not working properly even after refreshing and changing screens and going back.

I have not tried these with a browser other than FF yet...

EDIT Again: (LOL) Tried it with Chrome and get the same... However, I do remember something about waiting for a day to pass before Today's Scores worked long ago...
Title: Re: PDL/Skin Combo
Post by: Chen Zhen on April 11, 2015, 11:32:04 PM
Skhilled,

  I fixed todays scores and tested it in Chrome, it should work. I will have to test it again I suppose.
I was not aware of any issue with comments and will also look at that.
Title: Re: PDL/Skin Combo
Post by: Skhilled on April 12, 2015, 07:18:32 AM
I waited until today and looked and didn't see any scores. I played a game and now it shows the game I played today. I knew I remembered Niko saying something about it working after 24 hours or something like that.

http://docskillz.com/smfarcade/index.php?action=arcade

I didn't know about the comments until yesterday when NekoJones reported it.
Title: Re: PDL/Skin Combo
Post by: Skhilled on April 13, 2015, 09:39:32 AM
I forgot he said he had another issue when viewing the stats page:

QuoteDatabase Error: BIGINT UNSIGNED value is out of range in '((case when (`arpegi_be`.`score`.`champion_to` = 0) then 1428760945 else `arpegi_be`.`score`.`champion_to` end) - `arpegi_be`.`score`.`champion_from`)'


SELECT game.id_game, game.game_name,
CASE WHEN champion_from > 0 THEN (CASE WHEN champion_to = 0 THEN UNIX_TIMESTAMP() ELSE champion_to END - champion_from) ELSE 0 END AS champion_duration,
IFNULL(mem.id_member, 0) AS id_member, IFNULL(mem.real_name, '') AS real_name, CASE WHEN champion_to = 0 THEN 1 ELSE 0 END AS current
FROM smf_arcade_scores AS score
LEFT JOIN smf_arcade_games AS game ON (game.id_game = score.id_game)
LEFT JOIN smf_members AS mem ON (mem.id_member = score.id_member)
WHERE 1 = 1
GROUP BY score.id_score
HAVING champion_duration > 0
ORDER BY CASE WHEN champion_from > 0 THEN (CASE WHEN champion_to = 0 THEN UNIX_TIMESTAMP() ELSE champion_to END - champion_from) ELSE 0 END DESC
LIMIT 10

File: /*****/arpegi.be/****/Sources/ArcadeStats.php
Line: 272

Since I could not reproduce it I assumed something was not installed properly...
EhPortal 1.39.6 © 2024, WebDev