Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Show Full CMS Article in Comments Thread Details »
Show Full CMS Article in Comments Thread
Mod Version: 1.00, by Lynne (Coder/Designer) Lynne is offline
Developer Last Online: Aug 2019 I like it Show Printable Version Email this Page

vB Version: 4.0.8 Rating: (9 votes - 4.89 average) Installs: 58
Released: 27 Nov 2010 Last Update: Never Downloads: 129
Not Supported Uses Plugins Re-usable Code  

This is more of an example than a modification. I wrote this quick plugin for someone and thought I would share it. It's something someone can take and build on. All it does is if you look at the CMS Article thread in your CMS Comments forum, the content of the CMS Article is shown under the blurb "You can view the page at.....". This is ONLY for Articles - not Static Pages or PHP Direct Evaluation content types. Someone can build on this and do those if they want. The person I wrote this for had forms in their articles and needed the submit button to be disabled, so this plugin does that also.

Like I said - this is more of an example. I don't plan to do anything more with it and I'm not helping with modifying it for your own use. Use it however you want.

This adds one query to the threads in the CMS Comments forum.

To install....

Create a Plugin
Hook Location - postbit_display_complete
Title - Show Full CMS Article
Plugin PHP Code -


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

CMS Page:

CMS Comment Thread:


If you ONLY want to show the full article to users, not guests, then change this condition (thanks to mattysheff):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	article - cms.png
Views:	3110
Size:	39.2 KB
ID:	123944   Click image for larger version

Name:	article - thread.png
Views:	3185
Size:	63.3 KB
ID:	123945  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Miscellaneous Hacks [CMS] Use original thread for comments Carnage vBulletin 4.x Add-ons 387 26 Nov 2012 02:22

  #91  
Old 07 Jul 2013, 03:06
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Real name: Mj Bain
Great! it works, thank you!
__________________
____________
BossLady
Reply With Quote
  #92  
Old 10 Jul 2013, 04:04
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Real name: Mj Bain
i have uncached template...how do i cache it?
__________________
____________
BossLady
Reply With Quote
  #93  
Old 10 Jul 2013, 04:13
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
This modification doesn't use a template. So what template is it that you need to cache?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #94  
Old 11 Jul 2013, 01:51
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Real name: Mj Bain
scratch that comment lol I think i was just too tired last night lol i could swear I saw a comment something template uncached. ^_^ sorry
__________________
____________
BossLady
Reply With Quote
  #95  
Old 11 Oct 2013, 18:54
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Real name: Richie
Has anyone figured out how to get images from the cms imported to show here as well?
__________________

Let us take care of your forum, seo, seo reports, maintenance, what ever you need.

Reply With Quote
  #96  
Old 09 Nov 2013, 10:03
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Originally Posted by RichieBoy67 View Post
Has anyone figured out how to get images from the cms imported to show here as well?
Not sure if I know what you mean but I interpreted it to mean this..

http://www.vbulletin.org/forum/showp...5&postcount=36

Hope that helps..
Reply With Quote
  #97  
Old 29 Dec 2013, 05:54
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Originally Posted by brad_irc View Post
Thanks for your snippet Lynne. I do many vB mods that are never published, but your code snippet helped -- so here is the solution for users wanting [ATTACH] bbcode parsed properly.

Let me explain so users can better understand the code and why it appears as a link.

Deep inside /includes/class_bbcode.php, line 2581 "if (!empty($this->attachments["$attachmentid"]))" checks if the $bbcode_parser object has an array defined with details about the image attachment (ie; size, contenttype, placement, thumbnail, etc). If that data is not present, it defaults to creating a link to the attachment.

I backtracked through the function where CMS article calls the bbcode parser, see file /packages/vbcms/item/content/article.php, line 428 which shows how it fetches the attachment data using the content nodeid.

The snippet below has nodeid added to the query, and the block populating the $attachments array. Enjoy

Also to be noted, Tapatalk users cannot view articles on main page, now they will be able to view the content using the forum


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

PS: If anyone else has noticed that [ATTACH] is not properly parsed in RSS feeds, I will find a solution and post it in the next couple days.
That worked a treat!

I have an issue where if someone makes a comment the CMS article disappears but the this Forum remains intact, not sure if 2 are connected
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:37.

Layout Options | Width: Wide Color: