Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 12-08-2002, 07:18 PM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok I used this query : AND visible=1

and got this result: Error

SQL-query :

AND visible = 1

MySQL said:

You have an error in your SQL syntax near 'AND visible = 1' at line 1

word of note - I got this error when I did it with apostrophes and without.
Reply With Quote
  #12  
Old 12-08-2002, 07:21 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The problem is:

[sql]AND visible = 1 [/sql]

Isn't a query. Post the origional code that you were trying to change so we can see how it needs to be changed
Reply With Quote
  #13  
Old 12-08-2002, 07:24 PM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok im confused now. I asked in my very first post in this thread what needed to be done so that the new thread/new posts hack would read at a member level instead of the way it currently does.

at the moment when a person clicks on the new threads/posts link that shows how many new threads/posts are there its possible even if it lists new ones that they wont see them due to permissions. When I asked how I could put it at a member level I was told to run a query like this: AND visible=1
Reply With Quote
  #14  
Old 12-08-2002, 07:35 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Roody
When I asked how I could put it at a member level I was told to run a query like this: AND visible=1
No where in this thread were you told to run that query (as its only part of one).

This is the PHP to add instead:

PHP Code:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE visible=1 AND lastpost > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE visible=1 AND dateline > '$bbuserinfo[lastvisit]'"); 
This will take care of posts in the moderation queue, however taking forum permissions into account invloves significate changes to index.php which can't be posted here.
Reply With Quote
  #15  
Old 12-08-2002, 07:37 PM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok sorry about that NTDLR. I apparently misunderstood since this stuff is a little over my head. As for your php info, is that what I put in my index.php in place of the current changes to it to achieve this hack?

Also, what is it again that this code will specifically do?

oh and one last question where do i find out about the kind of changes to be done to index.php that cant be posted here?
Reply With Quote
  #16  
Old 12-08-2002, 08:07 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem, yes just replace the code with that I posted above.

That will remove new posts and threads in the count that arn't visible on the forums, ie in a moderation queue.

Looking at the permissions it looks harder than I first thought, I remember now trying to do this in the past. If its just a few forums then you can manually add them to not be included, however if you have many different access levels above 2 or more, then the amount of code increses quite a bit and IMO probably wouldn't be worth it.
Reply With Quote
  #17  
Old 12-09-2002, 07:04 PM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok NTLDR. here is an update on this situation. I installed that line of code on my test forums. Then using the Admin account I made a post in a private forum, and then I signed into a regular "Registered" user account that didn't have permissions to see the forum where the admin account posted in.

Unfortunately it listed the regular "Registered" user account as having a new thread/post, but when I clicked on that link I got the following message: "Sorry - no matches. Please try some different terms."

Any suggestions on my next move? Did I misunderstand something here?
Reply With Quote
  #18  
Old 12-09-2002, 08:59 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That only excludes posts in the moderation queue. With alot a lot of hacking and changes (which I've never got to work) you can get forum permissions to apply automatically.

Which leaves 2 choices IMO, 1, Leave it as is 2, manually exclude every forum thats private for all users (or non-mods/admins).
Reply With Quote
  #19  
Old 12-09-2002, 09:12 PM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by NTLDR
That only excludes posts in the moderation queue.

2, manually exclude every forum thats private for all users (or non-mods/admins).
okay, here is my newbie questions. explain the moderation queue thing. im guessing this is the function that if enabled would prevent users from having posts applied to the forums until moderated by an admin? Second, im not sure Im following how to manually exclude a forum that is private for all non-mods admin. Can you break this down for me some?
Reply With Quote
  #20  
Old 12-10-2002, 12:29 PM
Roody Roody is offline
 
Join Date: Mar 2002
Location: Florida
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im bumping this up to make sure someone sees my question.
Reply With Quote
Reply

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

Forum Jump


All times are GMT. The time now is 12:51 AM.


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.04168 seconds
  • Memory Usage 2,255KB
  • 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
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete