vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Smilie code to parse BBCode? (https://vborg.vbsupport.ru/showthread.php?t=295391)

Guest210212002 02-22-2013 02:32 PM

Smilie code to parse BBCode?
 
Odd question, but hopefully someone knows the answer. I'm looking to make a smilie code, post and parse a BBCode. For example, if someone posted:

Code:

:ducks:
The replacement would be:

Code:

[img] url_to_a_picture_of_ducks.jpg [/img]
I tried using a replacement variable, which does what it should, but vB doesn't parse the image code - it just shows up as is. If I edit/save the post it displays the image, but I need to add that second parse in there so that when a user types :ducks: both the replacement variable AND the IMG call happen at post time.

Is this possible?

kh99 02-22-2013 02:42 PM

I'm not sure I follow all that, but can't you use the "Add New Smilie" function (under "Smilies" in the admincp)?

Guest210212002 02-22-2013 07:20 PM

What I'm trying to do is have a :code: do something other than show a smilie. An image link was a terrible example, haha. Sorry about that!

Exact example: I have an MP3 embed custom BBCode, so [mp3]urlofsong.mp3[/mp3] will show a small flash player with the user's input. I tried making a replacement variable that uses the MP3 BBCode with a certain MP3 already included, so that if they type :mp3: in a post it would automatically post [mp3]urlofsomesongonmyserver.mp3[/mp3].

The replacement variable works, but what gets put into the post doesn't get parsed. So instead of seeing the results of what would normally happen if you just typed in [mp3]whatever.com/mp3.mp3[/mp3] (my flash player), it just shows the exact code itself. The replacement variable works, but it doesn't parse the BBCode. vB is running the query for the replacement variable, so :mp3: DOES put [mp3]thingIwant[/mp3] into the post, but the BBCode itself doesn't parse.

Does that make sense?


All times are GMT. The time now is 03:38 AM.

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.00871 seconds
  • Memory Usage 1,710KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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