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)

Ophelia 08-29-2008 12:37 AM

Quote:

Originally Posted by AndrewD (Post 1608712)
Main thing to check:

- Have you (or maybe have I) at some point in the past edited any of the LDM templates used on your site and forgotten to 'revert' them?

Are you using the LDM flash-based swfuploader extra for handling uploads or just the standard form-based uploader?

Will take a look at your site if you want.

Looking in vBulletin under styles, everything is showing that it's been reverted.

We are using the normal form based uploader.

Before I bother you with looking, let me do some testing to see exactly what is happening. I'll repost when I have that information.

AndrewD 08-29-2008 03:38 AM

Quote:

Originally Posted by Origin2 (Post 1609301)
I'm getting this error when trying to access any of your files "Codification Error" "Bad compression"....
I can't even edit any settings or access anything

This is the first report of this problem, and the error messages are not being generated inside LDM as far as I can tell. Do you want me to take a look at your site - I will need full admin privileges? Send me a PM if so.

derfelix 08-29-2008 06:33 AM

A little utf-8 bug for keywords..

IF the site is in UTF-8 AND you are using multi-language.. (example german and english)
then
when you add keywords to an entry containing special characters like ? ? ? ? there is a problem.. they wont display or get truncated at the special character..

i found the reason:
the strtolower function cannot convert special characters.. (it says though it will leave them as is.. thats true for some.. but not for those i need..
keyword: "key????test" will come out.. as "key" only..

i did a fix for me.. (it will only work if you dont have multi-encodings on your site AND if your site is UTF-8 for ALL languages)

Fix:
in the function ldm_explode_keywords in the file: local_links_include.php
find:
PHP Code:

return preg_split("/[,;\s]+/"strtolower($words)); 

replace with:
PHP Code:

return preg_split("/[,;\s]+/"mb_strtolower($words,"UTF-8")); 

hope that helps someone...

Felix
PS: still anotherone when testing.. the highlighting doesnt work on keywords with special chars... but that is really minor...(will look into it if time permitting)
PPS: the mb extensions must be installed in php (usually are by default)

AndrewD 08-29-2008 07:16 AM

Quote:

Originally Posted by derfelix (Post 1609652)
PS: still anotherone when testing.. the highlighting doesnt work on keywords with special chars... but that is really minor...(will look into it if time permitting)
PPS: the mb extensions must be installed in php (usually are by default)

Thanks - I went stir crazy with this a year or so ago with trying to highlight Chinese searches... What to do when you don't understand anything that's on the screen.

Origin2 08-29-2008 08:51 AM

it's a problem with my crappy host >_>

derflix I tried that but still didn't work

sparklywater 08-29-2008 12:40 PM

I need to add a separate link in one of the category listing pages (which displays all the entries in that category), but if I try to add the link to the 'links_linkbit_short_direct' template, the link is added to every row of entry in that category. I don't want the separate link to appear in every row, I need it to appear once somewhere in that category's entry-list page.

I can't add the link to the 'links_main' template because this causes it to appear in every category (I only need the link to appear in one category). How can I add an additional link or some other text to a category's listing without it appearing in every row of entry in that category?

AndrewD 08-29-2008 12:55 PM

Quote:

Originally Posted by sparklywater (Post 1609856)
I need to add a separate link in one of the category listing pages (which displays all the entries in that category), but if I try to add the link to the 'links_linkbit_short_direct' template, the link is added to every row of entry in that category. I don't want the separate link to appear in every row, I need it to appear once somewhere in that category's entry-list page.

I can't add the link to the 'links_main' template because this causes it to appear in every category (I only need the link to appear in one category). How can I add an additional link or some other text to a category's listing without it appearing in every row of entry in that category?

Can you not make it part of the category's extended description?

Alternatively, there are a series of placeholders in the links_main template, which come from elements of the $ldm_includeinmain array, e.g. $ldm_includeinmain[precat]. You could write a very small plugin which is tied to the ldm_maindisplay_end hook, e.g.:

Code:

if ($viewcatid==25) {
$ldm_includeinmain[precat] = "additional html";
}

This would only appear in categoryid #25

vbboarder 08-30-2008 12:07 AM

Quote:

Originally Posted by vbboarder (Post 1607657)
Thanks for the fix! The player now shows when listing a category's entries for mp4 and m4v files, but now incorrectly sizes the player.
Bug Report: when viewing a category's listing for audio files with album art, the player's size is the size of the album art, NOT the preset size. This problem did not exist with the prior version of jwaddons.xml.
When you fix this bug, can you PLEASE make LDM use the size for videos if it detects album art and use the size for mp3 if it detects no artwork?
Also, can you make LDM show the player for aac & m4a files, which are supported by the JW Player? ;)

