vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Links and Downloads Manager (https://vborg.vbsupport.ru/showthread.php?t=91107)

AndrewD 09-17-2006 09:58 AM

Quote:

Originally Posted by bhxtyrant
Hey AndrewD,
It's been a while since i last been here lol.In any case i just began working with this newer version of LDM and it's pretty awsome so far.But i ran into one error i cant seem to figure out so thought i would ask here as you always had the answers for these things in the past.I installed LDM with VB 3.5.4 all was working well.I added a few test links.But now when i try to mass import files i get this error "Warning: Wrong parameter count for fgets() in \local_links_admin.php on line 1619" im not entirly sure why.Thanks

What version of php is your site running? The parameter count for fgets() changed at around version php 4.2 (which is rather old).

phenomenon 09-21-2006 01:40 AM

Hello,

I've found that on mac firefox and mac safari the links that should be pointing out to a jukebox are instead just doing a 'jump' (instead of a 'play')

for example, the link for an audio file is showing this url:
Code:

http://www.staytunedtheband.com/forum/local_links.php?action=jump&id=1&catid=1
whereas on my windows machine in IE and Firefox, it shows this url:

Code:

http://www.staytunedtheband.com/forum/local_links.php?action=play&id=1
So basically my mac users aren't able to see the jukebox. I've been searching through the code trying to figure out where there's an operating system setting that would set that up differently, but can't find one. Does anyone have any ideas how I could fix this?

Thanks,

Will Lanni

AndrewD 09-21-2006 04:46 AM

Quote:

Originally Posted by phenomenon
Hello,

I've found that on mac firefox and mac safari the links that should be pointing out to a jukebox are instead just doing a 'jump' (instead of a 'play')

for example, the link for an audio file is showing this url:
Code:

http://www.staytunedtheband.com/forum/local_links.php?action=jump&id=1&catid=1
whereas on my windows machine in IE and Firefox, it shows this url:

Code:

http://www.staytunedtheband.com/forum/local_links.php?action=play&id=1
So basically my mac users aren't able to see the jukebox. I've been searching through the code trying to figure out where there's an operating system setting that would set that up differently, but can't find one. Does anyone have any ideas how I could fix this?

Thanks,

Will Lanni

The LDM Jukebox tests explicitly that the user is running a Windows box, as I do not have any access to/experience of embedded media players in Mac OS or Linux. If someone can help me sort out how to make this work, I'll be delighted to extend the product.

angkor408 09-21-2006 03:30 PM

Ok now I didnt get that error any more which it allow me to upload image. But the issue it is not display the image. Here my link:


http://www.khmerclub.org/local_links.php?catid=2



Quote:

Originally Posted by AndrewD
See my reply immediately above this one.


phenomenon 09-21-2006 04:30 PM

Quote:

Originally Posted by AndrewD
The LDM Jukebox tests explicitly that the user is running a Windows box, as I do not have any access to/experience of embedded media players in Mac OS or Linux. If someone can help me sort out how to make this work, I'll be delighted to extend the product.

I would LOVE to help, as I have both a mac and a windows box sitting here, anxiously awaiting.

As I wrote, I was looking through the code trying to find where the browser/OS testing was done, but couldn't find it. After I get through some client work today, I'll run a global search; I'm assuming you're doing a javascript check? If you can remember what file the OS test is in, would you let me know? I can find it from there.

thanks,

w

AndrewD 09-21-2006 05:24 PM

Quote:

Originally Posted by phenomenon
I would LOVE to help, as I have both a mac and a windows box sitting here, anxiously awaiting.

As I wrote, I was looking through the code trying to find where the browser/OS testing was done, but couldn't find it. After I get through some client work today, I'll run a global search; I'm assuming you're doing a javascript check? If you can remember what file the OS test is in, would you let me know? I can find it from there.

thanks,

w

Stage 1:

The OS test is done in includes/local_links_install.php. With v2.2.1 (which is what I think you're using), there's a test against $_SERVER[HTTP_USER_AGENT] at line 103, which sets the global $user_windows.

Stage 2:

Subsequently, also in local_links_include, in function get_linklistbit (which actually builds the individual entry bits), you'll find the line:

Code:

$is_musicbox = iif($user_windows and get_mimetype($urlType) and in_array($urlType, $musicboxtypes), 1, 0);
If is_musicbox is set to 1 and various other conditions are met, then the entry url is set to point to LDM/action=play; otherwise to LDM/action=jump

Stage 3 - the actual playing. This is the key bit.

The links_play template contains a series of nested <object> <embed> sequences that are set up for the various players (Windows Media Player, Real Player, QuickTime, DivX, etc) that LDM can handle. The various variables that it tests against are set in local_links.php, in the action="play" section, towards the bottom.

You'll need to work out the correct sequence for the Mac. Presumably WMP is a no go? But perhaps Real player is fine.

Let me know how it goes.

phenomenon 09-21-2006 05:33 PM

Quote:

Originally Posted by AndrewD
Stage 1:

The OS test is done in includes/local_links_install.php. With v2.2.1 (which is what I think you're using), there's a test against $_SERVER[HTTP_USER_AGENT] at line 103, which sets the global $user_windows.

Stage 2:

Subsequently, also in local_links_include, in function get_linklistbit (which actually builds the individual entry bits), you'll find the line:

Code:

$is_musicbox = iif($user_windows and get_mimetype($urlType) and in_array($urlType, $musicboxtypes), 1, 0);
If is_musicbox is set to 1 and various other conditions are met, then the entry url is set to point to LDM/action=play; otherwise to LDM/action=jump

Stage 3 - the actual playing. This is the key bit.

The links_play template contains a series of nested <object> <embed> sequences that are set up for the various players (Windows Media Player, Real Player, QuickTime, DivX, etc) that LDM can handle. The various variables that it tests against are set in local_links.php, in the action="play" section, towards the bottom.

You'll need to work out the correct sequence for the Mac. Presumably WMP is a no go? But perhaps Real player is fine.

Let me know how it goes.

Awesome, thanks.

I am using 2.2.1, not upgrading to vB 3.6 until they've got a few more versions knocked out.

Macs come with Quicktime installed, so I'll probably wind up setting the player to QT. I'm also thinking about grabbing the $type, and if it's mp3, setting up a flash player as well, as that has been the most cross platform/browser friendly so far for music playing. (I'm having problems in Windows FireFox getting it to recognize I don't have quicktime but do have WMP)

Anyway, I will let you know how it goes. I'm assuming that whatever I update I should let you know with line numbers and quoted code? Or should I zip up what I do and message it?

AndrewD 09-21-2006 05:44 PM

Quote:

Originally Posted by phenomenon
Awesome, thanks.

I am using 2.2.1, not upgrading to vB 3.6 until they've got a few more versions knocked out.

Macs come with Quicktime installed, so I'll probably wind up setting the player to QT. I'm also thinking about grabbing the $type, and if it's mp3, setting up a flash player as well, as that has been the most cross platform/browser friendly so far for music playing. (I'm having problems in Windows FireFox getting it to recognize I don't have quicktime but do have WMP)

Anyway, I will let you know how it goes. I'm assuming that whatever I update I should let you know with line numbers and quoted code? Or should I zip up what I do and message it?

Thanks. Just post a message with a zip file or whatever you find convenient.

I 'beta'-d a test with the Wimpy player, which is Flash based - you'll find it in the VB36 version 2.2.6. Very straightforward.

SMO 09-21-2006 11:02 PM

I uninstalled this as I really didnt need it any longer...i did like it however. Anyhow,
I uninstalled it and a pop up came and said to run a "something_kill".

It went away really quickly and wasnt sure exactly what to do. How do I run this feature?

phenomenon 09-21-2006 11:04 PM

It was just a couple revisions of code in the local_links_include.php, I can just post my changes here.

This is for v2.2.1 (I haven't looked at your new version):

Line 103: defined $user_mac on line after $user_windows:
Code:

$user_windows = iif(strstr($_SERVER[HTTP_USER_AGENT],"Windows"), 1, 0);
$user_mac = iif(strstr($_SERVER[HTTP_USER_AGENT],"Macintosh"), 1, 0);

Line 2199: added $user_mac to global vars after $user_windows:
Code:

global $linkscat, $schemes, $modes, $icon_cache, $user_windows, $user_mac;
Line 2330: added $user_mac to if statement parameters:
Code:

$is_musicbox = iif(($user_mac or $user_windows) and get_mimetype($urlType) and in_array($urlType, $musicboxtypes), 1, 0);
ISSUES
  1. mp3's don't seem to stream in very well. My solution is to write a flash player to play mp3's. I'll have a look at your Wimpy code in the new version if I can't get it straight; basically I'm going to try to grab the $type in the play section of local_links.php, compare to mp3, and then have it load flash player, so no matter what OS or browser, it gets flash for music.
  2. Can't test for Linux, sorry
  3. Not sure if it's supposed to show the Quicktime Plugin like it says in the documentation. However, when user clicks the song title as the link, it pops open the jukebox, so I'm not worried about it.


All times are GMT. The time now is 11:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03172 seconds
  • Memory Usage 1,784KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete