Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > General Articles

Reply
 
Thread Tools
How To: Add A "Comment On This News (3 Comments)" to a webpage.
nogerorob
Join Date: Jun 2004
Posts: 82

 

Portland, OR
Show Printable Version Email this Page Subscription
nogerorob nogerorob is offline 07-21-2004, 10:00 PM

Hello,

If you have a website that you would like to connect your content directly to discussions on your bulletin board, you might enjoy this little hack. Basically it lets your users get directly into commenting on your content, and see immediatly how many people have commented so far.

It doesn't require any editing of vBulletin, to see it in action, check out my main page.


---------------------------------------------------------------

First you need to create a forum thread about the web page you have created. It helps to have a short blurb from the article or news item and a link back to the page in the first post.

See here for an example. You can also see how I?ve organized a Forum Section for News, Articles and Davespeak to reflect different content areas on my site.

I?ve attached two files:

commentLine.php goes in some directory on your server. I put mine in a /SharedCode/php/ dir, but anywhere is fine. The only modification needed in this file is the chdir($_SERVER["DOCUMENT_ROOT"]."/forums/"); to whatever your forums directory is. i.e. /boards/ or /forum/.


example_content.php file is an example of how to use the commentLine.php script on one of your html pages.



Here are the changes that need to be made each time you want to place a Comment On This line:
1. Change the /PATH_TO_COMMENTLINE.PHP/ enter the path from the root of your public_html dir to the commentLine.php directory.

i.e.: "/ServerScripts/php/commentLine.php") ?>

2. In the PHP code at the bottom:
A. Change X to the thread ID of the forum you create on your vBulletin forum.

B. Change the URL to the the thread you create in your vBulletin forum.

C. Change "News" to whatever the above content is describing, article, forum, study, etc.
To see how I use this script, check out one of my pages

I don't know if this requires a database query, which might be important if your webpages are getting tons of page views. It is only calling one function from vB.

Rob
Attached Files
File Type: php commentLine.php (1.1 KB, 106 views)
File Type: php example_content.php (568 Bytes, 81 views)
Reply With Quote
  #22  
Old 05-09-2005, 10:17 PM
kkiely kkiely is offline
 
Join Date: Feb 2004
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"then why don't you just make it like a vbulletin page"

because every single installation of a VBulletin CMS (VBadvanced, VBPortal) looks exactly the same. Those boxes are ugly. I'm looking for a way to port threads on to a non-VB page.
Reply With Quote
  #23  
Old 05-11-2005, 03:53 AM
nogerorob nogerorob is offline
 
Join Date: Jun 2004
Location: Portland, OR
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kkiely
"then why don't you just make it like a vbulletin page"

because every single installation of a VBulletin CMS (VBadvanced, VBPortal) looks exactly the same. Those boxes are ugly. I'm looking for a way to port threads on to a non-VB page.
Bless your heart for saying this. You are right.

I stay away from vB CMS's because every site looks the damn same. I don't think that they catch the same kind of search engine attention as home brewed ++++e either--the URL's are all screwy.

Don't worry, I'm going to figure this shizzle out and post it. PM me and maybe we can work together.

r
Reply With Quote
  #24  
Old 05-15-2005, 03:56 PM
BenSkiddle BenSkiddle is offline
 
Join Date: Apr 2004
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This sounds interesting
Reply With Quote
  #25  
Old 06-18-2005, 08:10 PM
EINS EINS is offline
 
Join Date: Nov 2003
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kkiely
because every single installation of a VBulletin CMS (VBadvanced, VBPortal) looks exactly the same.
so tell me what do you think about this

http://www.cgtalk.ru/
Reply With Quote
  #26  
Old 06-19-2005, 05:51 PM
nogerorob nogerorob is offline
 
Join Date: Jun 2004
Location: Portland, OR
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's a good looking site, (though i can't read it). If that is based on a Vb cms, I'd say it is an exception to the rule.
Reply With Quote
  #27  
Old 06-19-2005, 06:12 PM
EINS EINS is offline
 
Join Date: Nov 2003
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its vBAdvanced CMPS (Look at the bottom of the Site). It shows how vBA can look if you have creativity.
Reply With Quote
  #28  
Old 06-27-2005, 11:47 AM
scotsmist scotsmist is offline
 
Join Date: May 2005
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://www.vizdepot.com/" target="_blank">http://www.vizdepot.com/</a> is running vbportal 3.0.x
Reply With Quote
  #29  
Old 06-30-2005, 09:37 AM
freakify freakify is offline
 
Join Date: Feb 2002
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
commentLine.php goes in some directory on your server. I put mine in a /SharedCode/php/ dir, but anywhere is fine. The only modification needed in this file is the chdir($_SERVER["DOCUMENT_ROOT"]."/forums/"); to whatever your forums directory is. i.e. /boards/ or /forum/.
I'm sorry for asking this, but what if my forums are in a subdomain (forums.domain.com) ? Will this work on my www.domain.com? If all I have to do is change the above code, what's the correct way?

Thanks
Reply With Quote
  #30  
Old 11-14-2006, 02:51 AM
nogerorob nogerorob is offline
 
Join Date: Jun 2004
Location: Portland, OR
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by freakify View Post
I'm sorry for asking this, but what if my forums are in a subdomain (forums.domain.com) ? Will this work on my www.domain.com? If all I have to do is change the above code, what's the correct way?
Thanks
Hey there,
I'm over a year late, I thought I was subscribed to this thread but apparently not. I hope you got this working.

rob
Reply With Quote
  #31  
Old 06-17-2007, 02:10 PM
azjr247 azjr247 is offline
 
Join Date: May 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet! i had been looking for something like this! Hope it works on the latest build!!! Thanks for posting this!
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 02:53 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.07612 seconds
  • Memory Usage 2,311KB
  • 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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete