vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Improved Post Report System (https://vborg.vbsupport.ru/showthread.php?t=76582)

Delphiprogrammi 02-18-2005 09:20 PM

Quote:

Originally Posted by wwesn1
did you read my posts?

Change The

Code:

                " . TABLE_PREFIX . "postreport.*,
                " . TABLE_PREFIX . "user.username modname,
                " . TABLE_PREFIX . "user2.username reporter,
                " . TABLE_PREFIX . "post.username postername,
                " . TABLE_PREFIX . "post.userid posterid,
                " . TABLE_PREFIX . "thread.title,
                " . TABLE_PREFIX . "thread.threadid,
                " . TABLE_PREFIX . "forum.title forumtitle,
                " . TABLE_PREFIX . "forum.forumid

TO

Code:

                postreport.*,
                user.username modname,
                user2.username reporter,
                post.username postername,
                post.userid posterid,
                thread.title,
                thread.threadid,
                forum.title forumtitle,
                forum.forumid

That will work untill he fixes it

yeah i did read your posts but i'm getting anothr error as you had php code that's causing the error ...

PHP Code:

$postreports $DB_site->query("
    SELECT
    " 
TABLE_PREFIX "postreport.*,
    " 
TABLE_PREFIX "user.username modname,
    " 
TABLE_PREFIX "post.username postername,
    " 
TABLE_PREFIX "post.userid posterid,
    " 
TABLE_PREFIX "thread.title, thread.threadid
    FROM " 
TABLE_PREFIX "postreport AS postreport
    LEFT JOIN " 
TABLE_PREFIX "user AS user ON (postreport.modid = user.userid)
    LEFT JOIN " 
TABLE_PREFIX "post AS post ON (postreport.postid = post.postid)
    LEFT JOIN " 
TABLE_PREFIX "thread AS thread ON (post.threadid = thread.threadid)
    WHERE " 
TABLE_PREFIX ."postreport.userid = $userid
    ORDER BY postreport.dateline DESC
    LIMIT 
$page_start$reports_per_page
"
); 

:confused:

wwesn1 02-18-2005 09:25 PM

yes, for some reason those first four " . TABLE_PREFIX . " were messing things up. Unless he missed something somewhere that would make it work

boozehound 02-18-2005 09:54 PM

Ok, the problems with the TABLE_PREFIXes... I've updated the files in the zip to work correctly with table prefixes, and also switched the SQL queries for an installer. The installer should add the correct table prefix to the new table.

There is a possibility that if you just ran the queries as they were, on a system that uses table prefixes, you could still have a problem. But you should be able to fix that by removing " . TABLE_PREFIX . " from the FROM clause of the queries.

trackpads 02-18-2005 10:00 PM

Wow, this hack looks great! I am going to install it tonight! Great work!!!!

Delphiprogrammi 02-18-2005 10:03 PM

yeag that seems to be solved now thanks for fixing that ;)

boozehound 02-18-2005 10:07 PM

Quote:

Originally Posted by Delphiprogrammi
yeag that seems to be solved now thanks for fixing that ;)

Sorry for any problems you had! Neither the forum it's been installed on for a while nor my test forum use table prefixes, so it was never tested in that way (til now). And there I was thinking gratuitous use of " . TABLE_PREFIX . " would make it ok ;)

Freezerator 02-19-2005 07:59 AM

Wow, this is how post report should have been!
Installing!

Freezerator 02-19-2005 08:22 AM

Works like a charm.

One question or suggestion: Can there be that when a mod looks @ the postreport pages, that he sees al reports, and not the ones from himself? Or somewhere a counter so they can easy see there are open post reports waiting.

boozehound 02-19-2005 08:56 AM

Quote:

Originally Posted by Freezerator
One question or suggestion: Can there be that when a mod looks @ the postreport pages, that he sees al reports, and not the ones from himself?

I suppose so but couldn't they just look in modcp for the same information?

Quote:

Originally Posted by Freezerator
Or somewhere a counter so they can easy see there are open post reports waiting.

Hopefully in a future release :)

Delphiprogrammi 02-19-2005 10:10 AM

hi,

ok dumb question but i'm gonna ask anyhow :D i logged in with my normal user account i use for testing stuff like this and i reported a post.I receive an e-mail with stuff "post reported" but that table remains empty ? also in /modcp/ there's nothing there it says no posts have been reported :s what am i doing here


All times are GMT. The time now is 11:29 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.01421 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete