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

Closed Thread
 
Thread Tools Display Modes
  #31  
Old 07-06-2002, 08:30 PM
The Ghost's Avatar
The Ghost The Ghost is offline
 
Join Date: Feb 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack! thx!
  #32  
Old 07-07-2002, 12:59 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you make it so that you can't give your self comments and also to only be able to give one commment per user. That would be better I think. Can some one please tell me how to do that. Thanks.
  #33  
Old 07-07-2002, 02:19 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heh my bad bigjohnson didn't think of the adding comments to oneself ;\ try this coding...

open comment.php

find:

PHP Code:
if($action=="add_comment") { 
after it add:

PHP Code:
  if($bbuserinfo[userid]=="$userid") {
    eval(
"standarderror(\"".gettemplate("comment_error_userself")."\");");
    exit;
  } 
Then make a new template called:

comment_error_userself

Add this to the template:

Sorry but you can not add a comment to yourself.

That should fix that problem... as for your second concern its more indepth because i only run one query for the user so it'd be a more interesting task to find if you've commented the user before ;\

g-force2k2
  #34  
Old 07-07-2002, 02:32 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That worked great another little addon if possible is for the button to not show up in the postbit for your name if you cannot add a comment to yourself. That would be kool. Also that other request i asked about up top about only one comment. Is it impossible or is it just hard to do or something.
  #35  
Old 07-07-2002, 02:57 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heh jsut hard to do ;\ im new at php so there's many things that i don't know nor understand but i will work on something As for your other suggestion i'll take a look now

g-force2k2
  #36  
Old 07-07-2002, 03:03 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

open functions.php

find:

PHP Code:
  if($perms[canaddcomments]) {
    eval(
"\$addcom = \"".gettemplate("comment_addbutton")."\";");
  } else {
    
$addcom="";
  } 
replace it with:

PHP Code:
  if($perms[canaddcomments]) {
    if(
$bbuserinfo[userid]=="$post[userid]") {
      
$addcom="";
    } else {
      eval(
"\$addcom = \"".gettemplate("comment_addbutton")."\";");
    }
  } else {
    
$addcom="";
  } 
That should do the trick but i am not positive

g-force2k2
  #37  
Old 07-07-2002, 03:36 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh i see. Both your addons work great man. You are doing a great job. Thanks so much. What a great feature for my memebrs. Thanks so much.
  #38  
Old 07-07-2002, 03:52 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks bigjohnson if you can think of anything else to addon let me know... i'll have to update a new file soon containing the changes that you've requested so far

g-force2k2
  #39  
Old 07-07-2002, 12:15 PM
ExcErr's Avatar
ExcErr ExcErr is offline
 
Join Date: Feb 2002
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, but can you make the ability to comment anonymous???
  #40  
Old 07-07-2002, 12:31 PM
Lilac Lilac is offline
 
Join Date: Apr 2002
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

G force, I'm a new bie to installing hacks. Inside the directions, you don't state where these files are supposed to be uploaded into. Where are these files supposed to be uploaded into?

comment.php
com_view
com_add
com_mod
install_comment
Closed Thread


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 03:49 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.06882 seconds
  • Memory Usage 2,273KB
  • Queries Executed 12 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete