Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-18-2004, 01:55 PM
MLBCenter MLBCenter is offline
 
Join Date: Sep 2003
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Comment System...question

Okay, for a new site I'm going to have articles and at the bottom of each article I want a user comment system. Now, I can use a content managment system from ASP.net or I can buy a whole management system from http://www.pmachine.com, but I was wondering if it was possible to allow the users to only post comments on articles if they were registered at our forums (which are vbulletin of course). If not, I would like someone to try to work on a mod because if I have a user comments system where people still register then they can register under different names from their forum names and everything could get confusing. Either that or I don't use a comments system...
Reply With Quote
  #2  
Old 12-18-2004, 02:01 PM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just off the top.

You will need to create a table for the comments, probably with 3 fields :
- cid ( comment_id ) set to auto_increment.
- cuser ( comment_by_which_user_id )
- aid ( article_id_in_which_comment_was_made_in )
- ctext ( comment_text )

With this created, before inserting rows ( ie. comments ), just check
Code:
if($bbuserinfo['userid'])
to only allow registered members on the boards to be able to post a comment.

And when they do post a comment, use the value of
Code:
$bbuserinfo['userid']
and insert it into the cuser field, and the text the person makes into ctext field.

There would probably be a hidden tag in the form to be submitted when making a comment with the article id.

That's how I would do it
Reply With Quote
  #3  
Old 12-18-2004, 05:17 PM
MLBCenter MLBCenter is offline
 
Join Date: Sep 2003
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So I don't need an actual content management system to work with comments? Or are you saying using the comments table from a content management system and tweak it?
Reply With Quote
  #4  
Old 12-18-2004, 08:36 PM
MLBCenter MLBCenter is offline
 
Join Date: Sep 2003
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also, it looks like I'll be using the content management system ExpressionEngine for my site. They offer user comments, so do you think I would be able to integrate this with vBulletin? You know, tweak EE so you have to be registered for my vBulletin forums to post comments? That's all I want.
Reply With Quote
  #5  
Old 12-19-2004, 02:27 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am sure it can be done, but I am not familiar with those CMSs you mentioned.
Reply With Quote
  #6  
Old 12-22-2004, 04:24 AM
MeTaL_oRgY MeTaL_oRgY is offline
 
Join Date: Jul 2003
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, I don't know if it'll be of much help.. but try what I do:

First of all, install the comment script you like the most, it doesn't matter which one you choose.

After you've got it up and running, you'll have to set permissions to the key file.. the key file is the one that'll allow people to post a comment. It can be either the html (or php) that you call to print the comment form on your page or the php file that processes the information entered at the form. This depends on the script you're using (which I recommend that it DO NOT require registration, since you'll need to hack it a little more...).

Now that you have located the file, you'll now need to include the global file to that page.
Code:
<?php  include ('../foro/global.php'); ?>
add this at the very top of the page. Now comes the tricky part. Add this code below the include command:
Code:
//change xx with the Guest Group ID.
if($bbuserinfo['usergroupid']==xx){
echo "Please log-in or register!";
} else {
//the rest of the code goes here
and don't forget to close the script adding one last } to the end of your page.. so the final php would look like this:
Code:
<?php  include ('../foro/global.php');
//change xx with the Guest Group ID.
if($bbuserinfo['usergroupid']==xx){
echo "Please log-in or register!";
} else {
//the rest of the code goes here
//code
//code
//code
//lol
}
?>
YOu'll hve to experiment with it a bit.. but it works fine for me ...

NOTE Remember that if you have HTML between the
Code:
} else {
and the final }, you'll have to add backslash (\) befor every quote (") you have .

EDIT
Damn. I forgot one thing... before including global.php you must modify it a bit... every url the file has is like this:
Code:
admin/functions.php
You must change it so it looks like this:
Code:
/home/user/public_html/forum/admin/functions.php
there aren't much of this.. so it's not such a big deal :P
Reply With Quote
Reply


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 12:49 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.03595 seconds
  • Memory Usage 2,210KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete