vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Advanced Warning System (Beta Version) (https://vborg.vbsupport.ru/showthread.php?t=95921)

Delphiprogrammi 03-07-2006 10:09 AM

Quote:

Originally Posted by sv1cec
OK, I am completely stuck here. Delphi, or whoever else can check out the admin_warn.php code for me, I need some ... support.

When viewing the Warnings Log, there are two links, one saying "Remove" and the other saying "Complete Removal". My problem is this:

The first one, when clicked, shows the next screen correctly, i.e. all the information is there. The second one, does not passes all the parameters to the next screen, it does not pass all the TYPE_STR fields. As a result, the name of the warned user, and type of warning and the parameter which shows if this warning has caused a ban or no, are not passed.

The code in these two routines (remove and completeremove) is exactly the same. The code from which the two routines are called, is also exactly the same, it's shown below:

Routine remove call:

Code:

$y="<a href='{$vbulletin->options['bburl']}/$admincpdir/admin_warn.php?act=remove&id={$warn[wid]}&userid={$warn[warned_userid_v]}&uname={$warn[warned_username_v]}&wname={$warn[warn_name]}&postid={$warn[warned_post]}&ban=$warn[caused_ban]&orderstring={$order}'>Remove</a>";
Routine completeremove call:

Code:

$cy="<a href='{$vbulletin->options['bburl']}/$admincpdir/admin_warn.php?act=completeremove&id={$warn[wid]}&userid={$warn[warned_userid_v]}&uname={$warn[warned_username_v]}&wname={$warn[warn_name]}&postid={$warn[warned_post]}&ban=$warn[caused_ban]&orderstring={$order}'>Complete Removal</a>";
The strange thing is that if you hover your cursor above the two links, you can see that the parameters are shown, in other words, they are passed.

Anyone has any ideas?????

It's not affecting the operation of the program per se, the warnings are completely removed, but I do not like it when I can't figure out what's going on and why things do not work as expected.

did notice that to verry strange.Gonna check it out.

sv1cec 03-07-2006 10:51 AM

Yes, and if you add a couple of display echos, you will see that all the numeric valiables are passed, and all the string ones are not. Why? I haven't the faintest idea.

Delphiprogrammi 03-07-2006 11:40 AM

hi,

yes true.I haven't got an idea either but it's obvious variables of type TYPE_INT are passed and TYPE_STR aren't

PHP Code:

$vbulletin->input->clean_array_gpc('g',array(
        
'id' => TYPE_INT,
        
'userid' => TYPE_INT,
        
'uname' => TYE_STR,
        
'wname' => TYPE_STR,
        
'postid' => TYPE_INT,
        
'orderstring' => TYPE_STR,
        
'ban' => TYPE_STR,
    )); 

looks correct to me.Verry "frusterating" that one screen works fine and the other just refuses to work.the g means the type of variables $_GET that can be
  • g => $_GET
  • p =>$_POST
  • r=>$_REQUEST,
  • c=>$_COOKIE,
  • s=>$_SERVER,
  • e=>$_ENV,
  • f=$_FILES,

maybe that got something todo with it just guessing here through

there is a problem with it if you call GettType() of those TYPE_STR variables it just returns the plain function call while TYPE_INT is properly returned

PHP Code:

echo gettype($temp_wname);
echo 
gettype($temp_uid); 


Delphiprogrammi 03-07-2006 01:49 PM

John,

Look at the attached screenshot...

:banana: :ermm:

if you output those variables with $_GET[name] (no quotes) it does work verry strange i'm thinking about a vbulletin bug here ?

sv1cec 03-07-2006 02:38 PM

I spend the best part of this morning, trying to figure that out. I compared the code, where the completeremove and the remove are called from. Same thing. I compared the GPC cleaning thing, I even copied parts of the code from the remove to the completeremove. Nothing!

This afternoon, I tried something, below the section of code that should affect this. Guess what? It fixed something, wname and uname are now passed, but not the parameter which shows if that warning has caused a ban.

Darn vB 3.5!! :(

sv1cec 03-07-2006 02:40 PM

I have to agree with you. Have a look at the attached admin_warn.php. The code for the remove and for the complete remove is the same. What I added to have the first variables shown (the ones which didn't show before), was the clean_array_gpc BELOW the form. How on earth can the code below the form, affect the code which is above the form, is totally beyond my understanding. Still, there is no way I can make the "N" (for No ban) pass!

Other members, please do not use this file. It contains debug code, which will mess up your system.

Drewish 03-07-2006 03:07 PM

The automatic warning seemed to work fine when I used the default userID(1), but when i used the one for my bot(47), it diddnt work anymore.

sv1cec 03-07-2006 03:13 PM

Quote:

Originally Posted by Drewish
The automatic warning seemed to work fine when I used the default userID(1), but when i used the one for my bot(47), it diddnt work anymore.

Excuse me, but what is a bot? The automatic warner should be just another user. I hope this is what you mean. I tested that this morning and everything works fine. My warner is userid 2 and it works fine. See my previous posts on this matter, to solve a minor issue.

Delphiprogrammi 03-07-2006 03:45 PM

well,

The ban parameter is indeed not passed.A quick n dirty solution would be changing "caused_ban" to a bool and use "TYPE_BOOL" this is either true or false (0 or 1 ) and that should work i know this is a "dirty" solution but the cause of this parameter not being passed can be anywhere.admin_warn.php are 3260 rules of code so .....

again the problem is the same it works fine in remove and doesn't in completeremove

sv1cec 03-07-2006 04:37 PM

That's the worst possible solution, it will require people to alter their existing tables. Neah, I'll give it some more thought when I get some more time. In the mean time, nobody is telling me if the Automatic Warnings are working OK now.


All times are GMT. The time now is 03:57 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.02023 seconds
  • Memory Usage 1,756KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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