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 04-02-2007, 08:25 PM
upnorth upnorth is offline
 
Join Date: Jul 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help filtering moderated posts?

Not sure this is the place to ask this but I'm at a loss and really need a hand. I'm running this mod and posted my question

https://vborg.vbsupport.ru/showthrea...02#post1218602

and it works great accept that it displays posts that have not yet been moderated? Need someone to look at the SQL and see what needs to be added so that posts currently under moderation do not get queried.

Anyone up for the challange and or able to provide help?
Reply With Quote
  #2  
Old 04-02-2007, 08:37 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll need to add
Code:
AND(post.visible==1)
to the query, or something similar. It's hard to say without the query.
Reply With Quote
  #3  
Old 04-12-2007, 08:48 PM
upnorth upnorth is offline
 
Join Date: Jul 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WetWired View Post
You'll need to add
Code:
AND(post.visible==1)
to the query, or something similar. It's hard to say without the query.
I think the query part of the code is as follows

Code:
$NewestNews = $db->query("
   select t.*,p.pagetext, f.title as ft
   from ".TABLE_PREFIX."thread t
   left join ".TABLE_PREFIX."post p on(p.postid=t.firstpostid)
   join ".TABLE_PREFIX."forum f on(f.forumid=t.forumid)
   where f.forumid != 48 AND f.forumid != 42 
   order by dateline desc
   limit 0,$Amount");
I tried both
Code:
$NewestNews = $db->query("
   select t.*,p.pagetext, f.title as ft
   from ".TABLE_PREFIX."thread t
   left join ".TABLE_PREFIX."post p on(p.postid=t.firstpostid)
   join ".TABLE_PREFIX."forum f on(f.forumid=t.forumid)
   where f.forumid != 48 AND f.forumid != 42 AND p.visible==1
   order by dateline desc
   limit 0,$Amount");
and
Code:
$NewestNews = $db->query("
   select t.*,p.pagetext, f.title as ft
   from ".TABLE_PREFIX."thread t
   left join ".TABLE_PREFIX."post p on(p.postid=t.firstpostid)
   join ".TABLE_PREFIX."forum f on(f.forumid=t.forumid)
   where f.forumid != 48 AND f.forumid != 42 AND post.visible==1
   order by dateline desc
   limit 0,$Amount");
and neither worked? Have I provided enough of the code?
Reply With Quote
  #4  
Old 04-13-2007, 05:51 AM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it should be p.visible=1
Reply With Quote
  #5  
Old 04-13-2007, 02:39 PM
upnorth upnorth is offline
 
Join Date: Jul 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WetWired View Post
it should be p.visible=1
well we are making a little progress. I made the changes and it didn't error out this time but it didn't filter it either? If I change p.visible=0 then none of the posts show whether they need to be moderated or not. If I enter it as p.visible=1 then all show whether they need to be moderated or not?
Reply With Quote
  #6  
Old 04-13-2007, 03:54 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, to the extent of my experiance, it should work, but I haven't dealt with moderated stuff in a long time. You'd probably be better helped by someone else.
Reply With Quote
  #7  
Old 04-13-2007, 04:31 PM
upnorth upnorth is offline
 
Join Date: Jul 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I checked the db thread table and visibility for my test thread that needs to be moderated is set to 0 so it must be something with the query string?

Anyone else out there have any ideas?
Reply With Quote
  #8  
Old 04-13-2007, 05:05 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, I didn't realize that threads had a separate visibility. Try
Code:
AND f.visible AND p.visible
Reply With Quote
  #9  
Old 04-13-2007, 05:15 PM
upnorth upnorth is offline
 
Join Date: Jul 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WetWired View Post
Oh, I didn't realize that threads had a separate visibility. Try
Code:
AND f.visible AND p.visible
sweet. you were close! I added
Code:
AND t.visible=1 AND p.visible=1
and it looked like it was successful!

THANKS! for the help WetWired
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 11:36 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.04035 seconds
  • Memory Usage 2,242KB
  • 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
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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