News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SCM Music Player for SMF

Started by dougiefresh, January 10, 2017, 04:22:47 AM

Previous topic - Next topic

aegersz

I found this error if that helps

8: Undefined index: SCM_styleApply Filter: Only show the errors from this file File: /var/www/html/Themes/default/smfhacks_templates/global-hf.template.php (show_settings sub template - eval?)
Line: 78
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Uploaded v1.6 - August 10th, 2017
o Fixed a lot of decision-making code to make the SCM player work properly.




@aegersz:  Hopefully, this update fixes the problems you've experienced/reported.  Sorry about the issues....

aegersz

#42
thanks, V.16 can now save but still no player bar.

sorry, i haven't got back to you earlier but i ended up in Intensive Care (hospital) as i almost died ... long story ... recreational hazzard.

again i feel like it's my "too many mods; this guys is nuts" fault . sorry.

here are some diagnostics:

Templates: 11: index (default), Ads (default), Portal (default), Admin (default), LiveClock (default), GenericMenu (default), SCMP (default), ManagePermissions (default), emailInactiveUsers (default), smfhacks_templates/global-hf (default), smfhacks_templates/global-hf (default).
Sub templates: 18: init, html_above, adsheaders_above, body_above, global_hf_above, adsindex_above, sachat_above, portal_above, generic_menu_dropdown_above, show_settings, generic_menu_dropdown_below, portal_below, sachat_below, adsindex_below, global_hf_below, body_below, adsheaders_below, html_below.
Language files: 29: index+Modifications.english (default), sd_language/SimpleDesk.english (default), SPortal.english (default), Optimus.english (default), TopicRating/.english (default), 2sichat.english (default), KB.english (default), Highlight.english (default), LikePosts.english (default), MPAAP.english (default), Ads.english (default), SPortalAdmin.english (default), Admin.english (default), smfhacks_languages/global-hf.english (default), sd_language/SimpleDeskAdmin.english (default), InlineAttachments.english (default), ManageUltimateMenu.english (default), emailInactiveUsers.english (default), EnhancedPMSystem.english (default), CustomBBCodesAdmin.english (default), LiveClock.english (default), SCMP.english (default), Help.english (default), SPortalHelp.english (default), ManagePermissions.english (default), WikiBBC.english (default), Modifications.english (default), Mentions.english (default), SearchFocus.english (default).
Style sheets: 2: portal (default), admin (default).
Files included: 72 - 1505KB. (show)
Cache hits: 14: 0.00276s for 4356 bytes (show)
Queries used: 28.

      SELECT data
      FROM smf209_sessions
      WHERE session_id = '8rk0flt1oii6pa6docc1cveup5'
      LIMIT 1
   in .../Sources/Load.php line 2695, which took 0.00061893 seconds at 0.12253284 into request.

            SELECT mem.*, IFNULL(mg.group_name, 0) AS group_name, IFNULL(mg.stars, 0) AS stars, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
