vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Word Links FREE (Turn words into links) by BOP5 (https://vborg.vbsupport.ru/showthread.php?t=263699)

Kolbi 05-18-2011 10:54 AM

Nominated ;)

BirdOPrey5 05-18-2011 01:28 PM

Quote:

Originally Posted by Kolbi (Post 2197107)
3) Incredible the class tag seems not to work for links? Although it might be good, if you make the span tag as an option, because for example me I don't want to use it ;)

Your new version is now working ;) Although it was a clean vB 4.1.2 installation.


Suggestions:
  • Optional span tag
  • Option: Links per page

I hear you on the span tags... for now you can, and probably have, remove(d) them from the plugin code by changing the line:
PHP Code:

       $boplink '<span class="boplink"><a href="'.trim($boplink).'"' $boptarg $bopnofollow ' >$1</a></span>'

to:

PHP Code:

       $boplink '<a href="'.trim($boplink).'"' $boptarg $bopnofollow ' >$1</a>'

In all 3 plugins.

I'll make the span tags optional in the next release.

Appreciate the nominations. :cool:

iglow 05-18-2011 02:33 PM

what if the word is already anchored i nthe post
will this mod override the link somebody gave, or it leaves such links alone?

BirdOPrey5 05-18-2011 04:07 PM

It leaves existing links alone.

iglow 05-18-2011 05:52 PM

notminated for mod of month. this is great i was waitign for that

BirdOPrey5 05-19-2011 03:06 PM

Updated to 0.94- Adds the new feature to disable the <span> tags if not using custom css. Will prevent generating unnecessary HTML code.

Kolbi 05-19-2011 06:40 PM

Do you know how this mod influences performance?
For example if you have a lot of keywords to be replaced?

BirdOPrey5 05-19-2011 08:24 PM

Quote:

Originally Posted by Kolbi (Post 2197684)
Do you know how this mod influences performance?
For example if you have a lot of keywords to be replaced?

I don't have any statistics but it's fair to say the longer a post is and the more keywords you have the bigger affect on performance it will be. At what point it may become noticeable I don't know.

The bulk of the work here is being done by php's preg_replace function if that means anything to you.

Kolbi 05-20-2011 06:22 AM

Okay, thank you. ;)

A little suggestion, is it possible to disable it on PMs? I know the postbit is used there, too. But perhaps you can use the this_script attribut?


//Edit:

Found a good test about pre_replace and str_replace: http://blog.rvi-media.de/php/perform...e-ist-langsam/
Seems that str_replace is a little bit faster... :D

BirdOPrey5 05-20-2011 11:35 AM

Quote:

Originally Posted by Kolbi (Post 2197900)
Okay, thank you. ;)

A little suggestion, is it possible to disable it on PMs? I know the postbit is used there, too. But perhaps you can use the this_script attribut?


//Edit:

Found a good test about pre_replace and str_replace: http://blog.rvi-media.de/php/perform...e-ist-langsam/
Seems that str_replace is a little bit faster... :D

Good idea on the PM Disable option, I can work that into the next release.

str_replace is faster but not possible to use in this mod.


All times are GMT. The time now is 01:16 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.02069 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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