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)

Mecho 04-17-2007 02:55 PM

Hi Milad ,

u have no idea how much i was looking for this one . Thanks for making it .

but i have problem with it :

when i tried to change prefix i get this error :
Quote:

" You tried to set an invalid prefix (for certain forum) to a thread. "
and in other sections that have more than 2 Prefixs , prefix doesnt shows up at all in moderation ...


Thanks in advance

any idea ??

Thanks

Mecho 04-21-2007 12:23 PM

any support ??

Nathan2006 04-21-2007 10:19 PM

Thank you Milad

Just what I needed.

Just a problem I found if you created a prefix like this:
<Problem>
It will not show up in the list :( it will only show up blank space of the selector

Thanks for any help

Install

cklimas 04-23-2007 05:48 AM

Quote:

Originally Posted by Nathan2006 (Post 1232951)
Just a problem I found if you created a prefix like this:
<Problem>
It will not show up in the list :( it will only show up blank space of the selector

This seems to be a problem with vBulletin. Text like this <text> will be interpreted as pseudo html tag. Try this [text] to avoid any problems.

Milad 04-24-2007 05:09 PM

Quote:

Originally Posted by cklimas (Post 1229654)
Even though it works, I receive this error msg:

Code:

Could not find phrase 'inline_prefix_changed'.

try to overwrite the product.

Quote:

Originally Posted by Mecho (Post 1229743)
Hi Milad ,

u have no idea how much i was looking for this one . Thanks for making it .

but i have problem with it :

when i tried to change prefix i get this error :


and in other sections that have more than 2 Prefixs , prefix doesnt shows up at all in moderation ...


Thanks in advance

any idea ??

Thanks

You have to change prefix forum by forum, don't try to apply a prefix in a forum to a thread in another forum.

Quote:

Originally Posted by Nathan2006 (Post 1232951)
Thank you Milad

Just what I needed.

Just a problem I found if you created a prefix like this:
<Problem>
It will not show up in the list :( it will only show up blank space of the selector

Thanks for any help

Install

I'll try to solve that for you.

nexialys 04-24-2007 05:21 PM

a little gift from myself... the French / Fran?ais phrases ;)

Milad, just add this to your distribution, i will delete the file afterward

Mecho 04-24-2007 07:52 PM

Quote:

Originally Posted by Milad (Post 1234809)
You have to change prefix forum by forum, don't try to apply a prefix in a forum to a thread in another forum.

!! of course i did like that ! but no work for me !

Nathan2006 04-25-2007 08:55 PM

Quote:

Originally Posted by Milad (Post 1234809)
I'll try to solve that for you.


Thanks :)

cklimas 05-02-2007 12:31 PM

Hi Milad,

it is not possible to unassign selected threads. Could you add this?

Regards
Chris

Princeton 05-21-2007 08:16 PM

not forward compatible - if a prefix is similar to one of the default admin dropdown values it will not work..

for example, if you or the staff creates a prefix called "close", "open", etc .. it will conflict with existing values

hence, this modification may have a negative affect on new options that jelsoft may add (in the future) to the admin moderation dropdown menu

a fix would be to prepend 'p_' to each prefix value (forumdisplay_start)
PHP Code:

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]);
        }
    }
    
    
insert_to_template('FORUMDISPLAY''<optgroup label=\"____________________\">'$vbulletin->templatecache['forumdisplay_inlineprefix'], 'before');
    
    
$prefix_array explode("\r\n"trim($foruminfo['threadprefix']));
    
    foreach (
$prefix_array as $key => $value)
    {
        
$inlineprefix .= "\t\t\t\t\t<option value=\"p_" urlencode($value) . "\">$value</option>\r\n";
        
//DEVDEBUG("prefix = ". $value);
    
}
    unset(
$prefix_array);


and remove 'p_' in inlinemod_action_switch before any action is taken

I changed inlinemod_action_switch to:
PHP Code:

if  ($foruminfo['allowprefix'])
{    
    
$prefix_array explode("\r\n"trim($foruminfo['threadprefix']));
    
    
$newprefix urldecode($_POST['do']);
    
// remove 'p_' 
    
$newprefix str_replace('p_'''$newprefix);
    
    if (
in_array($newprefix$prefix_array))
    {
        
/**
        * $newprefix exists in database so let's go ahead and use it
        * $newprefix exists so let's change $_POST action
        * Check threadids exist
        */
        
        
$handled_do true;
        
$_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']);
    }
    
// we're finished with $prefix_array
    
unset($prefix_array);




All times are GMT. The time now is 02:07 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.01307 seconds
  • Memory Usage 1,772KB
  • 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
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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