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 - Show Full CMS Article in Comments Thread (https://vborg.vbsupport.ru/showthread.php?t=254333)

krustyx 01-31-2012 01:20 AM

THIS IS THE BEST MOD EVER... thank you very much

This is how it should be integrated in CMS/VBulletin... seriously!

Thank you again!

Mark.B 02-06-2012 11:43 PM

Thanks for this Lynne;

I have done some tweaks (as usual!) and come up with this, which sort of sets the article into a post within its own box, so to speak.

http://www.bowlandcentral.com/forum/...ad.php?t=98178

Lynne 02-07-2012 12:38 AM

Very nice, Mark. I always enjoy seeing your tweeks. I am like you with modifications - I never use one straight out of the box. :)

starman? 02-07-2012 01:30 PM

Quote:

Originally Posted by Mark.B (Post 2297032)
...sets the article into a post within its own box, so to speak.

Very nice it is too. Would you be willing to share?

Mark.B 02-08-2012 01:19 AM

Quote:

Originally Posted by Lynne (Post 2297042)
Very nice, Mark. I always enjoy seeing your tweeks. I am like you with modifications - I never use one straight out of the box. :)

Yep, I always use them as a basis to build upon. Some need very little but I almost always change bits and bobs, it's good practice too..."oh, this bit of code does THAT!....." :)

Mark.B 02-08-2012 01:22 AM

Quote:

Originally Posted by starman™ (Post 2297151)
Very nice it is too. Would you be willing to share?

Have a play with this....

Change the plugin code to the below (the attachments part is commented out here, uncomment if you want attachments to embed)

Code:

if (THIS_SCRIPT == 'showthread' AND $this->post['postcount'] == 1 AND $this->thread['forumid'] == $this->registry->options['vbcmsforumid']) {

$result = $this->registry->db->query_first("
      SELECT cms_article.pagetext, cms_article.threadid, cms_article.htmlstate, cms_node.nodeid 
    FROM " . TABLE_PREFIX . "cms_article AS cms_article 
    INNER JOIN " . TABLE_PREFIX . "cms_node AS cms_node ON (cms_node.contentid = cms_article.contentid)
    INNER JOIN " . TABLE_PREFIX . "cms_nodeinfo AS cms_nodeinfo ON (cms_nodeinfo.nodeid = cms_node.nodeid)
    WHERE cms_nodeinfo.associatedthreadid = ". $this->thread['threadid']. "
        ");



    if($result) {
        $bbcode_parser = new vBCms_BBCode_HTML(vB::$vbulletin, vBCms_BBCode_HTML::fetchCmsTags());;

        //$attach = new vB_Attach_Display_Content(vB::$vbulletin, 'vBCms_Article');
        //$attachments = $attach->fetch_postattach(0, $result['nodeid']);
        //$bbcode_parser->attachments = $attachments;
        //$bbcode_parser->unsetattach = true;
   
$result['previewtext'] = $pagetext;
$this->post['message'] .= '<br /><br /><div class="blockhead"><a href="content.php?r='. $result ['nodeid'] . '"><b>' . $this->thread['title'] .'</b></a></div><div class="article_post">'. $result['previewtext'];   
        $this->post['message'] .= fetch_censored_text($bbcode_parser->do_parse($result['pagetext'], true, $result['htmlstate']));
$this->post['message'] .= '</div>';

           
    } 
}

Then add this to additional.css:
Code:

.article_post
{
border: {vb:stylevar mid_border};
border-top: 0;
background: {vb:stylevar postbit_userinfo_background};
padding: 6px;
}

The only issue I have at present is that the CMS Article URL doesn't have the SEO part after it. Also my URL formatting will probably only work with "standard" URLs and not the "Friendly" URL system, as I have never worked with that. Shouldn't take much tweaking though, I just don't know how any of that works.

starman? 02-10-2012 04:08 PM

Cheers my friend. I shall have a play this weekend.

C.Birch 02-12-2012 08:48 AM

Great edit Mark!

darrenjdoc1 02-15-2012 11:48 AM

Is it possible when someone clicks the url of the article or Read More it takes them straight to the forum post?

darrenjdoc1 02-15-2012 03:15 PM

Got it sorted :)


All times are GMT. The time now is 03: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.01885 seconds
  • Memory Usage 1,739KB
  • 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
  • (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