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)
-   -   Miscellaneous Hacks - [CMS] Use original thread for comments (https://vborg.vbsupport.ru/showthread.php?t=230417)

sticky 11-29-2010 02:31 AM

So when this becomes a part of 4.2 how will the upgrade work? Will I need to disable this mod/uninstall it before upgrading?

Carnage 11-29-2010 05:13 PM

Quote:

Yes, they do. Do you have a work-around?
I've just had a quick look at the new posts block. The main db query that generates it strips out the threads which are associated with a CMS article. The work around would be to remove that condition in the query. You may then want to limit the forum(s) selected to not select from the normal cms comments forum.

Quote:

So when this becomes a part of 4.2 how will the upgrade work? Will I need to disable this mod/uninstall it before upgrading?
I really couldn't say at this point. Since I'm using this on my own forums I will need an upgrade path myself so will be planning + developing one once vb 4.2 is available to me.

carrlos 12-01-2010 03:57 AM

Quote:

Originally Posted by Carnage- (Post 2127249)
I've just had a quick look at the new posts block. The main db query that generates it strips out the threads which are associated with a CMS article. The work around would be to remove that condition in the query. You may then want to limit the forum(s) selected to not select from the normal cms comments forum.

Can you give some help on how to do this? ;)

Carnage 12-05-2010 09:46 AM

ok, go into includes/block/newposts.php

Find:

PHP Code:

            $posts $this->registry->db->query_read_slave("
                SELECT post.dateline, post.pagetext AS message, post.allowsmilie, post.postid,
                    thread.threadid, thread.title, thread.prefixid, post.attach,
                    forum.forumid,
                    user.*
                    " 
. ($this->registry->options['avatarenabled'] ? ",avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight" "") . "
                FROM " 
TABLE_PREFIX "post AS post
                JOIN " 
TABLE_PREFIX "thread AS thread ON (thread.threadid = post.threadid)
                JOIN " 
TABLE_PREFIX "forum AS forum ON(forum.forumid = thread.forumid)
                LEFT JOIN " 
TABLE_PREFIX "user AS user ON (post.userid = user.userid)
                "  
. ($this->registry->products['vbcms'] ? " LEFT JOIN " TABLE_PREFIX "cms_nodeinfo AS info ON info.associatedthreadid = thread.threadid \n" :  '')
            . (
$this->registry->options['avatarenabled'] ? "LEFT JOIN " TABLE_PREFIX "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " TABLE_PREFIX "customavatar AS customavatar ON(customavatar.userid = user.userid)" "") . "
            WHERE 1=1
                
$forumsql
                AND thread.visible = 1
                AND post.visible = 1
                AND thread.open <> 10
                AND post.dateline > 
$datecut
                
$globalignore
                " 
. ($this->userinfo['ignorelist'] ? "AND post.userid NOT IN (" implode(','explode(' '$this->userinfo['ignorelist'])) . ")"'')
            . (
$this->registry->products['vbcms'] ? " AND info.associatedthreadid IS NULL " :  '') . "
            ORDER BY post.dateline DESC
            LIMIT 0," 
intval($this->config['newposts_limit']) . "
            "
); 

remove this line:

. ($this->registry->products['vbcms'] ? " AND info.associatedthreadid IS NULL " : '')

but leave the ." on the end.

carrlos 12-05-2010 10:15 PM

Thanks. I'll give it a try. Will it be the same for threads?

Edit:
It worked for both, thanks! ;)

apaydin2148 12-07-2010 06:29 PM

When i publish article (forum thread) , forum thread have a "Article:" tag. I don't want this. For example: if the topic is "x" when i publish that topic as a article and someone write a comment this topic, thread is "article: x" how can i fix this issue?

apaydin2148 12-08-2010 07:28 AM

any ideas?

sticky 12-08-2010 08:14 PM

Is this working in 4.1?

mitch84 12-09-2010 05:21 AM

Quote:

Originally Posted by sticky (Post 2131007)
Is this working in 4.1?

yes, work fine for me on vb4.1.pl2

apaydin2148 12-11-2010 11:21 AM

Quote:

Originally Posted by apaydin2148 (Post 2130549)
When i publish article (forum thread) , forum thread have a "Article:" tag. I don't want this. For example: if the topic is "x" when i publish that topic as a article and someone write a comment this topic, thread is "article: x" how can i fix this issue?

...?


All times are GMT. The time now is 09:28 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.01531 seconds
  • Memory Usage 1,758KB
  • 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
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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