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

  #76  
Old 04 Sep 2012, 00:25
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Thanks for sharing!
__________________
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
  #77  
Old 04 Sep 2012, 05:17
imported_dfmafia's Avatar
imported_dfmafia imported_dfmafia is offline
 
Join Date: Jun 2004
Location: Wherever Uncle Sam Needs!
Real name: Brock
I'm actually trying to get the article/comments forum to post a preview of the thread on vBAdvancec cmps news feed. currently I have been unsuccessful. the comment forums look great with this mod but when I go to cmps it is still displaying "You can view the page at..." instead of the preview
Reply With Quote
  #78  
Old 04 Sep 2012, 07:28
TiKu's Avatar
TiKu TiKu is offline
 
Join Date: Sep 2006
Originally Posted by Lynne View Post
Thanks for sharing!
Same to you.
One thing I still don't like, is that if you quote the first post of the comments thread, it quotes only the link to the article. This happens because the mod doesn't actually replace the post text in the database - which I like, because this way you don't have to edit the thread if you edit the article.
Does anyone have an idea how we could make quotations work while keeping the current approach of not replacing the post text in the database?
Reply With Quote
  #79  
Old 09 Sep 2012, 12:10
TiKu's Avatar
TiKu TiKu is offline
 
Join Date: Sep 2006
Here's another improvement:
Add a plugin called "Quote Full CMS Article", hook newreply_quote.

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

This makes quotes of the first post of the comments thread quote the article's preview text instead of the link to the article.
Reply With Quote
  #80  
Old 01 Feb 2013, 20:24
datoneer datoneer is offline
 
Join Date: Jul 2011
Thanks Lynne awesome mod!
Reply With Quote
  #81  
Old 02 Jun 2013, 21:05
Morrus Morrus is offline
 
Join Date: Jan 2002
This is great - been using it for a while. One issue is that inline image attachments do not show in the thread - you just get a URL link instead.

[Edit - ah, I see this has been mentioned plenty of times!]
__________________
www.enworld.org
Reply With Quote
  #82  
Old 05 Jun 2013, 16:45
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Real name: Richie
I love this but am having a major issue.

I want to have certain article previews appear in other forums instead of the main forum but when I more the threads they automatically go back to default. Is there any way to get the previews to show in other forums as well?

After looking at the code I see I may be able add an array and list the forums but will this add a query for each forum I add for every page load or just when someone opens that forum? Will this change the forums the articles are posted in?
__________________

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

Reply With Quote
  #83  
Old 05 Jun 2013, 16:49
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Real name: Richie
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.)
Sorry I missed this--will try this.

Thanks guys


This has worked but I want to do a couple more things. if anyone has already done this please share.

#1 - I want to only show a preview and not the entire article..

#2 - I want to make the preview content not crawlable. I do not want it indexed from both the article page and the forum.(I don't think this is an issue because the content is being generated from the cms and not actually posted as a regular thread so disregard number 2--

#3 - Being able to add the images would also be cool..

Thanks--Love this!
__________________

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


Last edited by RichieBoy67; 09 Jun 2013 at 06:57.
Reply With Quote
  #84  
Old 05 Jun 2013, 19:50
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Talking

Glad I found this. Applied it tonight, Lynne's and the latest version, cheers!

It works very well with text on my 4.2.1 site, first few I looked at the pics didn't come through, and I don't expect the vBTubes to come thru but when I looked deeper pics were being feed into the thread.

It has fixed up hundreds of posts that NOW I can call an archive, wonderful, I'll definitely keep an eye on this thread hoping for further shared enhancements.

I was starting to build an archive in the CMS as the links didn't allow me to delete some of the dated. I presume I can delete the dated content from the CMS now as we have copy in this plugin.

Thanks again.
Reply With Quote
  #85  
Old 05 Jun 2013, 23:57
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Toorak Times View Post
I was starting to build an archive in the CMS as the links didn't allow me to delete some of the dated. I presume I can delete the dated content from the CMS now as we have copy in this plugin.

Thanks again.
No, you cannot delete the CMS article. If you do that, then there will be no text in the post. This modification does not actually copy it from the CMS part of the database into the post, it just shows the CMS content in place of the existing post.
__________________
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
  #86  
Old 06 Jun 2013, 10:37
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Originally Posted by Lynne View Post
No, you cannot delete the CMS article. If you do that, then there will be no text in the post. This modification does not actually copy it from the CMS part of the database into the post, it just shows the CMS content in place of the existing post.
Thanks Lynne, I learnt today when I tried to edit one of them to replace the pictures the content also disappears.
Reply With Quote
  #87  
Old 07 Jun 2013, 16:21
Morrus Morrus is offline
 
Join Date: Jan 2002
So I've done something silly, and I think it may have messed up something.

I had changed the phrase which says "You can view the page at X" a while back to something else. Yesterday, I went to change it again, and deleted the translation and saved it. Now I can't find the phrase! I usually find phrases by just searching for them, but I can't search for " ".

How do I find that phrase again? Does it have a Phrase Variable Name I can search for instead of the text?

--

Additionally, at the exact same time (it might be coincidence, but it might be linked to the above) the CMS has stopped putting the comment thread in the CMS comments forum altogether, and despite comments being set to YES in the article edit page, comments appear to be remaining switched off. I don't know if that's somehow connected to me accidentally removing a phrase (it seems unlikely, but the timing was pretty much exact).
__________________
www.enworld.org
Reply With Quote
  #88  
Old 07 Jun 2013, 18:32
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by Morrus View Post
So I've done something silly, and I think it may have messed up something.

I had changed the phrase which says "You can view the page at X" a while back to something else. Yesterday, I went to change it again, and deleted the translation and saved it. Now I can't find the phrase! I usually find phrases by just searching for them, but I can't search for " ".

How do I find that phrase again? Does it have a Phrase Variable Name I can search for instead of the text?
The phrase name is "comment_thread_firstpost".

Originally Posted by Morrus View Post
Additionally, at the exact same time (it might be coincidence, but it might be linked to the above) the CMS has stopped putting the comment thread in the CMS comments forum altogether, and despite comments being set to YES in the article edit page, comments appear to be remaining switched off. I don't know if that's somehow connected to me accidentally removing a phrase (it seems unlikely, but the timing was pretty much exact).
I can't see how the two are related.
__________________
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
  #89  
Old 07 Jun 2013, 18:38
Morrus Morrus is offline
 
Join Date: Jan 2002
Originally Posted by Lynne View Post
The phrase name is "comment_thread_firstpost".
Got it - thanks!


I can't see how the two are related.
They definitely are in some way, because reverting that phrase immediately turned comments back on again! Everything is working correctly again!

I just tested it and removed and then re-added the phrase again. Removing it immediately switches off CMS comments threads (and therefore comments); adding it back restores the functionality.
__________________
www.enworld.org
Reply With Quote
  #90  
Old 09 Jun 2013, 07:12
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Real name: Richie
Originally Posted by TiKu View Post
Here's another improvement:
Add a plugin called "Quote Full CMS Article", hook newreply_quote.

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

This makes quotes of the first post of the comments thread quote the article's preview text instead of the link to the article.
Just what I needed!! Thanks!

Any clue how to get the image to display?
__________________

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

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 04:57.

Layout Options | Width: Wide Color: