vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Want to display icons in place of certain tags (https://vborg.vbsupport.ru/showthread.php?t=201458)

fiveeight 01-12-2009 01:16 AM

Want to display icons in place of certain tags
 
Alright, I recently enabled tags on a forum I'm newly an admin on, and people are suggesting icons in place of tags in a subforum called "Gaming."

So basically if a thread is tagged "wii, action-adventure, zelda" I want the threadbit to ignore the action-adventure and zelda tags, and display an icon for the Nintendo Wii in place of the "wii" tag.

I'm thinking something like...

<if condition="$show['taglist'] AND $forumid == 41">
<if condition="inarray('playstation', $thread[taglist])">$psx_icon</if>
<if condition="inarray('n64', $thread[taglist]")>$n64_icon</if>
</if>

I'm just not sure if $thread[taglist] is an array. And if it's not I need to know how to turn it into one using PHP functions that are safe to use in conditionals.

Dismounted 01-12-2009 03:27 AM

You would be much better off doing this in a plugin. Find when the tags are processed in showthread.php, and I'm sure there is a hook there to play with. :)

fiveeight 01-12-2009 04:13 AM

I've resigned myself to this fact too. Well, time to learn me some PHP (luckily I have a CS degree).


All times are GMT. The time now is 03:51 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.00997 seconds
  • Memory Usage 1,705KB
  • 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
  • (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