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-17-2011 12:59 PM

Third notice (just saw the update):

Why not using the class attribut instead of adding a span?

Instead of:
Code:

<span class="boplink"><a href="'.trim($boplink).'"' . $boptarg . $bopnofollow . ' >' . $bop_find_array[$bopi] .'</a></span>
try:
Code:

<a class="boplink" href="'.trim($boplink).'"' . $boptarg . $bopnofollow . ' >' . $bop_find_array[$bopi] .'</a>
I guess the span tag may be xhtml invalid... (not tested but I guess it can be...)

BirdOPrey5 05-17-2011 01:17 PM

Quote:

Originally Posted by Kolbi (Post 2196756)
Have 2 notices:

The number of keyword replaces seems not to work. Tried 1 or 2 replaces but all keywords (3 times) were replaced...

Another little question perhaps you make it case sensitive?

Because the first word in a sentence is written in big letters for example, but the word in a senctence is written in small letters:
"The school is over! So the pupil are on the way home."
If I now want to replace "the" with "<a hre="/">the</a>" it will be:
"<a hre="/">the</a> school is over! So <a hre="/">the</a> pupil are on <a hre="/">the</a> way home."
So the first word is now written in small letters...

1) It's 1 match per keyword. If your keywords are red, blue, green and your limit is 1, the sentence: "I like red, blue, and green." will still see 3 links. The sentence "I have a red hat, a red coat, and red shoes." will have only 1 link.

2) I can probably get it to match the case of the word it was linking, keeping the original case format. It would still be case insensitive when finding words. Actually I can make that an option too.

Quote:

Originally Posted by Kolbi (Post 2196757)
Third notice (just saw the update):

Why not using the class attribut instead of adding a span?

Instead of:
Code:

<span class="boplink"><a href="'.trim($boplink).'"' . $boptarg . $bopnofollow . ' >' . $bop_find_array[$bopi] .'</a></span>
try:
Code:

<a class="boplink" href="'.trim($boplink).'"' . $boptarg . $bopnofollow . ' >' . $bop_find_array[$bopi] .'</a>
I guess the span tag may be xhtml invalid... (not tested but I guess it can be...)

Mostly because putting the class in the a tag didn't work in my test. Does it work for you? :confused:

Kolbi 05-17-2011 01:27 PM

1) Is the limitation per post or page? Tried it with several posts on one page. Not with the same word mulitple in one post.

2) The solution with the original case format would propably be the best.

3) Normally it should work. Will try it later on.

BirdOPrey5 05-17-2011 01:32 PM

1) per post

2) Will post when I update the mod

3) I thought so too but it didn't. This site suggested spans were needed: http://www.echoecho.com/csslinks.htm

Brandon Sheley 05-17-2011 01:50 PM

great mod, I know it's one that's been asked for years

for5up 05-17-2011 02:27 PM

not working on my 4.1.3

BirdOPrey5 05-17-2011 02:33 PM

Quote:

Originally Posted by for5up (Post 2196779)
not working on my 4.1.3

I'm going to need more info then that to help... What isn't working?
Did it install?
Did you set "enable" to Yes?
Can you paste here a list of the keywords and URL's you are using?
What actually happens- nothing? Bad links? Error code?

Link to a post if possible?

BirdOPrey5 05-17-2011 02:53 PM

Updated to 0.93

New in 0.93: Linked words now retain the same case as they were originally typed. Also a new option to specify whether linked words are case sensitive or not.

Kolbi 05-17-2011 04:00 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2196767)
1) per post

2) Will post when I update the mod

3) I thought so too but it didn't. This site suggested spans were needed: http://www.echoecho.com/csslinks.htm

1) Maybe you can add a setting to define the replaced keywords per page?
How many times of each keyword shall be replaced per page?
How many keywords (whole keywords added above) shall be replaced on one page?
2) Thank you, will try it out.

3) Can't test it, it seems that your new version isn't working anymore? Can't get it working on vB 4.1.2. It doesn't replaces the keywords with the links?

BirdOPrey5 05-17-2011 04:50 PM

Very weird... I just re-uploaded the exact code I just tested on a 4.1.2 forum. Please try again. Also I uploaded the older version just in case.

Please let me know.


All times are GMT. The time now is 06:02 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.01145 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
  • (4)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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