vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Inferno Shoutbox - Show thread prefix (https://vborg.vbsupport.ru/showthread.php?t=214554)

GCSkye 05-26-2009 02:12 AM

Inferno Shoutbox - Show thread prefix
 
I was looking to have prefix show up when messages are posted in infernoshoutbox. I wen't through the xml file and found the following:

Code:

        if ($infernoshout->vbulletin->options['ishout_bbcodes'] & 64)
        {
                $titleprefix = '[thread=' . $threadid . ']';
                $titlesuffix = '[/thread]';
        }

        $shout =& new shout;
        $shout->silent = true;
        $shout->process('/me posted the thread ' . $titleprefix . unhtmlspecialchars($this->thread['title']) . $titlesuffix);
}

This seems to be what is telling it to create a new shout when users post a thread. I need it to add the thread prefix as well.

Lynne 05-26-2009 03:09 AM

You'll need to grab the prefixid in the query for the thread. Then you may use something like this code to create the prefix (it's an example! Modify it for your own needs). If you need further help, you will have to ask in the modification thread since they will know the correct place to add the code and how to add to the query.

PHP Code:

                if ($variable['prefixid']) 
                { 
                    
$variable['prefix_plain_html'] = htmlspecialchars_uni($vbphrase["prefix_$variable[prefixid]_title_plain"]); 
                    
$variable['prefix_rich'] = $vbphrase["prefix_$variable[prefixid]_title_rich"]; 
                } 
                else 
                { 
                    
$variable['prefix_plain_html'] = ''
                    
$variable['prefix_rich'] = ''
                } 



All times are GMT. The time now is 05:03 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.00970 seconds
  • Memory Usage 1,719KB
  • 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)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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