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

  #31  
Old 11 Aug 2011, 16:42
Alp Ozdemir Alp Ozdemir is offline
 
Join Date: Sep 2004
youtube links rendered in the messages but images is not, how can I show the images?
Reply With Quote
  #32  
Old 11 Aug 2011, 17:05
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Alp Ozdemir View Post
youtube links rendered in the messages but images is not, how can I show the images?
You would need to modify the code to actually get the images to show. As I said at the top of the thread - this is more of an example of how you can do this. So, modify the code however you need it for your needs.
__________________
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
  #33  
Old 21 Aug 2011, 21:18
GamersChallenge GamersChallenge is offline
 
Join Date: Aug 2011
lol at everyone asking for the attachments, I guess I'll join the team.

please please please
Reply With Quote
  #34  
Old 22 Aug 2011, 19:49
deverill2010 deverill2010 is offline
 
Join Date: Jan 2011
Lynne as you've put reusable code, I have made a request for someone to modify it to show images - http://www.vbulletin.org/forum/showt...59#post2236659

I hope you don't mind as I really need this.
Reply With Quote
  #35  
Old 23 Aug 2011, 02:55
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by deverill2010 View Post
Lynne as you've put reusable code, I have made a request for someone to modify it to show images - http://www.vbulletin.org/forum/showt...59#post2236659

I hope you don't mind as I really need this.
I don't mind at all. It is reusable for that reason. I only got so far with it in order to help someone else out with a specific request and just posted this in case if would help someone else get started to do something similar, or even more.
__________________
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
  #36  
Old 11 Sep 2011, 21:34
brad_irc's Avatar
brad_irc brad_irc is offline
 
Join Date: Aug 2005
Originally Posted by Lynne View Post
I don't mind at all. It is reusable for that reason. I only got so far with it in order to help someone else out with a specific request and just posted this in case if would help someone else get started to do something similar, or even more.
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.
Reply With Quote
  #37  
Old 12 Sep 2011, 02:30
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Thank you, Brad!
__________________
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
  #38  
Old 12 Sep 2011, 02:42
GamersChallenge GamersChallenge is offline
 
Join Date: Aug 2011
thanx brad, works great
Reply With Quote
  #39  
Old 14 Sep 2011, 18:14
deverill2010 deverill2010 is offline
 
Join Date: Jan 2011
Brad much appreciated!!!!! xxx
Reply With Quote
  #40  
Old 24 Jan 2012, 18:34
BearOlympic BearOlympic is offline
 
Join Date: Dec 2011
Originally Posted by Lynne View Post
That is because of the condition I have at the top:

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

I have it set to only check for this in the specified vbcms comments forum. You could remove that part of the condition and see if it works. (Do you always move the threads to a specific other forum? If so, enter that forumid instead.)
Thanks a lot for this mod!
Just one thing - if you remove this condition - you will get text "*********" displayed in every first message of every topic. Because almost every topic meets other conditions.

As for me - i don't mind it, and i don't need a divider between auto-created text and article. so i just replaced that code with " ". not good - but fast )
Reply With Quote
  #41  
Old 31 Jan 2012, 02:20
krustyx krustyx is offline
 
Join Date: Jul 2007
THIS IS THE BEST MOD EVER... thank you very much

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

Thank you again!
Reply With Quote
  #42  
Old 07 Feb 2012, 00:43
Mark.B Mark.B is offline
 
Join Date: Feb 2004
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
Reply With Quote
  #43  
Old 07 Feb 2012, 01:38
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Very nice, Mark. I always enjoy seeing your tweeks. I am like you with modifications - I never use one straight out of the box.
__________________
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
  #44  
Old 07 Feb 2012, 14:30
starman™ starman™ is offline
 
Join Date: Apr 2008
Originally Posted by Mark.B View Post
...sets the article into a post within its own box, so to speak.
Very nice it is too. Would you be willing to share?
Reply With Quote
  #45  
Old 08 Feb 2012, 02:19
Mark.B Mark.B is offline
 
Join Date: Feb 2004
Originally Posted by Lynne View Post
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!....."
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 00:21.

Layout Options | Width: Wide Color: