vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - [OzzModz] First Post On All Pages Per Thread/Forum (https://vborg.vbsupport.ru/showthread.php?t=306348)

tommyxv 11-27-2014 10:25 PM

I see. I use this for my vendors to post up sales, and being able to use the regular postibit allows them more width for pics and info. :(

ozzy47 11-27-2014 10:31 PM

Well in that case you would need to edit one of the plugins for the mod.

Find the plugin Render The Postbit Template found under the group, [OzzModz] First Post On All Pages Per Thread/Forum

Then replace the contents of that with the following.

PHP Code:

global $vbulletin;

if (
$this->registry->options['ozzmodz_firstpost_display_active']AND is_member_of($vbulletin->userinfoexplode(','$this->registry->options['ozzmodz_firstpost_display_groups'])))
{
    
$included_forums explode(','$this->registry->options['ozzmodz_firstpost_display_forums']);
    
$included_thread explode(','$this->registry->options['ozzmodz_firstpost_display_threads']);
    
    if (
THIS_SCRIPT != 'private'
    {       
        
//if($this->thread['firstpostid'] == $this->post['postid'] AND $vbulletin->GPC['pagenumber'] > 1 AND in_array($this->thread['threadid'], $included_thread))
        
if($this->thread['firstpostid'] == $this->post['postid'] AND in_array($this->thread['threadid'], $included_thread))
        {
            switch (
$vbulletin->options['ozzmodz_firstpost_display_template'])
            {
                case 
1$this->templatename 'postbit'; break;
                case 
2$this->templatename 'ozzmodz_firstpost_display_postbit'; break;
            } 
        }
        if(
$this->thread['firstpostid'] == $this->post['postid'] AND $vbulletin->GPC['pagenumber'] > AND in_array($this->thread['forumid'], $included_forums))
        {
            switch (
$vbulletin->options['ozzmodz_firstpost_display_template'])
            {
                case 
1$this->templatename 'postbit'; break;
                case 
2$this->templatename 'ozzmodz_firstpost_display_postbit'; break;
            } 
        }        
    }



tommyxv 11-27-2014 11:17 PM

I tried it but it did not work. hmmmmm

ozzy47 11-27-2014 11:25 PM

Then you must have something set wrong. I tested that and it is working as intended.

tommyxv 11-27-2014 11:38 PM

I just copied and pasted it, replacing the contents. Save and reload. I'll try it again.

ozzy47 11-27-2014 11:40 PM

By doing what I said, it should show up on the first page, if it is showing on all other pages.

tommyxv 11-29-2014 10:31 PM

I tried it again, no luck. Does it have to be a new thread?

ozzy47 11-29-2014 10:33 PM

Not if you set it up correctly, it should work on existing threads as well.

tommyxv 12-03-2014 07:32 PM

I'm running 4.2.3 BETA 3, maybe that's why.

ozzy47 12-03-2014 09:37 PM

I can't say if that's it or not, as I am not running a site on that version yet.

dny18 12-12-2014 11:00 AM

Hi
I have vbulletin 4.2.2 and I have installed this mod, but not work. How i set a first post in a existing thread? Because I not see any options.

Thank you

ozzy47 12-12-2014 11:09 AM

There is s option to set this on a forum level or by thread id's in the mod settings.

dny18 12-12-2014 11:13 AM

Yes I try to set forum level and also the thread id, but I not see any option to set the first post.

Can you help me?

Thank you

ozzy47 12-12-2014 11:16 AM

If you have it set by forum or thread, when you navigate to any page other than page one, the first post of the thread should be the first post displayed.

dny18 12-12-2014 11:20 AM

Ok but in a existing thread with some messages, Can I set a specific message how first post?

ozzy47 12-12-2014 11:30 AM

No, it is only the first post of the thread that will show as the first post on all pages. :)

dny18 12-12-2014 11:51 AM

Ops, sorry and thank you for your time.

ozzy47 12-12-2014 11:52 AM

Not a problem. :)

Alan_SP 12-12-2014 10:22 PM

Quote:

Originally Posted by ozzy47 (Post 2526922)
There is s option to set this on a forum level or by thread id's in the mod settings.

Just to ask and if there was already this feature request, ignore.

Could you make it that we can select first post visible on all pages from front end, for example admin tools, or inline moderation options?

It would be much easier and all moderators then would be able to use this mod without admin assistance.

ozzy47 12-12-2014 10:27 PM

Ummm, that may be possible, but it would require a bit of work, as I would need to store the info into the DB, instead of a setting in the ACP.

Alan_SP 12-13-2014 01:31 AM

OK, see if you can work something out. :up:

And, you know why I can't like your posts at the moment. :(

tommyxv 12-20-2014 11:30 PM

Noticed when you edit the first post and save it from another page, it goes back to the non-ciustom template until you refresh the page. Any way to fix that?

I still can't get the custom template to show as the original first post with the edit in post #82. :(

ozzy47 12-20-2014 11:36 PM

Quote:

Originally Posted by tommyxv (Post 2528172)
Noticed when you edit the first post and save it from another page, it goes back to the non-ciustom template until you refresh the page. Any way to fix that?

Nope, as that would require some sort of ajax, and the time needed to code that in, is not worth the payoff for something only you see, as you were the one who edited it. :)

Quote:

Originally Posted by tommyxv (Post 2528172)
I still can't get the custom template to show as the original first post with the edit in post #82. :(

Not sure why, but I can look into it if I get some free time, as I am a bit backlogged at the moment.

Fields 12-21-2014 09:32 AM

Another great mod, thanks for your work ozzy :)

5 stars and MOTM!

ozzy47 12-21-2014 09:33 AM

Thanks, glad you like it, and thanks for marking as installed. :)

Marcin_J_ 01-10-2015 12:01 PM

