Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
Add "Post Comment" buttons to CMS Articles & Blogs for guests Details »»
Add "Post Comment" buttons to CMS Articles & Blogs for guests
Version: 1.00, by tpearl5 tpearl5 is offline
Developer Last Online: Aug 2022 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.x.x Rating:
Released: 01-18-2012 Last Update: Never Installs: 15
Template Edits
Re-useable Code Translations  
No support by the author.

The default templates for the CMS and Blog don't display any indication to the guest that comments can be posted, especially if no comments exist for that article or blog post.

Two simple template edits adds a "Post Comment" button for guests to the CMS and Blog pages. It simply links to the register page. The button will not show up for logged in users; the reply box will appear as normal for them. For CMS Articles and Blogs that do not allow comments, it will not show up.

Here is an example of it working on a CMS Article:
http://cellphoneforums.net/content/c...ten-years.html

And a blog post:
http://nikonites.com/blogs/jdeg/73-a...portation.html


Here's how to do it:

In template vbcms_comments_page find:
HTML Code:
								<input class="button" type="submit" name="preview" id="qr_preview" title="(Alt + X)" accesskey="x" value="{vb:rawphrase go_advanced}" tabindex="1" />
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
Add after:
HTML Code:
<vb:else />	
	<a href="/register.php" class="newcontent_textcontrol" id="newreplylink_top"><span>+</span> Post Comment</a>

In blog_show_entry find:
HTML Code:
<a href="{vb:raw $vboptions.vbblog_url}{vb:if "$vboptions['vbblog_url']", '/', ''}blog_post.php?{vb:raw session.sessionurl}do=comment&amp;b={vb:raw bloginfo.blogid}">{vb:rawphrase post_a_comment}</a>
</vb:if><vb:comment>if condition="$show['quickcomment']"</vb:comment>
Add after:
HTML Code:
<vb:else />	
	<br><a href="/register.php" class="newcontent_textcontrol" id="newreplylink_top"><span>+</span> Post Comment</a><br><br>

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
sensimilla

Comments
  #2  
Old 01-23-2012, 11:17 AM
Merenguista's Avatar
Merenguista Merenguista is offline
 
Join Date: Sep 2010
Location: Morocco
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
Благодарность от:
  #3  
Old 01-23-2012, 03:08 PM
Mr_Running Mr_Running is offline
 
Join Date: May 2010
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I do not allow comments on the CMS but
I will use the Post Comment for the Blogs
and guests can now say hello to my register page.

Thanks for Sharing
Reply With Quote
  #4  
Old 03-14-2012, 07:28 PM
sspeed sspeed is offline
 
Join Date: Nov 2011
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you! This should be an integral part of the vBulletin software. Since moving to vBulletin I get ZERO comments...
Reply With Quote
  #5  
Old 04-22-2012, 09:21 PM
jerde jerde is offline
 
Join Date: Jun 2010
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would I do this for mobile style as well?
Reply With Quote
  #6  
Old 08-02-2014, 01:11 AM
hotdogcooker hotdogcooker is offline
 
Join Date: Jul 2014
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't find where you are supposed to be able to edit the "vbcms_comments_page", is it in "Style Manager"?. Or, where is the place you edit that?.
Reply With Quote
  #7  
Old 08-02-2014, 01:36 AM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hotdogcooker View Post
I can't find where you are supposed to be able to edit the "vbcms_comments_page", is it in "Style Manager"?. Or, where is the place you edit that?.
Style Manager > select "Edit Templates" for the style you want to edit > "vBulletin CMS Templates"
Reply With Quote
  #8  
Old 08-02-2014, 01:48 AM
hotdogcooker hotdogcooker is offline
 
Join Date: Jul 2014
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tpearl5 View Post
Style Manager > select "Edit Templates" for the style you want to edit > "vBulletin CMS Templates"
I found it by Expanding "Blog Temples". I didn't know there were templates hidden within templates. After adding all of the code, now people can comment on my "blog":

http://bloggingforum.org/entry.php?3...n-In-vBulletin

Thanks so much for this tutorial!. Hope my problem and solution will help others out.
Reply With Quote
  #9  
Old 08-02-2014, 01:00 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hotdogcooker View Post
I found it by Expanding "Blog Temples". I didn't know there were templates hidden within templates. After adding all of the code, now people can comment on my "blog":

http://bloggingforum.org/entry.php?3...n-In-vBulletin

Thanks so much for this tutorial!. Hope my problem and solution will help others out.
Well, no, this just adds the comment button for guests which links to register.php. They can't actually comment until they register...

Also, if you want to edit a template in the future and you already have some code, it may be easier to use the search feature on a bit of the code to find the template.
Reply With Quote
  #10  
Old 08-03-2014, 01:04 AM
hotdogcooker hotdogcooker is offline
 
Join Date: Jul 2014
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tpearl5 View Post
Well, no, this just adds the comment button for guests which links to register.php. They can't actually comment until they register...

Also, if you want to edit a template in the future and you already have some code, it may be easier to use the search feature on a bit of the code to find the template.
Well, I guess like most big sites you have to register before you comment on stuff. Well, in this case I found the template without searching, I'll try next time but I guess it was obvious that the templates expand, they had to be somewhere. Thanks.

BEFORE doing this fix, there was no comment box there at all, NOTHING. I tried other browsers too, it was messed up!.
Reply With Quote
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 11:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05746 seconds
  • Memory Usage 2,318KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete