Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Closed Thread
 
Thread Tools
(Useless) Acronym vBcode Details »»
(Useless) Acronym vBcode
Version: 1.00, by Velocd Velocd is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 05-24-2003 Last Update: Never Installs: 5
 
No support by the author.

While browsing the web I came across a website that used <acronym> HTML4 tag, and finding the concept interesting, I decided to try out a vBcode tag for it.

I soon ran into an error with the <acronym> tag that was buggin' the hell out of me, so I switched over to the <span> tag.

Anyway, 98% of the people here might find this utterly useless, but what this does is allows somebody to type:

Code:
[acro]United States of America[/acro]
[acro]PHP Hypertext Preprocessor[/acro]
And outputted will be:

Code:
USA
PHP
This is different from the HTML acronym tag for it automatically does the ?acronymization? of the compounded term for you.

Upon hovering the word with your mouse, which will not be solid underlined but "dotted" underlined, the acronym full term will show up in one of those "alt" boxes.

The main convenience of the HTML and this acronym tag is that sometimes not everyone knows what an acronym means, if the acronym isn't well-known, so this will aid in clarifying things.

----------------

If you feel inspired by this hack, feel free to click the install-button (inspired meaning, even if you didn't install it on your forum j/k)

Show Your Support

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

Comments
  #2  
Old 05-25-2003, 03:33 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is an example, just for those deprived of imagination.
  #3  
Old 05-25-2003, 04:55 AM
Austin Dea's Avatar
Austin Dea Austin Dea is offline
 
Join Date: Dec 2001
Location: Denver, CO, USA
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I saw this at vBT but with no hacking.. o_O
  #4  
Old 05-25-2003, 04:56 AM
Austin Dea's Avatar
Austin Dea Austin Dea is offline
 
Join Date: Dec 2001
Location: Denver, CO, USA
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted at vBTemplates
vB Code tag: Acronym
vB Code replacement: <span style="border-bottom: 1px dashed {option}; cursor: help;">{param}</span>
vB Code example: [Acronym=#006699]This BB code changes the cursor and title.[/Acronym]
vB Code explanation: Acronym - descibibing with question cursor help. Developded by Marco from WebMaxtor.com
Use {option}: Yes
=P
  #5  
Old 05-25-2003, 05:02 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you took a second to look inside the magical file titled "install_acronym.txt" you would find out how this differs from the general <acronym> tag, as I stated in the first post. =P *infinite +1

You can't do this style of hack with no php coding.
  #6  
Old 05-25-2003, 05:03 AM
Robink Robink is offline
 
Join Date: Feb 2003
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool, but useless...
  #7  
Old 05-25-2003, 05:05 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hence the title.
  #8  
Old 05-25-2003, 05:11 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Found a problem with it. If you use the word OFF in an acronym, it picks up the last F because one of the omitted words is OF. Try doing:

Laughing My Ass Off

with your code and you will see what I mean.
  #9  
Old 05-25-2003, 05:30 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah... looks like I underestimated the functionality of that darn str_replace().

I'm a bit tired as of now though, and about to doze off, but if anyone would care to find out how to make it so str_replace() matches "whole words" only, that would be cool.
  #10  
Old 05-25-2003, 05:34 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do a preg_replace instead.
Closed Thread

Thread Tools

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 06:48 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.05611 seconds
  • Memory Usage 2,281KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (1)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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