Bug Fix To correctly size the JW player for audio files with album art, edit the JWPlayer Addons plugin attached to the ldm_linkbit_create hook. FIND AND DELETE:

Quote:

$player_height += $links_defaults['link_imagesize'];
$player_width = max($player_width, $links_defaults['link_imagesize']);
To show JW player for m4a files when viewing a category's list of entries, follow Andrew's instructions in this post, except you're adding "m4a" to the codes he mentioned:
https://vborg.vbsupport.ru/showpost....&postcount=978
Also in the JWPlayer Addons plugin attached to the ldm_linkbit_create hook, FIND:
Quote:

case "mp3":
After that, ADD:
Quote:

case "m4a":
DO NOT enable JW player 4 for aac files, even though it claims support for it. The JW player caused Firefox 2 to freeze/ hang when I tried to play aac files.

derfelix 08-30-2008 03:33 AM

Hi andrew...
I did some tests
with german umlaut.. (???) or french accents (? ? ? ? ?) my fix above seems to work...
BUT
with chinese... AAAAAAAAAAAAAAAGH.... you are right.. that is a pain....

but i think i narrowed it down.. BUT i would need some help..

OK.. the problem is.. in UTF-8 with multibyte characters.. there is a preg_replace problem..
(dont ask me why)

The problem is in the line..:
PHP Code:

// Apply highlighting to each of the substrings
    
$resstrings preg_replace($find$replace$substrings); 

(its the $find that doesnt work for UTF-8 chinese)

I ran some examples with dummy strings.. (notice the /u modifier was added)
example :
PHP Code:

$resstrings preg_replace("/(\b???\b)/iu"" Replaced: $1 ""test ??? test"); 

will give: test Replaced: ??? test
==> works!!!

but:
PHP Code:

$resstrings preg_replace("/(\b欢迎您\b)/iu"" Replaced: $1 ""欢迎欢迎您 欢迎"); 

will give: 欢迎欢迎您 欢迎
==> no highlight :(
------------
The problem whith characters like chinese seems to be the boundary \b
so i tried:
PHP Code:

$resstrings preg_replace("/(" preg_quote("欢迎您") . ")/iu"" Replaced: $1 ""欢迎欢迎您 欢迎"); 

will give: 欢迎 Replaced: 欢迎您 欢迎
==> works.. chinese text is highlighted..!!!!!

BUT.. my question.. is there a drawback?????
not using the boundary \b ???
i used the preg_quote just to avoid $1 errors.. but i guess its not really needed..

to implement this in LDM it would be:
in local_links_include.php in function ldm_make_highlight_regex
find:
PHP Code:

$find[] = '/(\b'.$w.'\b)/i'

replace with:
PHP Code:

$find[] = '/('.preg_quote($w).')/iu'

actually i would also (maybe) add @ in front of the preg_replace in $resstrings = preg_replace($find, $replace, $substrings);
i have ran some tests with keywords in chinese.. they highlight... tried message-text: works also...
PLEASE TEST...!!!!
Felix

AndrewD 08-30-2008 04:44 AM

Quote:

Originally Posted by vbboarder (Post 1610257)
Bug Fix To correctly size the JW player for audio files with album art, edit the JWPlayer Addons plugin attached to the ldm_linkbit_create hook. FIND AND DELETE:

To show JW player for m4a files when viewing a category's list of entries, follow Andrew's instructions in this post, except you're adding "m4a" to the codes he mentioned:
https://vborg.vbsupport.ru/showpost....&postcount=978
Also in the JWPlayer Addons plugin attached to the ldm_linkbit_create hook, FIND:

After that, ADD:

DO NOT enable JW player 4 for aac files, even though it claims support for it. The JW player caused Firefox 2 to freeze/ hang when I tried to play aac files.


Thanks for the info.

The sizing bug was originally intended to be a feature - the larger player would include the album cover within the player, rather than displaying it separately. But this did not work consistently.


All times are GMT. The time now is 08:07 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.05665 seconds
  • Memory Usage 1,777KB
  • 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
  • (1)bbcode_code_printable
  • (8)bbcode_php_printable
  • (9)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