View Single Post
  #16  
Old 03-07-2003, 02:42 PM
James Cridland James Cridland is offline
 
Join Date: Nov 2001
Location: London, UK
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is to add to the text file when I've a moment...

Quote:
DanFlynnUPC: hey r u there?
cridland james: Hi Dan
DanFlynnUPC: you've left a couple things outta the install instructions still
DanFlynnUPC: i worked them out and fixed them on our forum
cridland james: Oh, I'm sorry...
cridland james: Have you posted what they are?
DanFlynnUPC: nope .... i'll tell you now
DanFlynnUPC: let you do the update
DanFlynnUPC: in moderate.php there is a query just before the labels bit ... you gotta get the number of posts a user has made in that query
DanFlynnUPC: that's the 1st problem
DanFlynnUPC: the other prob is that the way your install instructions are, you will never make use of the postbit_unmod template because the unmoderated posts are never taken from the db
DanFlynnUPC: this is what i changed
DanFlynnUPC: in showthread.php
DanFlynnUPC: find
DanFlynnUPC: $getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid' AND post.visible=1
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
");
DanFlynnUPC: and replace it with
DanFlynnUPC: if (ismoderator($thread['forumid'])) {
$ismod=1;
} else {
$ismod=0;
}

if ($ismod)
{
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid'
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
");
} else {
$getpostids=$DB_site->query("
SELECT post.postid FROM post
WHERE post.threadid='$threadid' AND post.visible=1
ORDER BY dateline $postorder LIMIT ".($limitlower-1).",$perpage
");
}
DanFlynnUPC: did you get all that?
DanFlynnUPC: r u there?
DanFlynnUPC: and you can then simplify the bit in functions.php
DanFlynnUPC: replace everything between
// do posts from ignored users
AND
// ###################### Start gettextareawidth #######################
WITH
if ($post[visible]<1) {
eval("\$retval = \"".gettemplate("postbit_unmod")."\";");
} else if ($ignore[$post[userid]]) {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
return $retval;
}
DanFlynnUPC: works like a charm
cridland james: I've got all that, Dan, thanks
DanFlynnUPC: great thanx .... hopefully it'll help someone
DanFlynnUPC: cause it's a really nice hack ... I also extended it just a tiny bit to moderate attachments made by ppl in that usergroup also
DanFlynnUPC: cause we've had a few ppl posting porn on our forum
cridland james: Good idea
DanFlynnUPC: btw ... it's worth making a note that the moderation usergroup should not be allowed to edit their posts or they can just wait till the post is approved then make it nasty and it wont get caught
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01494 seconds
  • Memory Usage 1,773KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete