[FINAL] yellow card (+ card ban system)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

You cannot pass empty data to integer columns. It is not ANSI SQL compliant. What you should to prevent the occurance of empty values is validate your data before building an SQL query. Using the intva()l to force it as an integer would work fine to solve the problem....
User avatar
SnowManrcd
Registered User
Posts: 155
Joined: Tue Oct 21, 2003 6:05 pm

Post by SnowManrcd »

I instaleed yellow card mod a few weeks ago worked perfectly recently I atempted to set up post report froum. when the user clicks submit after filling out the information they get the foillowing error

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'viewtopic.php?p=2133#2133'> Here to go to the reported post
----------' at line 1

INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (2136, '(2133)For You Import Fanatics', '4e0b221378', 'Click Here to go to the reported post
--------------------------------

testing')

Line : 288
File : /home/bdweb4724f/ransacknation.com/public_html/phpBB2/includes/functions_post.php

I just need a push in the right direction where should I start looking to solve this problem?? thanks

-Brandon
-SnowMan
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

SQL syntax near 'viewtopic
the viewtopic is not even mentioned in the SQL debug message - I asume the error did (it should) have more info than the message you have posted.

please post the complete SQL debug message - or give a URL to a topic inside your forum, where guests can "report"
Earth should spin a litle slower, then there would be 28H/dayImage
User avatar
SnowManrcd
Registered User
Posts: 155
Joined: Tue Oct 21, 2003 6:05 pm

Post by SnowManrcd »

Code: Select all

General Error
 
Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'viewtopic.php?p=2975#2975'> Here to go to the reported post
----------' at line 1

INSERT INTO phpbb_posts_text (post_id, post_subject, bbcode_uid, post_text) VALUES (2976, '(2975)test', 'cbb01598f0', 'Click Here to go to the reported post
--------------------------------

testing post')

Line : 288
File : /home/bdweb4724f/ransacknation.com/public_html/phpBB2/includes/functions_post.php
that is the entire error code I recieved,

http://www.ransacknation.com/phpBB2/viewforum.php?f=18

this is a test catagory I created for debugging this problem. you may log in and give me a blue card (SnowMan) atempt to write a mesage and you should also get the error

test account

User : phpbb
Pass : phpbb
-SnowMan
User avatar
SnowManrcd
Registered User
Posts: 155
Joined: Tue Oct 21, 2003 6:05 pm

Post by SnowManrcd »

any help wpuld be apreciated
-SnowMan
User avatar
SnowManrcd
Registered User
Posts: 155
Joined: Tue Oct 21, 2003 6:05 pm

Post by SnowManrcd »

i give up i see no piont to requesting help here. later.
-SnowMan
User avatar
SnowManrcd
Registered User
Posts: 155
Joined: Tue Oct 21, 2003 6:05 pm

Post by SnowManrcd »

its taking forever and no one is helping me with anything so later, i'll just have to figure it out myself.
-SnowMan
[DJ]Ly5y
Registered User
Posts: 55
Joined: Mon Oct 20, 2003 10:57 pm

Post by [DJ]Ly5y »

have a little problem

I have a problem with the mod becose when i give someone a warrning the windown above his avtar don't show. When i ban a user it not show ether please help. My forum is located at www.paw.pl/~djlysy/forum/
I have checked the installation 2 times and i have done everything perfect as you tod in installation txt. And why the card's are in some window's like this Image

You see the spaces above those cards :-/


P.S. Sorry for my poor English.
[DJ]Ly5y
Registered User
Posts: 55
Joined: Mon Oct 20, 2003 10:57 pm

Post by [DJ]Ly5y »

Help m3
Last edited by [DJ]Ly5y on Thu Dec 04, 2003 9:37 am, edited 1 time in total.
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

SnowManrcd wrote: i give up i see no piont to requesting help here. later.
sorry for the delaqyed answer, I did try visit your forum, but the test forum, was unawaileble
Earth should spin a litle slower, then there would be 28H/dayImage
User avatar
SnowManrcd
Registered User
Posts: 155
Joined: Tue Oct 21, 2003 6:05 pm

Post by SnowManrcd »

Niels Chr. Denmark wrote:
SnowManrcd wrote:i give up i see no piont to requesting help here. later.
sorry for the delaqyed answer, I did try visit your forum, but the test forum, was unawaileble


its kewl I have been working on it for sume time with no sucess and I got a little fusterated, sorry about that I set up the form is only visable formt he phpbb account once its loged in. and forgot to allow that user access to it, It is fixed now the user phpbb has access to the forum
-SnowMan
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

switching to PM
Earth should spin a litle slower, then there would be 28H/dayImage
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

it could be that some other MOD have changed this line in posting.php
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
Earth should spin a litle slower, then there would be 28H/dayImage
JKeats
Registered User
Posts: 312
Joined: Thu Mar 20, 2003 12:32 am
Contact:

Post by JKeats »

just installed 1.4.8 of the yellow card hack. i'm running phpBB 2.0.6

when i select a topic to view, i get the following error
Couldn't obtain category list.

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND c.cat_id<>'25' WHERE f.cat_id = c.cat_id

SELECT c.cat_id, c.cat_title, c.cat_order FROM phpbb_categories c, phpbb_forums f AND c.cat_id<>'25' WHERE f.cat_id = c.cat_id GROUP BY c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order

Line : 121
File : /home/nick/public_html/phpBB2/includes/functions.php


line 121 of functions.php is:

Code: Select all

message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql);
that section of code in functions.php (111-128) is:

Code: Select all

//        $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);

        $sql = "SELECT c.cat_id, c.cat_title, c.cat_order
                FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
                ".(($userdata['user_level'] == ADMIN)? "" : " AND c.cat_id<>'".HIDDEN_CAT."'" )."
                WHERE f.cat_id = c.cat_id
                GROUP BY c.cat_id, c.cat_title, c.cat_order
                ORDER BY c.cat_order";
        if ( !($result = $db->sql_query($sql)) )
        {
                message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql);
        }
        
        $category_rows = array();
        while ( $row = $db->sql_fetchrow($result) )
        {
                $category_rows[] = $row;
        }
at someones suggestions i found and corrected

Code: Select all

c.cat_id <> '".HIDDEN_CAT.
in the functions.php file (there was a couple spaces missing... but i still get the error.

any ideas?
The only thing necessary for the triumph of evil is for good men to do nothing.
JKeats
Registered User
Posts: 312
Joined: Thu Mar 20, 2003 12:32 am
Contact:

Post by JKeats »

update:

very strange thing happening here...

this is a new board... so prior to adding this mod, i was the only one registered.

in order to test out the mod, i registered a NEW member (i ran into the same error message while registering as well...).

what's interesting... is that when using MY username, i get no errors when viewing topics... however, when trying to use the test member i created, i DO get the error message.

just thought i'd post in case this helps solve the problem.
The only thing necessary for the triumph of evil is for good men to do nothing.
Locked

Return to “[2.0.x] MODs in Development”