Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Links and Downloads Manager Details »»
Links and Downloads Manager
Version: 2.3.0, by AndrewD AndrewD is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Category: Major Additions - Version: 3.7.0 Rating:
Released: 12-24-2007 Last Update: 06-13-2009 Installs: 576
DB Changes Uses Plugins
Re-useable Code Additional Files Translations  
No support by the author.

What this is and does

LDM is a general-purpose tool for managing libraries of links and files, and handling uploads and downloads in a flexible way, while tracking and control user access. It has a range of integrated media players and a large library of 'plugin' extras.

Installation and Usage Explained in the on-line Wiki, with a brief explanation in the file instructions.txt in the release zip. The recent revision history is given in the first post of this thread.

Please use carefully and always backup your database before upgrading. Post reports of problems and suggestions for enhancements in this thread.

14.06.09 Version 2.3.0 is now the the officially-supported version. Works with 3.7 and vb 3.8. Please post comments in this thread

22.06.08 Version 2.2.9-post1 - This is the previous supported version. Works fine with all versions of vb 3.6 and vb 3.7. All standard features except profile integration and forum prefix selection work fine with vb 3.8.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #992  
Old 08-30-2008, 05:34 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by derfelix View Post

find:
PHP Code:
$find[] = '/(\b'.$w.'\b)/i'
replace with:
PHP Code:
$find[] = '/('.preg_quote($w).')/iu'
BUT.. my question.. is there a drawback?????

Felix
Thanks, Felix. Indeed the problem is/was the word boundary. The drawback with removing the word boundary markers is that you end up highlighting substrings in the results which the search itself did not match.

For example, suppose you have a string "happily merrily sadly happilymerrilysadly" and you do a search for merrily

This should highlight as "happily merrily sadly happilymerrilysadly"

and it does with the word boundary flags in the regex.

But without them, it highlights as "happily merrily sadly happilymerrilysadly"

** Edited **

Can you try another way of solving the word boundary problem. Edit the loop in ldm_make_highlight_regex as follows:

Code:
	foreach ($words AS $w) {
		if ($w != "") {
			$find[] = '/([\p{C}\p{P}\p{Z}]' . $w . '[\p{C}\p{P}\p{Z}]' . ')/iu';
			$find[] = '/^(' . $w . '[\p{C}\p{P}\p{Z}]' . ')/iu';
			$find[] = '/([\p{C}\p{P}\p{Z}]' . $w . '$)/iu';
		}
	}
Reply With Quote
  #993  
Old 08-30-2008, 06:02 AM
pooslokka pooslokka is offline
 
Join Date: Jun 2008
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hai we have now your plugin for last thow months and working like a charm.

I have a question.

Do thumbnails are auto generated or we need to upload a thumbnail ? this is for wallpapers.

Reply With Quote
  #994  
Old 08-30-2008, 06:32 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pooslokka View Post
Hai we have now your plugin for last thow months and working like a charm.

I have a question.

Do thumbnails are auto generated or we need to upload a thumbnail ? this is for wallpapers.

First, you have to set the LDM admin setting link_imagesize, otherwise thumbs are not shown at all

Then, if you fill in the Image field on the Add/Edit Entry form with a image url or image upload, LDM will use that to generate the thummb.

Otherwise, if the entry url itself is an image, the thumbnail is autogenerated from the entry url.

Otherwise, if you have installed the id3tag_enhancements LDM extra and the url is an mp3, it will try to pull out the album art from the mp3.
Reply With Quote
  #995  
Old 08-30-2008, 06:43 AM
derfelix derfelix is offline
 
Join Date: Nov 2001
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AndrewD View Post
Thanks, Felix. Indeed the problem is/was the word boundary. The drawback with removing the word boundary markers is that you end up highlighting substrings in the results which the search itself did not match.
For example, suppose you have a string "happily merrily sadly happilymerrilysadly" and you do a search for merrily

This should highlight as "happily merrily sadly happilymerrilysadly"

and it does with the word boundary flags in the regex.

But without them, it highlights as "happily merrily sadly happilymerrilysadly"

So we need to solve the word boundary problem in utf8.
Well then.. I am happy.. then it is actually a feature..

if you search for "intern" in google.. in the description and the title, words like international or internal or internship are highlighted!!!!

i was going to anyway modify the search from "word" to "*word*" because if i do a search for "luxury" and only have one entry with the word "luxuryhotels" in description.. i would get no results..it would not show up.. in that case at least the highlighting would allready be done..
---------------------
on the otherhand.. using ldm as is.. it is also not a major drawback:
if you are looking for merrily ... it will only show you results where the word "merrily" is standalone... so you do have the correct results.. and if you have an extra sadlymerrilysadly then only it will be highlighted.. wich i think is a feature!!!
---------------------

