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

  #46  
Old 08 Feb 2012, 02:22
Mark.B Mark.B is offline
 
Join Date: Feb 2004
Originally Posted by starman™ View Post
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)


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

Then add this to additional.css:

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

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.
Reply With Quote
  #47  
Old 10 Feb 2012, 17:08
starman™ starman™ is offline
 
Join Date: Apr 2008
Cheers my friend. I shall have a play this weekend.
Reply With Quote
  #48  
Old 12 Feb 2012, 09:48
C.Birch C.Birch is offline
 
Join Date: Apr 2002
Great edit Mark!
Reply With Quote
  #49  
Old 15 Feb 2012, 12:48
darrenjdoc1 darrenjdoc1 is offline
 
Join Date: Jan 2012
Is it possible when someone clicks the url of the article or Read More it takes them straight to the forum post?
Reply With Quote
  #50  
Old 15 Feb 2012, 16:15
darrenjdoc1 darrenjdoc1 is offline
 
Join Date: Jan 2012
Got it sorted
Reply With Quote
  #51  
Old 27 Feb 2012, 00:06
deverill2010 deverill2010 is offline
 
Join Date: Jan 2011
This seems to of stopped working for me.

If I move the article out of my dedicated vbcms forum it reverts back to the link and the article disappears out of the post?
Reply With Quote
  #52  
Old 27 Feb 2012, 00:26
Mark.B Mark.B is offline
 
Join Date: Feb 2004
Originally Posted by deverill2010 View Post
This seems to of stopped working for me.

If I move the article out of my dedicated vbcms forum it reverts back to the link and the article disappears out of the post?
I think the code is specific to the CMS comments forum - it isn't designed to work if the thread is moved elsewhere.
Reply With Quote
  #53  
Old 27 Feb 2012, 05:09
deverill2010 deverill2010 is offline
 
Join Date: Jan 2011
Originally Posted by Mark.B View Post
I think the code is specific to the CMS comments forum - it isn't designed to work if the thread is moved elsewhere.
Now that is really annoying lol.

It's fine I'll just delete it, post it as thread then promote it. Sigh, bleeding CMS.
Reply With Quote
  #54  
Old 27 Feb 2012, 07:30
Mark.B Mark.B is offline
 
Join Date: Feb 2004
You could always amend the code:


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

I imagine if you took the last bit out of that it might work....

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

Reply With Quote
  #55  
Old 27 Feb 2012, 08:16
deverill2010 deverill2010 is offline
 
Join Date: Jan 2011
Thank you mark works perfectly

Now If only I'd known that ages ago lol.
Reply With Quote
  #56  
Old 01 Mar 2012, 18:29
Kaishi Kaishi is offline
 
Join Date: Apr 2005
anyone know how to get this to work with 4.1.11 now that the comments are made to forums other than the cms comments forum?
Reply With Quote
  #57  
Old 01 Mar 2012, 18:47
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You can remove this from the if statement:
AND $this->thread['forumid'] == $this->registry->options['vbcmsforumid']

Unfortunately, there isn't any flag in the thread table to say the thread is an articles comment thread. I suppose you may be able to look at the thread title and see if it has the word"Article:" at the beginning and use that in the if statement so the query isn't run for every thread.
__________________
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
  #58  
Old 02 Mar 2012, 18:25
Kaishi Kaishi is offline
 
Join Date: Apr 2005
You know what's funny? Promoting from a thread to article only worked once for me. It worked and kept the original thread and prefixed it with Article:. After that 1 time, whenever I try to promote another thread, it would refuse to keep the original thread. I'm stumped.
Reply With Quote
  #59  
Old 03 Mar 2012, 18:17
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Kaishi View Post
You know what's funny? Promoting from a thread to article only worked once for me. It worked and kept the original thread and prefixed it with Article:. After that 1 time, whenever I try to promote another thread, it would refuse to keep the original thread. I'm stumped.
This isn't really a suppor thread for the new CMS options. You do have three new settings on the page that you need to select before you promote the article if you want it to keep the original thread, so don't forget to set those correctly.

If you have more problems, you really should post over on vbulletin.com.
__________________
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
  #60  
Old 17 Mar 2012, 01:03
whitedd's Avatar
whitedd whitedd is offline
 
Join Date: Jan 2010
......now is perfect ....thnx
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 23:36.

Layout Options | Width: Wide Color: