vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Major Additions - Links and Downloads Manager (https://vborg.vbsupport.ru/showthread.php?t=166094)

AndrewD 08-23-2008 11:35 AM

Quote:

Originally Posted by sparklywater (Post 1605050)
I can understand the importance of maintaining aspect-ratio, but I found one problem with the LDM imagemagsize setting. This setting sets the size of the image 'along larger dimension', and this becomes problematic if the image has a larger width than height (which is usually the case). This is because having a fixed width means that the height of the image varies according to the original size of the image, and this sometimes results in images having heights too large for the screen. What would be more useful is to have the 'imagemagsize' set the HEIGHT of the image rather than the width, which would then allow the width of the image to vary according to the aspect-ratio of the original picture. This would cause less problems because obviously the screen of the user is wider than the screen's height, so it can allow for more variability in the horizontal direction.

OK, that makes sense. I'll give it a try.

sparklywater 08-23-2008 12:38 PM

Quote:

Originally Posted by AndrewD (Post 1605074)
OK, that makes sense. I'll give it a try.

If you make the change please let me know how I can edit my current installation for the new setting. It would particularly improve the 'lightbox' display of images.

AndrewD 08-23-2008 01:48 PM

Quote:

Originally Posted by sparklywater (Post 1605104)
If you make the change please let me know how I can edit my current installation for the new setting. It would particularly improve the 'lightbox' display of images.

If you want to make the change yourself, try the following:

edit includes/lcal_links_resize.php

find, around line 145:

Code:

        $thumb_w = ($old_x >= $old_y ? (int) ($size) : (int) ($size*$old_x/$old_y));
        if ($thumb_w>$old_x) {
                $thumb_w = $old_x;
        }
        $thumb_h = (int) ($thumb_w*($old_y/$old_x));

if you want to force the pictures to be the defined height, replace these lines by:

Code:

        $thumb_h = $size;
        $thumb_w = (int) $size * $old_x/$old_y;

ditto, to force the width:

Code:

        $thumb_w = $size;
        $thumb_h = (int) $size * $old_y/$old_x;


ErnieTheMilk 08-23-2008 02:13 PM

This is such a great hack... thank you!

I am having a small problem of when I use it, I am being logged out and being asked to log back in, is there anything I can do about this, or something I am doing wrong to put this right!

AndrewD 08-23-2008 03:13 PM

Quote:

Originally Posted by ErnieTheMilk (Post 1605147)
This is such a great hack... thank you!

I am having a small problem of when I use it, I am being logged out and being asked to log back in, is there anything I can do about this, or something I am doing wrong to put this right!

Check how you've got your board url and forum defined on your vb/admincp/options. Most times when I hear this problem, it's because people are using www . sitename . com to get to the site but have defined it on the vbadmincp as sitename . com. The consequence is that the logon cookie disappears when you move between pages inside ldm.

ErnieTheMilk 08-23-2008 03:54 PM

Quote:

Originally Posted by AndrewD (Post 1605183)
it's because people are using www . sitename . com to get to the site but have defined it on the vbadmincp as sitename . com.

Great job Andrew, blinking marvellous! :D :up:

vbboarder 08-23-2008 05:15 PM

If your site contains Quicktime media files, you may want to advise your users of this:
Quicktime media will not play or will play without the player's controls bar if the mime types are not set in the user's browser. This may occur for other media types also (Windows, Real, etc), but I have only verified this problem with Quicktime. Solution:

The USER must edit their Quicktime's browser preferences: In Quicktime, go to Edit > Preferences > Quicktime Preferences > Browser > MIME Settings (located at bottom of Browser tab) > select the mime types that you want Quicktime to play. For best compatibility, I selected Quicktime movie (mov, qt), aac, mpeg-4, 3gpp, 3gpp2, qhtm. Click "OK", then "Apply", then "OK" again. Your users should now be able to play Quicktime media files :D

vbboarder 08-23-2008 05:26 PM

The default mime type for avi files (video/avi) does not work in Firefox. The correct mime type is: application/x-mplayer2
You can set that in VB in the control panel on the left side: select Attachments > Attachment Manager > Edit avi > then for mime type, type in: Content-type: application/x-mplayer2
That should do it, you can now play avi files in both IE and Firefox :D

vbboarder 08-23-2008 05:45 PM

Bug report: Real media will not play in IE browser. The solution requires 2 steps:
1. In VB control panel on the left side: select Attachments > Attachment Manager > Edit all file types that you want Real to play (ie: ra, rv, rm, etc.) > then for each file type, type in for mime type: Content-type: audio/x-pn-realaudio

2. Edit local_stream.php (in the forum root folder) so that the mime type is only changed for NON-IE browsers. Around line 143, FIND:
Code:

        foreach ($mimetype as $k=>$mime) {
            if (preg_match("/-real/", $mimetype[$k])) {
                $mimetype[$k] = "Content-type: audio/x-pn-realaudio-plugin";
            }
        }

And REPLACE that with:
Code:

// MODIFIED to change mime type ONLY IF browser is NOT Explorer (!is_browser('ie') does not work for IE7, but can check for other browsers)
require_once(DIR . '/includes/functions.php');
    if (is_browser('firefox') || is_browser('safari')) {
        foreach ($mimetype as $k=>$mime) {
            if (preg_match("/-real/", $mimetype[$k])) {
                $mimetype[$k] = "Content-type: audio/x-pn-realaudio-plugin";
            }
        }
    }

Real media should be able to play in both IE and Firefox :D

vbboarder 08-23-2008 06:07 PM

Bug report: JWPlayer can play mp4 & m4v files when viewing the entry itself, but the player does not show when viewing a category's list of entries. It should show the player for mp4 & m4v files because the same player shows for flv, swf, & mp3 files when viewing a category's list of entries. Andrew, I can help fix this bug if you can advise me which file/ where to edit?


All times are GMT. The time now is 01:08 PM.

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.02792 seconds
  • Memory Usage 1,756KB
  • 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
  • (5)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)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