vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   (Useless) Acronym vBcode (https://vborg.vbsupport.ru/showthread.php?t=53354)

Velocd 05-24-2003 10:00 PM

(Useless) Acronym vBcode
 
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 :rolleyes: j/k)

Velocd 05-25-2003 03:33 AM

Here is an example, just for those deprived of imagination. :p

Austin Dea 05-25-2003 04:55 AM

I saw this at vBT but with no hacking.. o_O

Austin Dea 05-25-2003 04:56 AM

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

Velocd 05-25-2003 05:02 AM

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.

Robink 05-25-2003 05:03 AM

Cool, but useless...

Velocd 05-25-2003 05:05 AM

Hence the title. ;)

Boofo 05-25-2003 05:11 AM

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.

Velocd 05-25-2003 05:30 AM

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. ;)

Boofo 05-25-2003 05:34 AM

Do a preg_replace instead.


All times are GMT. The time now is 11:29 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.01265 seconds
  • Memory Usage 1,728KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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