Thread: Major Additions - Yet Another Awards System 2.1.4
View Single Post
  #199  
Old 08-06-2007, 01:57 PM
Apophis Apophis is offline
 
Join Date: Apr 2003
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hate to do this, but I was curious if the author had any input on this dilemma or if anyone else knew of any plugins or modifications to the bbcode system that would allow me to complete this task.

Quote:
Originally Posted by Apophis View Post
I've been toying with this system for a while but what I really wanted to do was to get the awards to display via a bbcode tag.

I started by modifying the code a bit to get the awards to display below the signature area in the main body of a user's post but decided I wanted to give them more flexibility and give them some bbcode they could use to display their awards.

I added the following into class_bbcode.php

Code:
                // [RIBBONS]
                $tag_list['no_option']['ribbons'] = array(
                        'callback' => 'handle_bbcode_ribbons',
                        'strip_empty' => false,
                        'parse_option' => true
                );
Code:
        /**     
        * Handles a [RIBBONS] tag. TG Ribbons.
        *
        */ 
        function handle_bbcode_ribbons($ribbontext)
        {
                global $db, $vbulletin;
                $ribbontext = str_replace(array('<br>', '<br />', '\\"'), array('', '', '"'), $ribbontext);
                  
                $templaterib = 'tgribbons_display';
                eval('$html = "' . fetch_template($templaterib) . '";');
                return $html;
        }
Needles to say, it didn't do what I was hoping for. I created a new template called "tgribbons_display" using the code that I had placed in my postbit_legacy template and used the bbcode handler to display that template.

Well. Nothing shows up at all. I'm assuming that I'm missing some key step in pulling this off, such as making sure that the appropriate code is also executing to query the DB to display the awards when I call my template. Just to make sure I had the bbcode handler working I tried calling another template that just displays text and it worked fine.

Any ideas what I'm missing or what I could do to be able to use my custom bbcode tag to display the awards?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01158 seconds
  • Memory Usage 1,772KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete