vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Change Threads Prefix Inline (https://vborg.vbsupport.ru/showthread.php?t=144982)

Alfa1 07-25-2007 10:01 AM

Yes, I imported the product. What else can you do with it?

I am running 3.7pl1 but this is patched to 3.7PL1 from 3.62. Can this have anything to do with why this problem is caused?

WarDoGG; what version are you running? Are you running a patched upgrade like me?

Mecho 07-25-2007 12:24 PM

Quote:

Originally Posted by Milad (Post 1288342)
I'll release new version.

any news ??

Alfa1 08-14-2007 08:24 PM

Any news on the ETA of the new version? I really like this hack, but the current version doesn't work for me.

Adam21 08-18-2007 04:43 PM

installed in my vb368 without no problems,thanks! :)

Alfa1 09-05-2007 12:17 PM

Yes, but you changed the code in order to be able to do so.
Quote:

Originally Posted by Adam21
Here's what i use.In your FORUMDISPLAY template:
Add this code:
Code:

<!-- Fixed Threadprefix Inline -->
<if condition="$show['threadprefix']">
</form>
<td class="smallfont">
<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="f" value="$forumid" />
<input type="hidden" name="page" value="$pagenumber" />
<input type="hidden" name="pp" value="$perpage" />
<input type="hidden" name="sort" value="lastpost" $sort[lastpost] />
<input type="hidden" name="order" value="desc" $order[desc] />
<input type="hidden" name="daysprune" value="-1" $daysprunesel[all] />
<strong>Filter by prefix:</strong> $threadprefixes
<input type="submit" class="button" value="Show" /></form></td></if>
<!-- /Fixed Threadprefix Inline -->

AFTER this code:
Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead"><phrase 1="$limitlower" 2="$limitupper" 3="$totalthreads">$vbphrase[showing_threads_x_to_y_of_z]</phrase></td>
       
</tr>
<tr valign="top">
        <td class="alt1">
       
                <table cellpadding="3" cellspacing="0" border="0" align="center">
                <tr>

and BEFORE this code

Code:

                        </select></td>
                        <td><select name="order">
                                <option value="asc" $order[asc]>$vbphrase[ascending]</option>
                                <option value="desc" $order[desc]>$vbphrase[descending]</option>
                        </select></td>

Good luck!

I tried to do this, but the code Adam says I should place it after does not exist in my FORUMDISPLAY.

Any idea's on this?

Milad 09-06-2007 10:49 AM

OK, I'm really sorry.

I have much works than you can imagine.

I'll post a new version within two days.

bjhuang 09-09-2007 08:51 AM

to support global prefixes:

PHP Code:

[OPEN]
pluginForum Display Inline Prefix
 
[REPLACE ALL]
 
 if (
$foruminfo['allowprefix'])
{
    if (!
function_exists(insert_to_template))
    {
        function 
insert_to_template($templatename$remark$location$position 'after')
        {
            global 
$vbulletin;
            
            if (
$position == 'after')
            {
                
$location $remark $location;
            }
            else if (
$position == 'before')
            {
                
$location $location $remark;
            }
            
            
$vbulletin->templatecache[$templatename] = str_replace($remark$location$vbulletin->templatecache[$templatename]);
        }
    }
    
    if (
$foruminfo['threadprefix']) $threadprefixes_inline explode("\r\n"trim($foruminfo['threadprefix']));
    else 
$threadprefixes_inline = array();
                
    if (
$vbulletin->options['showdefaultprefixes'] AND $vbulletin->options['defaultprefixes']) {
            
$defaultprefixes_inline explode("\r\n"trim($vbulletin->options['defaultprefixes']));
            switch(
$vbulletin->options['showdefaultprefixes'])
            {
                case 
1:
                    if (empty(
$threadprefixes_inline)) $threadprefixes_inline $defaultprefixes_inline;
                    break;
                case 
2:
                    
$threadprefixes_inline array_merge($defaultprefixes_inline$threadprefixes_inline);
                    break;
                case 
3:                
                    
$threadprefixes_inline array_merge($threadprefixes_inline$defaultprefixes_inline);
                    break;
            }
            unset(
$defaultprefixes_inline);
    }

    if(!empty(
$threadprefixes_inline )){
        
insert_to_template('FORUMDISPLAY''<optgroup label=\"____________________\">'$vbulletin->templatecache['forumdisplay_inlineprefix'], 'before');
        
$threadprefixes_inline = &array_unique($threadprefixes_inline);             
        foreach(
$threadprefixes_inline as $prefix_inline) {
            if(!empty(
$prefix_inline)) {
                
$inlineprefix .= "\t\t\t\t\t<option value=\"" urlencode($prefix_inline) . "\">" unhtmlspecialchars($prefix_inline) . "</option>\r\n";
            }
        }
    }
    unset(
$threadprefixes_inline);
}

[
OPEN]
pluginInline Mod Action Switch 

[
REPLACE ALL]
if  (
$foruminfo['allowprefix'])
{
    if (
$foruminfo['threadprefix']) $threadprefixes_inline explode("\r\n"trim($foruminfo['threadprefix']));
    else 
$threadprefixes_inline = array();
                
    if (
$vbulletin->options['showdefaultprefixes'] AND $vbulletin->options['defaultprefixes']) {
            
$defaultprefixes_inline explode("\r\n"trim($vbulletin->options['defaultprefixes']));
            switch(
$vbulletin->options['showdefaultprefixes'])
            {
                case 
1:
                    if (empty(
$threadprefixes_inline)) $threadprefixes_inline $defaultprefixes_inline;
                    break;
                case 
2:
                    
$threadprefixes_inline array_merge($defaultprefixes_inline$threadprefixes_inline);
                    break;
                case 
3:                
                    
$threadprefixes_inline array_merge($threadprefixes_inline$defaultprefixes_inline);
                    break;
            }
            unset(
$defaultprefixes_inline);
    } 
    
    
$prefix_array $threadprefixes_inline;
    if (
in_array(urldecode($_POST['do']), $prefix_array))
    {
        
$handled_do true;
        
$newprefix urldecode($_POST['do']);
        
$_POST['do'] = 'changeprefix';
        
        if (empty(
$vbulletin->GPC['tlist']))
        {
            eval(
standard_error(fetch_error('you_did_not_select_any_valid_threads')));
        }
        
        if (
count($vbulletin->GPC['tlist']) > $threadlimit)
        {
            eval(
standard_error(fetch_error('you_are_limited_to_working_with_x_threads'$threadlimit)));
        }
        
        
$threadids implode(','$vbulletin->GPC['tlist']);
        unset(
$prefix_array);
    }



Alfa1 09-09-2007 02:01 PM

What does your global prefixes code exactly do?
Does it allow to make a number of prefixes global, while letting other prefixes remain local?

I would really appreciate the code for allowing prefixes to be applied to categories, but not global.

bjhuang 09-10-2007 04:38 AM

thread prefix supports global prefixes. you can choose how to apply to single forum. but this mod doesn't recognize them.

Milad 09-13-2007 04:22 PM

- 1.1.0 released on September, 13 2007 (Added the default prefixes and fixed some bugs).


All times are GMT. The time now is 11:16 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.01296 seconds
  • Memory Usage 1,799KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete