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