FROM smf209_members AS mem
LEFT JOIN smf209_membergroups AS mg ON (mem.id_group = mg.id_group)
LEFT JOIN smf209_attachments AS a ON (a.id_member = 2)
WHERE mem.id_member = 2
            LIMIT 1
   in .../Sources/Load.php line 391, which took 0.00107694 seconds at 0.12392497 into request.

      SELECT id_theme, variable, value
      FROM smf209_themes
      WHERE id_member = 0
         AND id_theme IN (1, 1)
   in .../Sources/ScheduledTasks.php line 1203, which took 0.00085115 seconds at 0.13274884 into request.

         SELECT id_dept
         FROM smf209_helpdesk_depts
   in .../Sources/sd_source/Subs-SimpleDeskPermissions.php line 390, which took 0.00039506 seconds at 0.14825487 into request.

         SELECT variable, value, id_member, id_theme
         FROM smf209_themes
         WHERE id_member = 2
            AND id_theme = 1
   in .../Sources/Load.php line 1631, which took 0.00101018 seconds at 0.15186882 into request.

      SELECT *
      FROM smf209_ads
   in .../Sources/LoadAds.php line 51, which took 0.00047803 seconds at 0.16964388 into request.

      SELECT
         spb.id_block, spb.label, spb.type, spb.col, spb.row, spb.permission_set,
         spb.groups_allowed, spb.groups_denied, spb.state, spb.force_view, spb.display,
         spb.display_custom, spb.style, spp.variable, spp.value
      FROM smf209_sp_blocks AS spb
         LEFT JOIN smf209_sp_parameters AS spp ON (spp.id_block = spb.id_block)
      WHERE spb.state = 1
      ORDER BY spb.col, spb.row
   in .../Sources/Subs-Portal.php line 369, which took 0.0015521 seconds at 0.20109582 into request.

               SELECT value
               FROM smf209_shoutbox_settings
               WHERE variable = 'disable'
               LIMIT 1
   in .../Sources/Subs-Shoutbox.php line 147, which took 0.00036001 seconds at 0.20636797 into request.

               SELECT value
               FROM smf209_shoutbox_settings
               WHERE variable = 'showActions'
               LIMIT 1
   in .../Sources/Subs-Shoutbox.php line 147, which took 0.00031185 seconds at 0.20687795 into request.

      SELECT data
      FROM smf209_sessions
      WHERE session_id = '8rk0flt1oii6pa6docc1cveup5'
      LIMIT 1
   in .../Sources/Load.php line 2695, which took 0.00066209 seconds at 0.12423682 into request.

            SELECT mem.*, IFNULL(mg.group_name, 0) AS group_name, IFNULL(mg.stars, 0) AS stars, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type
