vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Info box on Postbit (https://vborg.vbsupport.ru/showthread.php?t=248454)

Asterix_ita 07-13-2011 02:19 PM

@Taurus1

This change should be sufficient

Go to admincp -> Plugin & Products -> Plugin Manager -> Product : CT Info box

Edit plugin Info Box

find:
Code:

        if ($ctinfo['button'])
                        {
                                $templater = vB_Template::create('ct_info_button');
                                $templater->register('post', $post);
                                $templater->register('ctinfo', $ctinfo);
                                $template_hook['postbit_controls'] .= $templater->render();
                        }

replace
Code:

                                        if ($ctinfo['button'])
                        {
                                $templater = vB_Template::create('ct_info_button');
                                $templater->register('post', $post);
                                $templater->register('ctinfo', $ctinfo);
                                $ctinfo['pbutton']= $templater->render();
                        }


add this variable {vb:raw ctinfo.pbutton} in the templates postbit or postbit_legacy to the desired position

regards

reddyink 07-13-2011 03:47 PM

Looks like a good MOD but doesn't display Multi-select Checkbox information.

Here is the out put of multi-check box: 121379053 (instead of reading, writing, soccer etc).

Appreciate help!

Asterix_ita 07-13-2011 04:02 PM

Unfortunately, the multi-value fields is a limitation of this plugin

https://vborg.vbsupport.ru/showpost....0&postcount=34


Regards

Taurus1 07-14-2011 03:14 AM

Quote:

Originally Posted by Asterix_ita (Post 2220036)
@Taurus1

This change should be sufficient

Go to admincp -> Plugin & Products -> Plugin Manager -> Product : CT Info box

Edit plugin Info Box

find:
Code:

    if ($ctinfo['button'])
            {
                $templater = vB_Template::create('ct_info_button');
                $templater->register('post', $post);
                $templater->register('ctinfo', $ctinfo);
                $template_hook['postbit_controls'] .= $templater->render();
            }

replace
Code:

                    if ($ctinfo['button'])
            {
                $templater = vB_Template::create('ct_info_button');
                $templater->register('post', $post);
                $templater->register('ctinfo', $ctinfo);
                $ctinfo['pbutton']= $templater->render();
            }


add this variable {vb:raw ctinfo.pbutton} in the templates postbit or postbit_legacy to the desired position

regards

Thank you very much. However it does not work. Does not matter where I insert this:

Code:

{vb:raw ctinfo.pbutton}
It does not show up. :(

Asterix_ita 07-14-2011 11:16 AM

released version 4.1.1 beta

Add option show guest or only member
Add option move button infobox

Quote:

Suggestion: when some users fill only the B column fields only the box will leave the whole A column area empty, can you modify the code for next release so the column B area replaces column A area when fields of column A are empty.

Activated


Regards

Taurus1 07-14-2011 12:14 PM

Thank you so much for the update. I can now insert the button anywhere, but if I insert it let's say to the left of the 'promote to article' link, then the text is there, but the button is missing. Why would that be?

Asterix_ita 07-14-2011 12:45 PM

problems with css, in your case you need to change the template ct_info_button

find:
Code:


        <style type="text/css">
        <vb:if condition="$vboptions['ct_infobox_autobutton']">
        .postbitlegacy .postfoot .textcontrols a.post_info_button, .postbit .postfoot .textcontrols a.post_info_button  {
                background: url({vb:stylevar imgdir_button}/post_infobox.png) no-repeat transparent {vb:stylevar left};
                padding-{vb:stylevar left}: 20px;
        }
        .postbitlegacy .postfoot .textcontrols a.post_info_button:hover, .postbit .postfoot .textcontrols a.post_info_button:hover  {
                background: url({vb:stylevar imgdir_button}/post_infobox-hover.png) no-repeat transparent {vb:stylevar left};
                }
       
        <vb:else />
       
        a.post_info_button{
                background: url({vb:stylevar imgdir_button}/post_infobox.png) no-repeat transparent {vb:stylevar left};
                padding-{vb:stylevar left}: 20px;
        }
        a.post_info_button:hover  {background: url({vb:stylevar imgdir_button}/post_infobox-hover.png) no-repeat transparent {vb:stylevar left};}
       
        </vb:if>
</style>

replace:

Code:

        <style type="text/css">

        .postbitlegacy .postfoot .textcontrols a.post_info_button, .postbit .postfoot .textcontrols a.post_info_button  {
                background: url({vb:stylevar imgdir_button}/post_infobox.png) no-repeat transparent {vb:stylevar left};
                padding-{vb:stylevar left}: 20px;
        }
        .postbitlegacy .postfoot .textcontrols a.post_info_button:hover, .postbit .postfoot .textcontrols a.post_info_button:hover  {
                background: url({vb:stylevar imgdir_button}/post_infobox-hover.png) no-repeat transparent {vb:stylevar left};
                }
       
</style>

regards

danswano 07-14-2011 01:44 PM

Bugs discovered:
1. When "Show infobox button" set to no and guests set to no they can still see the box. (not the button only box)
2. When "Show infobox button" set to no and user have no input a little empty box appears under each post.
3. In case number 1 i mentioned above column B still in place while column A empty when user has no column A inputs (guest mode) but it's working fine for registered users mode.

Asterix_ita 07-14-2011 02:04 PM

sorry

Are you sure you have installed the 4.1.1?
as were the bugs 4.1.0, which is not reflected in 4.1.1 installed in the test

Thanks


PS. on 4.1.1 I have this as the first instruction

Code:

if ($this->registry->options['ct_infobox_guest'] OR $show['member'])
    {

then the other options are not analyzed, tonight at home control with more calm, thanks

Taurus1 07-14-2011 02:07 PM

Quote:

Originally Posted by Asterix_ita (Post 2220422)
problems with css, in your case you need to change the template ct_info_button

find:
Code:


    <style type="text/css">
    <vb:if condition="$vboptions['ct_infobox_autobutton']">
    .postbitlegacy .postfoot .textcontrols a.post_info_button, .postbit .postfoot .textcontrols a.post_info_button  {
        background: url({vb:stylevar imgdir_button}/post_infobox.png) no-repeat transparent {vb:stylevar left};
        padding-{vb:stylevar left}: 20px;
    }
    .postbitlegacy .postfoot .textcontrols a.post_info_button:hover, .postbit .postfoot .textcontrols a.post_info_button:hover  {
        background: url({vb:stylevar imgdir_button}/post_infobox-hover.png) no-repeat transparent {vb:stylevar left};
        }
   
    <vb:else />
   
    a.post_info_button{
        background: url({vb:stylevar imgdir_button}/post_infobox.png) no-repeat transparent {vb:stylevar left};
        padding-{vb:stylevar left}: 20px;
    }
    a.post_info_button:hover  {background: url({vb:stylevar imgdir_button}/post_infobox-hover.png) no-repeat transparent {vb:stylevar left};}
   
    </vb:if>
</style>

replace:

Code:

    <style type="text/css">

    .postbitlegacy .postfoot .textcontrols a.post_info_button, .postbit .postfoot .textcontrols a.post_info_button  {
        background: url({vb:stylevar imgdir_button}/post_infobox.png) no-repeat transparent {vb:stylevar left};
        padding-{vb:stylevar left}: 20px;
    }
    .postbitlegacy .postfoot .textcontrols a.post_info_button:hover, .postbit .postfoot .textcontrols a.post_info_button:hover  {
        background: url({vb:stylevar imgdir_button}/post_infobox-hover.png) no-repeat transparent {vb:stylevar left};
        }
   
</style>

regards


Thank you very very much! It now works and looks great!! :up:


All times are GMT. The time now is 06:31 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.01389 seconds
  • Memory Usage 1,763KB
  • 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
  • (10)bbcode_code_printable
  • (3)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