Quote:

Originally Posted by tommyxv (Post 2525455)
I'm running 4.2.3 BETA 3, maybe that's why.

Try this:

PHP Code:

global $vbulletin;

if (
$this->registry->options['ozzmodz_firstpost_display_active']AND is_member_of($vbulletin->userinfoexplode(','$this->registry->options['ozzmodz_firstpost_display_groups'])))
{
    
$included_forums explode(','$this->registry->options['ozzmodz_firstpost_display_forums']);
    
$included_thread explode(','$this->registry->options['ozzmodz_firstpost_display_threads']);
    
    if (
THIS_SCRIPT != 'private'
    {       
        if(
$this->thread['firstpostid'] == $this->post['postid'] AND in_array($this->thread['threadid'], $included_thread))
        {
            switch (
$vbulletin->options['ozzmodz_firstpost_display_template'])
            {
                case 
1$this->templatename 'postbit'; break;
                case 
2$this->templatename 'ozzmodz_firstpost_display_postbit'; break;
            } 
        }
        if(
$this->thread['firstpostid'] == $this->post['postid'] AND in_array($this->thread['forumid'], $included_forums))
        {
            switch (
$vbulletin->options['ozzmodz_firstpost_display_template'])
            {
                case 
1$this->templatename 'postbit'; break;
                case 
2$this->templatename 'ozzmodz_firstpost_display_postbit'; break;
            } 
        }        
    }



ozzy47 01-10-2015 12:50 PM

We already tried that in this post, https://vborg.vbsupport.ru/showpost....8&postcount=82

tommyxv 01-12-2015 02:28 AM

How can I get the custom FP template to pick up the css from DBTech's likes? I have the likes cloud below signatures. The font is bigger for the names who liked the post.

Marcin_J_ 01-14-2015 08:10 PM

Quote:

Originally Posted by ozzy47 (Post 2531665)
We already tried that in this post, https://vborg.vbsupport.ru/showpost....8&postcount=82

This is the code from the post
https://vborg.vbsupport.ru/showpost....8&postcount=82 :

Code:

global $vbulletin;

if ($this->registry->options['ozzmodz_firstpost_display_active']AND is_member_of($vbulletin->userinfo, explode(',', $this->registry->options['ozzmodz_firstpost_display_groups'])))
{
    $included_forums = explode(',', $this->registry->options['ozzmodz_firstpost_display_forums']);
    $included_thread = explode(',', $this->registry->options['ozzmodz_firstpost_display_threads']);
   
    if (THIS_SCRIPT != 'private')
    {     
        //if($this->thread['firstpostid'] == $this->post['postid'] AND $vbulletin->GPC['pagenumber'] > 1 AND in_array($this->thread['threadid'], $included_thread))
        if($this->thread['firstpostid'] == $this->post['postid'] AND in_array($this->thread['threadid'], $included_thread))
        {
            switch ($vbulletin->options['ozzmodz_firstpost_display_template'])
            {
                case 1: $this->templatename = 'postbit'; break;
                case 2: $this->templatename = 'ozzmodz_firstpost_display_postbit'; break;
            }
        }
      if($this->thread['firstpostid'] == $this->post['postid'] AND $vbulletin->GPC['pagenumber'] > 1 AND in_array($this->thread['forumid'], $included_forums))
        {
            switch ($vbulletin->options['ozzmodz_firstpost_display_template'])
            {
                case 1: $this->templatename = 'postbit'; break;
                case 2: $this->templatename = 'ozzmodz_firstpost_display_postbit'; break;
            }
        }       
    }
}


I improved bold part

From

Code:

if($this->thread['firstpostid'] == $this->post['postid'] AND $vbulletin->GPC['pagenumber'] > 1 AND in_array($this->thread['forumid'], $included_forums))
To:

Code:

if($this->thread['firstpostid'] == $this->post['postid'] AND in_array($this->thread['forumid'], $included_forums))

After this intervention everything works perfectly :)

tommythejoat 02-08-2015 05:10 PM

I was hoping to use this for threads where the first post needs to be at the top even though the user has asked to display the threads as newest first.

I thought that might happen as a side effect of the implementation, but it does not. Would it be a big deal to offer that as an option.

I cannot persuade my users to make effective use of blogs, so we are ending up with feature discussions that start with a tutorial (that should be a blog or article) and then have a series of questions and comments.

tommythejoat 02-08-2015 07:41 PM

I enabled the custom postbit and it is functioning but has a problem with the tools in the bottom border of the post for infractions, promotions, edit, etc. That are now badly formed and several unlabeled. I was just going to drop all that in the repeated first post, but commenting out all the red flag, etc. code had no effect.

Any guidance would be appreciated. I am using a copy of postbit legacy.

mykkal 02-27-2015 08:44 PM

Using vb 4.2.3 with php 5.5.Plugin installed fine but I can't get any of the settings to save. Whenever I try selecting a forum to show "first post" and click save it reports that it saved successfully and then reloads the page. Then when I look "none" is selected.

Any Ideas?

ozzy47 02-27-2015 08:45 PM

Not a clue, I have not tried it on 4.2.3 yet, but I doubt that would cause any issues.

mykkal 02-27-2015 09:13 PM

Quote:

Originally Posted by ozzy47 (Post 2539011)
Not a clue, I have not tried it on 4.2.3 yet, but I doubt that would cause any issues.

I have 4.2.3. Could you take a look at my installation and help me to resolve any conflicts? I'd love to have this plugin running. It's a big part of what certain forums need.

ozzy47 02-27-2015 09:17 PM

If you PM me a admin account, I can try and take a look a bit later, if not tomorrow.


All times are GMT. The time now is 09:46 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.01500 seconds
  • Memory Usage 1,843KB
  • 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
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)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