vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Add "Post Comment" buttons to CMS Articles & Blogs for guests (https://vborg.vbsupport.ru/showthread.php?t=277260)

tpearl5 01-18-2012 11:00 PM

Add "Post Comment" buttons to CMS Articles & Blogs for guests
 
1 Attachment(s)
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>


Merenguista 01-23-2012 11:17 AM

thanks

Mr_Running 01-23-2012 03:08 PM

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 :)

sspeed 03-14-2012 07:28 PM

Thank you! This should be an integral part of the vBulletin software. Since moving to vBulletin I get ZERO comments...

jerde 04-22-2012 09:21 PM

How would I do this for mobile style as well?

hotdogcooker 08-02-2014 01:11 AM

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?.

tpearl5 08-02-2014 01:36 AM

Quote:

Originally Posted by hotdogcooker (Post 2509389)
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"

hotdogcooker 08-02-2014 01:48 AM

Quote:

Originally Posted by tpearl5 (Post 2509393)
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.

tpearl5 08-02-2014 01:00 PM

Quote:

Originally Posted by hotdogcooker (Post 2509394)
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.

hotdogcooker 08-03-2014 01:04 AM

Quote:

Originally Posted by tpearl5 (Post 2509442)
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!.


All times are GMT. The time now is 10:36 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01133 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete