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)

Milad 04-15-2007 10:00 PM

Change Threads Prefix Inline
 
Brought to you by Syrian Medical Society & Milado

Introduction & Description:
It was difficult to change a thread prefix, thread by thread, the editing process of first post to change the prefix is inappropriate and it takes a long time.
This product allows you to set a prefix to multiple threads inline, using the moderation drop-down menu in forum display page (see the screen shoot). you will save your time and effort.

Installation:
One step! Import the product file product-threadprefix_changeinline.xml and you're done.

Of course, it depends on the product Thread Prefixes 1.6.1 which must be installed.

You may also upload the language file for your language if it's attached below.

How to use?
It works exactly like closing, opening, sticking or unsticking multiple threads inline.

Change log:
- 1.0.0 released on April, 16 2007
- 1.1.0 released on September, 13 2007 (Added the default prefixes and fixed some bugs)

Thanks to COBRAws for his Spanish translation (attached).
Thanks to nexialys for his French translation (attached).

Click install to receive support & updates.

vspro 04-16-2007 01:57 AM

thax I intall now

COBRAws 04-16-2007 03:58 AM

spanish translation

aLReeMi 04-16-2007 08:29 AM

nice add

thanks

Hornstar 04-16-2007 09:48 AM

Hey, this is what i needed when i had that hack installed, now ive removed it. this may make me consider reinstalling it now ^^

ps, any chance you may consider adding inline moderation to some other hacks? because I would love it if you could add it for the bump thread/make thread older hack.

AzzidReign 04-16-2007 02:02 PM

Wow, this looks awesome! I'll have to install this on my board later tonight.

*Clicks install

TheMilkCarton 04-16-2007 04:55 PM

This is great work.

This solves my issues with using Thread Prefixes together with the vB Event Forums and Farcaster's Event Attendance. When adding a calendar event you couldn't choose a prefix, so it was very very tedious having to go in and edit every single thread to add the prefix.

Thanks!

Pottsy 04-16-2007 06:44 PM

Thank you! :)

BobbyBig 04-17-2007 10:20 AM

I love you for this. Installed

cklimas 04-17-2007 12:15 PM

Even though it works, I receive this error msg:

Code:

Could not find phrase 'inline_prefix_changed'.

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);



Mecho 06-12-2007 03:32 PM

Quote:

Originally Posted by Princeton (Post 1252303)
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)

is it possible that u post Fixed XML file here ? Thanks

Milad 06-19-2007 09:19 AM

I'll fix it. When I have the time.

Do you have any problem with it?

Mecho 06-22-2007 12:19 PM

yeap :

https://vborg.vbsupport.ru/showpost....3&postcount=11

thanks

WarDoGG 07-03-2007 02:17 PM

This mod screwed my inline moderation system.... Helpppppppp inline moderation doesnt work now !!

whenever i select thread by clicking on checkbox, and try to perform any action, all that happens is, i return to the same page... no action performed..

I please request the author of this mod to help me out :(

Milad 07-11-2007 12:45 PM

I'll release new version.

Alfa1 07-24-2007 11:56 PM

My inline moderation is screwed as well. Please release a new version.

TheMilkCarton 07-25-2007 07:38 AM

Quote:

Originally Posted by WarDoGG (Post 1281966)
This mod screwed my inline moderation system.... Helpppppppp inline moderation doesnt work now !!

whenever i select thread by clicking on checkbox, and try to perform any action, all that happens is, i return to the same page... no action performed..

I please request the author of this mod to help me out :(

Quote:

Originally Posted by Alfa1 (Post 1300693)
My inline moderation is screwed as well. Please release a new version.

No, this mod didn't screw the inline moderation system. This one did.

Specifically, check my post on the 2nd page with the fix.

If this mod broke inline moderation, then it was your fault. :)

0tolerance 07-25-2007 08:37 AM

I LOVE YOU!!!
i was thinking the other day that i hope some one made one of these

Alfa1 07-25-2007 09:22 AM

Quote:

Originally Posted by TheMilkCarton (Post 1300934)
No, this mod didn't screw the inline moderation system. This one did.

Specifically, check my post on the 2nd page with the fix.

If this mod broke inline moderation, then it was your fault. :)

I didn't install that hack.

TheMilkCarton 07-25-2007 09:22 AM

Quote:

Originally Posted by Alfa1 (Post 1300987)
I didn't install that hack.

Well then you did something wrong with this one.

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 04:54 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.01815 seconds
  • Memory Usage 1,914KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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