FROM smf209_members AS mem
LEFT JOIN smf209_membergroups AS mg ON (mem.id_group = mg.id_group)
LEFT JOIN smf209_attachments AS a ON (a.id_member = 2)
WHERE mem.id_member = 2
            LIMIT 1
   in .../Sources/Load.php line 391, which took 0.00107408 seconds at 0.12582684 into request.

      SELECT id_theme, variable, value
      FROM smf209_themes
      WHERE id_member = 0
         AND id_theme IN (1, 1)
   in .../Sources/ScheduledTasks.php line 1203, which took 0.00085211 seconds at 0.13466382 into request.

         SELECT id_dept
         FROM smf209_helpdesk_depts
   in .../Sources/sd_source/Subs-SimpleDeskPermissions.php line 390, which took 0.000386 seconds at 0.15022993 into request.

         SELECT variable, value, id_member, id_theme
         FROM smf209_themes
         WHERE id_member = 2
            AND id_theme = 1
   in .../Sources/Load.php line 1631, which took 0.00100613 seconds at 0.15383577 into request.

      SELECT *
      FROM smf209_ads
   in .../Sources/LoadAds.php line 51, which took 0.00048685 seconds at 0.17166495 into request.

            DELETE FROM smf209_log_online
            WHERE log_time < 1503050062
               AND session != '8rk0flt1oii6pa6docc1cveup5'
   in .../Sources/Subs.php line 2797, which took 0.00042105 seconds at 0.1728549 into request.

         UPDATE smf209_log_online
         SET log_time = 1503052762, ip = IFNULL(INET_ATON('192.168.0.110'), 0), url = 'a:3:{s:6:\"action\";s:5:\"admin\";s:4:\"area\";s:16:\"scm_media_player\";s:10:\"USER_AGENT\";s:101:\"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36\";}'
         WHERE session = '8rk0flt1oii6pa6docc1cveup5'
   in .../Sources/Subs.php line 2813, which took 0.00051999 seconds at 0.17412996 into request.

      SELECT
         spb.id_block, spb.label, spb.type, spb.col, spb.row, spb.permission_set,
         spb.groups_allowed, spb.groups_denied, spb.state, spb.force_view, spb.display,
         spb.display_custom, spb.style, spp.variable, spp.value
      FROM smf209_sp_blocks AS spb
         LEFT JOIN smf209_sp_parameters AS spp ON (spp.id_block = spb.id_block)
      WHERE spb.state = 1
      ORDER BY spb.col, spb.row
   in .../Sources/Subs-Portal.php line 369, which took 0.00155592 seconds at 0.20885396 into request.

               SELECT value
               FROM smf209_shoutbox_settings
               WHERE variable = 'disable'
               LIMIT 1
   in .../Sources/Subs-Shoutbox.php line 147, which took 0.00041199 seconds at 0.21891189 into request.

               SELECT value
               FROM smf209_shoutbox_settings
               WHERE variable = 'showActions'
               LIMIT 1
   in .../Sources/Subs-Shoutbox.php line 147, which took 0.00033808 seconds at 0.21947885 into request.

      SELECT id_group, CASE WHEN add_deny = 0 THEN 'deny' ELSE 'on' END AS status, permission
      FROM smf209_permissions
      WHERE id_group IN (-1, 0)
         AND permission IN ('listen_to_music')
   in .../Sources/ManagePermissions.php line 1856, which took 0.00079679 seconds at 0.293046 into request.

      SELECT mg.id_group, mg.group_name, mg.min_posts, IFNULL(p.add_deny, -1) AS status, p.permission
      FROM smf209_membergroups AS mg
         LEFT JOIN smf209_permissions AS p ON (p.id_group = mg.id_group AND p.permission IN ('listen_to_music'))
      WHERE mg.id_group NOT IN (1, 3)
         AND mg.id_parent = -2
         AND mg.min_posts = -1
      ORDER BY mg.min_posts, CASE WHEN mg.id_group < 4 THEN mg.id_group ELSE 4 END, mg.group_name
   in .../Sources/ManagePermissions.php line 1875, which took 0.00097585 seconds at 0.29411292 into request.

      UPDATE smf209_log_activity
      SET
         hits = hits + 1
      WHERE date = '2017-08-18'
   in .../Sources/Subs.php line 3194, which took 0.0003891 seconds at 0.29554582 into request.

            SELECT id_member, inactive_mail, last_login, member_name, real_name, posts, sent_mail
            FROM smf209_members
            WHERE to_delete = 2
   in .../Sources/emailInactiveUsers.php line 230, which took 0.00980592 seconds at 0.32559586 into request.

      SELECT value
      FROM smf209_settings
      WHERE variable = 'integrate_menu_buttons'
   in .../Sources/Subs.php line 4711, which took 0.00043488 seconds at 0.33678889 into request.

      REPLACE INTO smf209_settings(`variable`, `value`)
      VALUES
         (SUBSTRING('integrate_menu_buttons', 1, 255), SUBSTRING('shd_main_menu,NotepadButton,optimus_operations,trb_rating_preload,eiu_menu,mentions_menu,KB_menu_buttons,DevCenter_ErrorLogCount', 1, 65534))
   in .../Sources/Subs.php line 624, which took 0.00041103 seconds at 0.33757186 into request.

         SELECT value
         FROM smf209_settings
         WHERE variable = 'integrate_menu_buttons'
   in .../Sources/Subs.php line 4577, which took 0.00045395 seconds at 0.33840895 into request.

      REPLACE INTO smf209_settings(`variable`, `value`)
      VALUES
         (SUBSTRING('integrate_menu_buttons', 1, 255), SUBSTRING('shd_main_menu,NotepadButton,optimus_operations,trb_rating_preload,eiu_menu,mentions_menu,KB_menu_buttons,DevCenter_ErrorLogCount,um_load_menu', 1, 65534))
   in .../Sources/Subs.php line 624, which took 0.00035882 seconds at 0.33916998 into request.

[Hide Queries]


nor does it run on my "almost vanilla (2.0.13) system":
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Uploaded v1.7 - August 18th, 2017
o Fixed issue where enabling the player apparently didn't take.
o Added source files to SCM Music Player to mod.
o Mod now pulls SCM Music Player from the forum folder.




@aegersz:  Not a problem about getting back to me.  I'm glad that you are alive and well, man!

I installed Chrome on my computer and the SCM Music Player didn't start up for me in Chrome, either.  It works fine on FireFox and IE.  So I downloaded a copy of SCM Music Player and included it in the mod, and modified the code to reference the local copy instead of the remote copy that I was using.  It works now on Chrome....  Go figure....

The unfortunate side effect of adding the code for SCM Music Player to the mod is that the mod went from like 10kb to 550+kb...

aegersz

still no joy.

I can't uncheck boxes (options don't save).

tried Firefox and Chrome and still no sign of a player.

i even tried it all on my vanilla system.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