so if it is the only drawback.. i'm sticking to that solution, especially as php6 is going to have full unicode support.. and I am ready to bet that in php6 this problem will be solved!!

But at least for the moment adding the /u modifier (making it /iu) to the regex will help for languages like german, french or spanish as the highlighting will work as you expect it..


Felix
PS: just seen your edit.. doing testing now!

[EDIT]
just tested your routine... works fine with description....(not working with keywords) hmmm

BUT with chinese there is another problem... did some reading (i do not understand chinese)
i was trying to extract content to use as description.. thats how i stumbled into this article:
it says
Quote:
Chinese sentences are written with no special delimiters such as space to indicate word boundaries. Existing Chinese NLP systems therefore employ preprocessors to segment sentences into words.
source: http://portal.acm.org/citation.cfm?id=981621

if this is true i think that the "no boundary" version will for the moment be the easiest solution...for chinese
Reply With Quote
  #996  
Old 08-30-2008, 06:54 AM
pooslokka pooslokka is offline
 
Join Date: Jun 2008
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AndrewD View Post
First, you have to set the LDM admin setting link_imagesize, otherwise thumbs are not shown at all

Then, if you fill in the Image field on the Add/Edit Entry form with a image url or image upload, LDM will use that to generate the thummb.

Otherwise, if the entry url itself is an image, the thumbnail is autogenerated from the entry url.

Otherwise, if you have installed the id3tag_enhancements LDM extra and the url is an mp3, it will try to pull out the album art from the mp3.
Tx, but how to specify the link_imagesize ? no example given,
is this format ok? 200px ? 150px
Reply With Quote
  #997  
Old 08-30-2008, 07:48 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pooslokka View Post
Tx, but how to specify the link_imagesize ? no example given,
is this format ok? 200px ? 150px
No, you just put in a number. As the admin page says:

Size in pixels (along larger dimension) of thumbnail image shown within linkbit. 0: No thumbnails is displayed and data entry forms do not offer image fields.

The information about picking up current value of Thumbnail Size, as set in the vBulletin Admin Control Panel, is not working on every system, for a reason that I do not yet understand.
Reply With Quote
  #998  
Old 08-30-2008, 07:54 AM
AndrewD AndrewD is offline
 
Join Date: Jul 2002
Location: Scotland
Posts: 3,486
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by derfelix View Post
Chinese sentences are written with no special delimiters such as space to indicate word boundaries. Existing Chinese NLP systems therefore employ preprocessors to segment sentences into words.
Yes, that was one of the things I discovered too, when I looked into this some time ago. There has been a very helpful and knowledgable Chinese user (ItsBlack) on this forum (he has done all the Chinese translations) - maybe he will spot this post and comment.

I will look at the keyword problem

Edited:

yes, of course, there needs to be a fourth line:
Code:
	$find[] = '/^(' . $w . '$)/iu';
this is all because the special utf8 regex characters do not map neatly onto \b, as far as I can tell - \b matches at start and end of line which the utf8 specials do not.
Reply With Quote
  #999  
Old 08-30-2008, 08:57 AM
pooslokka pooslokka is offline
 
Join Date: Jun 2008
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AndrewD View Post
No, you just put in a number. As the admin page says:

Size in pixels (along larger dimension) of thumbnail image shown within linkbit. 0: No thumbnails is displayed and data entry forms do not offer image fields.

The information about picking up current value of Thumbnail Size, as set in the vBulletin Admin Control Panel, is not working on every system, for a reason that I do not yet understand.
Done, Thumbs are generated nicesly :up:
Reply With Quote
  #1000  
Old 08-30-2008, 09:31 AM
derfelix derfelix is offline
 
Join Date: Nov 2001
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AndrewD View Post
maybe he will spot this post and comment.
Looking forward for that...
Quote:
Originally Posted by AndrewD View Post
yes, of course, there needs to be a fourth line:
Code:
	$find[] = '/^(' . $w . '$)/iu';
this is all because the special utf8 regex characters do not map neatly onto \b, as far as I can tell - \b matches at start and end of line which the utf8 specials do not.
Works as a charm..

Felix
Reply With Quote
  #1001  
Old 08-30-2008, 02:32 PM
vbboarder's Avatar
vbboarder vbboarder is offline
 
Join Date: Jun 2008
Location: Silicon Valley, CA
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeeaahh - it's LDM's 1000th post in this thread alone!

Congrats Andrew on a successful mod & community, and thanks for all your help!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06174 seconds
  • Memory Usage 2,340KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_php
  • (10)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete