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)

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.


All times are GMT. The time now is 08:16 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.01163 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)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