vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I get this code to work with vb3.5? (https://vborg.vbsupport.ru/showthread.php?t=97158)

Wasim 09-29-2005 06:38 PM

How do I get this code to work with vb3.5?
 
In forumdisplay.php:

Find:
if ($thread['sticky'])
{
$threadbit = &$threadbits_sticky;
}

Replace with:
if ($thread['sticky'])
{
require_once('./includes/functions_bbcodeparse.php');
$thread['threadtitle'] = parse_bbcode($thread['threadtitle']);
$threadbit = &$threadbits_sticky;
}

Andreas 09-29-2005 06:44 PM

I am assuming this Code should parse BBCode in Titles of sticky Threads?

Wasim 09-29-2005 06:46 PM

Quote:

Originally Posted by KirbyDE
I am assuming this Code should parse BBCode in Titles of sticky Threads?

yes, basically it lets sticky threads have bbcode attributes. So we can make them color/bold.

Andreas 09-29-2005 07:03 PM

You can try this
threadbit_process
PHP Code:

if ($thread['sticky'])
{
    global 
$parser;
    if (!
$parser)
    {
        require_once(
DIR '/includes/class_bbcode.php');
        
$parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());
    }
    
$thread['threadtitle'] = $parser->do_parse($thread['threadtitle'], falsefalsetruefalse);


However, you will run into problems with ugly display on many other pages.

Wasim 09-30-2005 11:34 PM

Thanks Kirby, but is this safe?

Wasim 10-02-2005 07:38 AM

Old Code I got and used on vbulletin 3.07 Doesnt work anymore.

In forumdisplay.php:

Find:
if ($thread['sticky'])
{
$threadbit = &$threadbits_sticky;
}

Replace with:
if ($thread['sticky'])
{
require_once('./includes/functions_bbcodeparse.php');
$thread['threadtitle'] = parse_bbcode($thread['threadtitle']);
$threadbit = &$threadbits_sticky;
}

Martz 10-02-2005 07:59 PM

I'm having the same problems since the bbcode parser seems to have changed into some sort of class, rather than just being an available function we used to use before :(

Good in the long run I guess, it just b0rked our old news system from the forums to the main site.

Got it fixed now :D Thanks for the thread Kirby.

Tip: if you are pulling from an external database, don't mix your variables!!

Wasim 10-02-2005 09:15 PM

Quote:

Originally Posted by Martz
I'm having the same problems since the bbcode parser seems to have changed into some sort of class, rather than just being an available function we used to use before :(

Good in the long run I guess, it just b0rked our old news system from the forums to the main site.

Got it fixed now :D Thanks for the thread Kirby.

Tip: if you are pulling from an external database, don't mix your variables!!

What do you mean pulling from an external database?

Kirby, it's not working for me... where exacty am i supposed to insert this code?

Andreas 10-02-2005 09:45 PM

Quoting myself:

Quote:

Originally Posted by KirbyDE
You can try this
threadbit_process


Wasim 10-03-2005 04:19 AM

Quote:

Originally Posted by KirbyDE
Quoting myself:

Im sorry for sounding dumb, but is that a template or a file?

Andreas 10-03-2005 11:22 AM

Neither. It's the Hook to attach the Code to :)

john1744 10-04-2005 02:44 PM

Kirby I'm looking to do this also. I'm thinking I need to create a hook in the plugin manager? I'm lost... I've never ventured into this side of vBulletin. :/

Wasim 10-05-2005 02:18 AM

Quote:

Originally Posted by john1744
Kirby I'm looking to do this also. I'm thinking I need to create a hook in the plugin manager? I'm lost... I've never ventured into this side of vBulletin. :/


LOL... I still dont understand what he means. I think he's gonna have to post a step by step of what to do for me to understand. Sorry, I have no idea what you are talking about Kirby. What is a hook exactly?

Forgive me for being dumb.

P.S. Smash Bros Online will own.

John, I figured it out. You are supposed to Add New Plugin in Plugin Manager. After that you Select threadbit_process. Then you title it whatever you want. After that insert the code kirby wrote. And save.

THANKS KIRBY. I <3 You.


All times are GMT. The time now is 05:26 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.01012 seconds
  • Memory Usage 1,742KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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