vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Show Thread Enhancements - Chief First Post - Every Page [Forum Based] (https://vborg.vbsupport.ru/showthread.php?t=194832)

webnsn 07-07-2016 12:20 PM

Hi

I have a Breaking Threads where we update latest news in just REPLY.

SO I want last Reply should show in the first Post.

Example:

Threads first post

next day I have added new update - second post

so when anyone open my theread first post place should show 'second post' so that user read latest update

puertoblack2003 03-22-2020 06:17 PM

Quote:

Originally Posted by lazydesis (Post 1682381)
Code:

Database error in vBulletin 3.8.0 Release Candidate 1:

Invalid SQL:

                SELECT
                        post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
                        user.*, userfield.*, usertextfield.*,
                       
                        avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,
                        spamlog.postid AS spamlog_postid,
                        deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason,
                        editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
                        editlog.reason AS edit_reason, editlog.hashistory,
                        postparsed.pagetext_html, postparsed.hasimages,
                        sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,
                        sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight,
                        IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
                       
                       
                FROM vb_post AS post
                LEFT JOIN vb_user AS user ON(user.userid = post.userid)
                LEFT JOIN vb_userfield AS userfield ON(userfield.userid = user.userid)
                LEFT JOIN vb_usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
               
                LEFT JOIN vb_avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN vb_customavatar AS customavatar ON(customavatar.userid = user.userid)
                LEFT JOIN vb_spamlog AS spamlog ON(spamlog.postid = post.postid)
                        LEFT JOIN vb_deletionlog AS deletionlog ON(post.postid = deletionlog.primaryid AND deletionlog.type = 'post')
                LEFT JOIN vb_editlog AS editlog ON(editlog.postid = post.postid)
                LEFT JOIN vb_postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = 21 AND postparsed.languageid = 1)
                LEFT JOIN vb_sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = 21 AND sigparsed.languageid = 1)
                LEFT JOIN vb_sigpic AS sigpic ON(sigpic.userid = post.userid)
                       
                WHERE post.postid IN (0,296880,296880)
                ORDER BY post.dateline */;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/' at line 30
Error Number  : 1064

I got this error when I tried to use it one of the forums .. any help wud be appreciated :)

This is what I did

I installed the product using product manager, went to the forums and moderators tab and selected one of the forums and selected yes for the "This Forum Chief First Post ?" option and selected style as Postbit

Then I went to that particular forum and clicked on a thread and got the above error.

The forums for which I didn't use this mod, are functioning correctly.

EDIT: and yes I am using 3.8 RC1


I know this is ancient old. But I'm still on 3.8. And this may help anyone else running to this issue. my fix no experience with coding but managed to get it to work.


in plugin section look for showthread_query and replace every thing with this:

Code:

if ($forum['chiefpost'])
{
    $ids .= ",$thread[firstpostid]";
    $postids = "post.postid IN (0" . $ids . ")";
    if ($thread['hasattach'])
    {
        $attachments = $db->query_read,,print_r($role_id))->result_array();("
            SELECT dateline, thumbnail_dateline, filename, filesize, visible, attachmentid, counter,
                postid, IF(thumbnail_filesize > 0, 1, 0) AS hasthumbnail, thumbnail_filesize,
                attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow
            FROM " . TABLE_PREFIX . "attachment
            LEFT JOIN " . TABLE_PREFIX . "attachmenttype AS attachmenttype USING (extension)
            WHERE postid IN (-1" . $ids . ")
            ORDER BY attachmentid
        ");
        $postattach = array();
        while ($attachment = $db->fetch_array($attachments))
        {
            if (!$attachment['build_thumbnail'])
            {
                $attachment['hasthumbnail'] = false;
            }
            $postattach["$attachment[postid]"]["$attachment[attachmentid]"] = $attachment;
        }     
        $thread['attach'] = $thread['hasattach'];
        unset($thread['hasattach']);
    }
}

then save it and check it out.

lange 03-23-2020 04:00 PM

Thanks, I will test this mod.


All times are GMT. The time now is 07:37 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.01463 seconds
  • Memory Usage 1,742KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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