Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Articles Thread, How To: Add A "Comment On This News (3 Comments)" to a webpage. in vBulletin; How To: Add A "Comment On This News (3 Comments)" to a webpage. Hello, If you have a website that ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=5067


Reply
LinkBack Thread Tools Display Modes
How To: Add A "Comment On This News (3 Comments)" to a webpage.
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
23-10-2008, 03:27 AM
 
How To: Add A "Comment On This News (3 Comments)" to a webpage.

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: rar Comment.rar (1.1 KB, 0 views)
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Articles Thread, How To: Add A "Comment On This News (3 Comments)" to a webpage. in vBulletin; How To: Add A "Comment On This News (3 Comments)" to a webpage. Hello, If you have a website that ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=5067


Bookmarks

Tags
add, webpage


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Story of the Rosetta Stone, "Finding a Lost Language" ah_egypt Inside Egypt 11 06-05-2009 09:09 PM
"Access is Denied" error message when you try to open a folder Developer Windows 0 18-12-2008 07:53 PM
Khedive Ismail Egypt's Ruler and "Lavish Spender" Developer Modern History of Egypt 2 12-08-2008 07:51 PM