i can setup a ssh reverse tunnel so you can go straight to my dev/vanilla system if you wish but we just need to co-ordinate it.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

#46
Hey, it started working when one of my backup sites was rebuilt and i hadn't set the https directories in with repair_settings.php (was using port 8080 as i have a proxy on that box too).

l removed SSL from one of my spare systems and she plays like a dream ... but i need SSL so that's not an option.

when you have some time, please Mr. Dougie  ... can we make it SSL compatible ?

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Uploaded v1.8 - August 19th, 2017
o Changed GitHub source from cshum/scm-music-player to icze4r/scm-music-player-SSL-




@aegersz:  Well, evidentally someone made a fork from the GitHub repo that is SSL compatible.  So I included it in the mod....  Give this a whirl, please....

aegersz

still no go with SSL.

i logged out and in and even restarted httpd.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

OMG!!!  WTF?!?!?
Seriously, I'm out of ideas here.....

aegersz

it's working now. i have no idea why. thanks
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Quote from: aegersz on August 19, 2017, 08:18:13 PM
it's working now. i have no idea why. thanks
Well, that's a relief....  Now if only I could understand why it didn't and is now working on your site....  O:)

Maybe the your browser cache files finally expired?

aegersz

that's exactly what i thought.

BUT , i love it, however it (autoplay) plays for guests and for everybody ? despite the settings ... any ideas ?

is that what autoplay means ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

#53
One of the problems I noticed during my testing of the mod is the need to hard refresh (CTRL-F5 on PCs, not sure about other platforms) the page when I tested the options.  Doing so reloads the entire page, including the player, and launches the player with the new settings....

Autoplay starts the player automatically at first page load.  So, a user visits your website and the option for autoplay is on, then your visitor hears music without pressing anything.  Turning that setting off in the admin UI does not STOP the player, though!  Any players still running with continue running until the page is closed or the player is manually stopped.  All music players will be stopped if the mod is disabled.....  BUT the player is still loaded in the browser memory due to the utilization of frames in order to show the music player apart from the actual forum page....  Only a hard refresh will get rid of it that way....

aegersz

yes, i also have to hit F5 to fresh the new playlists.

ok, it would be nice to turn the music off for guests somehow but hey, it's working buddy !

YAY!

thanks again !!
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

#55
sorry to bother ... one more thing, i lose my SA Chat bar when the player is enabled - any way around that ?

a hide/collapse block feature would get around it as i use the Hide Blocks to workaround it but i have to force a reload.

hey, i'm still stoked !

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

it still hasn't started working on my mobile phone and I have 4 browsers on it.

weird. there is no reason why it shouldn't work on my Android S7 is there ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

sorry about all the messages but i found this - would this suggest so ?

https://stackoverflow.com/questions/44415838/scm-player-not-working-on-mobile {no reply tendered}

and https://www.drupal.org/node/2842677

no biggie, i installed and use Owncloud on my site to play music online.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Quote from: aegersz on August 19, 2017, 09:27:36 PM
ok, it would be nice to turn the music off for guests somehow
Let me look at the coding again.  There has to be a way to fix this....

Quote from: aegersz on August 19, 2017, 09:48:18 PM
sorry to bother ... one more thing, i lose my SA Chat bar when the player is enabled - any way around that ?
I can confirm this bug report.  Is there anything I can do about it?  Unknown.....

Quote from: aegersz on August 19, 2017, 09:48:18 PM
a hide/collapse block feature would get around it as i use the Hide Blocks to workaround it but i have to force a reload.
Please explain....  I can't find a "Hide Blocks" option in the SA Chat mod.

Quote from: aegersz on August 20, 2017, 02:38:57 AM
it still hasn't started working on my mobile phone and I have 4 browsers on it.

weird. there is no reason why it shouldn't work on my Android S7 is there ?
It probably isn't mobile-friendly, and fixing that is something that is well beyond my expertise.....

aegersz

no problem. the collapse thing might just be a way I could temporarily disable the player with one click like you can do with seeing your avatar etc.

that way we don't have to do a hard refresh to disable the player as one moves around the app blocks.

but I'm happy with it so I won't bother you further. thanks for all your help and I must get back to the audio attachment player issue at some point.

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Advertisement: