vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Username bolded in posts. (https://vborg.vbsupport.ru/showthread.php?t=108463)

d4v3r5 02-20-2006 01:39 PM

Username bolded in posts.
 
Is there a way to automatically bold any usernames in posts? Anybody know?
example:

---------
Hello, joeblow that's a good question you should check out that other thread where jane quoted frank.
---------

The bolding would happen automatically on submit.

Thanks :)

d4v3r5 04-17-2006 01:37 AM

anybody?

FlyingDutchman 04-17-2006 02:46 PM

This is probably quite easy, but it will most likely need to check for every word in a new post if it is a user or not... and depending on the size of your forums it could really slow the forums down..

d4v3r5 04-17-2006 02:52 PM

well thanks for the reply FlyingDutchman. :) I was hoping it could parse like the smiley code but if it adds strain on the server then maybe it's not worth it.

FlyingDutchman 04-17-2006 03:23 PM

1 Attachment(s)
well i pulled up 2 quick plugins which add this functionality...
only drawback is that it might slow your board (I only tested it on my test-board) and that if the username is the last word of the message it doesn't seem to work too
i'm not sure about casing but i suppose it only works with exact casing atm (not sure though!!)

maybe you should just give it a try and see if it works (well) or not...

sandrodz 04-17-2006 03:29 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=113237" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=113237</a>

here is the idea based on this one...

d4v3r5 04-17-2006 04:30 PM

wow that's so awesome FlyingDutchman! I'll give it a try tonight. the bolded username has become somewhat of a standard form of etiquette on our board and i think works well. An automated process would be great to keep things consistent and easy on the users.

Quote:

Originally Posted by FlyingDutchman
well i pulled up 2 quick plugins which add this functionality...
only drawback is that it might slow your board (I only tested it on my test-board) and that if the username is the last word of the message it doesn't seem to work too
i'm not sure about casing but i suppose it only works with exact casing atm (not sure though!!)

maybe you should just give it a try and see if it works (well) or not...

holy crap that worked! It IS case sensitive but the username as the last word works fine here. this is awesome! wow, thanks again you rule!

whoops, it doesn't work on new thread. oh well real close. :)

FlyingDutchman 04-18-2006 12:55 AM

hmm it should work on new thread
do you have both plugins that are in the xml file correctly installed and activated ? (which should be default I assume)

sorry but I can give you no other explanation of why it wouldn't work...
it works on my test board, and i just exported the xml... The xml seems quite normal too

hmm i'll look into it tomorrow

Tralala 04-18-2006 01:33 AM

Quote:

Originally Posted by FlyingDutchman
well i pulled up 2 quick plugins which add this functionality...
only drawback is that it might slow your board (I only tested it on my test-board) and that if the username is the last word of the message it doesn't seem to work too
i'm not sure about casing but i suppose it only works with exact casing atm (not sure though!!)

maybe you should just give it a try and see if it works (well) or not...


Just tested this out and it worked for me, on a new post. Pretty cool! However, I noticed it's really picky. For example if a username has a comma right after it, it won't be bolded.

d4v3r5 04-18-2006 03:17 AM

ok wait...it works as long as there aren't any returns...every name after a return doesn't go bold...hmmm

FlyingDutchman 04-18-2006 09:53 AM

tralala: true, that's just the way it's checking atm

okay the code I put in here isn't working perfect, I'll create some new code in the next few hours or so, which will hopefully work flawlessly

Anyway, I'm still wondering how this hack works performance-wise? Could you please tell me what size your board is, i.e. how many (active?) users?
If the result turn out to be good, I could release it here on vb.org of course.. I really think this is a nice addition that's why I'd like to know if this approach works fast enough ;)

FlyingDutchman 04-18-2006 10:16 AM

1 Attachment(s)
okay, I created a new product for this, you can disable the old plugins if you still have them active. Import the product in this xml file and you're ready to go

I just run a test on my board by posting a message with all possible ways a username could show up, like strange casing, end of a line (before a return), before a comma, after a character, after a return, etc.

it all seems to work pretty nicely


now the only thing I need is performance numbers :) - then i'll spice it up a bit and release it on here



anyway, tell me how it works please, thanks ;)



edit: posted hack now, keeping it in beta stage
i'd like to move discussion to that thread now
https://vborg.vbsupport.ru/showthread.php?p=952761

d4v3r5 04-18-2006 06:03 PM

woah that's exciting! i have 17,00 users on my board. not too much action.


All times are GMT. The time now is 06: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.01033 seconds
  • Memory Usage 1,738KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete