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)

Exitilus 02-26-2006 11:09 AM

Just rename them in that one file? or all the AWS Files?

Delphiprogrammi 02-26-2006 11:15 AM

Quote:

Originally Posted by Exitilus
Just rename them in that one file? or all the AWS Files?

if you rename a function you must find every call to the renamed function in all aws files (and plugings used by the system) or PHP will display something like "fatal error call to undefined function" Since this seems to be a problem for people using that inferno hacks and also like this hack i already renamed those AWS functions but it still needs some testing to see if it actually works running fine here on my board

sv1cec 02-26-2006 12:33 PM

As Delphi said, if you rename a function, you have to change every call to that function too.

MorrisMcD 02-26-2006 03:28 PM

Quote:

Originally Posted by sv1cec
@MorrisMcD, @Exitilus: If you do the renaming properly, there is no reason why this would happen. I may rename those routines in the new version, but this is the last of my priorities. Did you ask Inferno for a solution too? What did they say? And this is not a new problem, it's been known since the previous version of AWS.

When I do all the renaming, things work, except when I click view warnings on people's postbit, it shows nothing but a blank page.. I am pretty sure there were a couple other areas when I got nothing but a blank page.. The way I ended up having it working, was because I renamed everything on the QUIZ hack because it wouldnt work when I did it with AWS.. THEN I got RPG and it just got even messier..

This is a far superior warning hack imo.. You should really consider rereleasing it with prefixes on your functions. I think Inferno should be doing the same thing..

Great hack.. Dont take me as complaining.. I am really bummed I couldnt get it workin

Delphiprogrammi 02-26-2006 04:37 PM

hi people,

try this.Open "/includes/functions_warning.php" and change this code

PHP Code:

function SendPM($message,$title,$to,$from)
{
    global 
$db;
    
    
// Permssions Crap XD your getting a damn PM!! XD
    // Parse It Out
    
$title addslashes(htmlspecialchars_uni(fetch_censored_text($title)));
    
$message addslashes(fetch_censored_text($message));
    
$to=$db->query_first("select * from ".TABLE_PREFIX."user where userid='{$to}'");  // Grab Member Its Going TO
    
$from=$db->query_first("select * from ".TABLE_PREFIX."user where userid='{$from}'"); // Grab Member Its Coming FROM
    
    // Insert The Message
    
$to_string["$to[userid]"] = $to['username'];
    
$now=time();
    
$db->query_write("insert into ".TABLE_PREFIX."pmtext (fromuserid,fromusername,title,message,touserarray,iconid,dateline,showsignature  ,allowsmilie) values ('{$from['userid']}','".addslashes($from['username'])."','{$title}','{$message}','".addslashes(serialize($to_string))."','4','{$now}','1','1')");
    
// id thingy
    
$db->query_write("insert into ".TABLE_PREFIX."pm (pmtextid, userid) values (".$db->insert_id().", '{$to['userid']}')");
    
    if (
$to['pmpopup'])
    {
        
$db->shutdown_query("UPDATE " TABLE_PREFIX "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid='{$to['userid']}'");
    }
    else
    {
        
$db->shutdown_query("update ".TABLE_PREFIX."user set pmtotal=pmtotal+'1',pmunread=pmunread+'1' WHERE userid='{$to['userid']}'");
    }

    
    
// Update pm count
    


to (for example)
PHP Code:

function SendPmAws($message,$title,$to,$from

the rest off the code in that function doesn't need any changes

still in functions_warning.php

PHP Code:

function RunError($message)
{
    
// Theres probably some globals below not in use, uhm, who cares?
    
global $vbulletin$session$stylevar$_POST$vbphrase,$navbits,$show,$header;
    global 
$templatecache$db$vbulletin$style,$headinclude,$footer;
    global 
$tempusagecache$templateassoc$pmbox,$pmtext;
        eval(
'$warn_page .= "' fetch_template('warn_error') . '";');
    
$navbits construct_navbits($navbits);
    eval(
'$navbar = "' fetch_template('navbar') . '";');
    eval(
'print_output("' fetch_template('WARN') . '");');
    exit;


PHP Code:

function RunErrorAws($message

again no further changes are needed

files who needs an update
  • Warn.php(SendPm() and RunError())
  • /includes/cron/kill_wans.php (SendPM())
  • /admincp/admin_warn.php(name it SendPmAcp() there for example)

that should do it

Now don't shoot me if i forgot a place where those functions are called :speechless:

sv1cec 02-26-2006 06:48 PM

Somehow, I do not believe that these are the only locations that need to be changed. Did you check the plugins too?

Delphiprogrammi 02-26-2006 09:33 PM

Quote:

Originally Posted by sv1cec
Somehow, I do not believe that these are the only locations that need to be changed. Did you check the plugins too?

yeah didn't find any that uses those RunError() or SendPM() i did found plugins that use warn_notify and warn_calculations but now John ... something else.I've found that if you want to remove a warning uing the "complete removal" option it will fail to function because the items are incorrectly linked i mean this code

PHP Code:

$cy="<a href='{$vbulletin->options[bburl]}/$admincpdir/admin_warn.php?act=completeremove&id={$warn[wid]}&userid={$warn[wuserid]}&uname={$warn[wusername]}&wname={$warn[warn_name]}&postid={$warn[warned_post]}&orderstring={$order}'>Complete Removal</a>"

$admincpdir variable doesn't excist anymore in 3.5.x this could be solved by

PHP Code:

$admincpdir=$vbulletin->config['Misc']['admincpdir'];
$cy="<a href='{$vbulletin->options[bburl]}/$admincpdir/admin_warn.php?act=completeremove&id={$warn[wid]}&userid={$warn[wuserid]}&uname={$warn[wusername]}&wname={$warn[warn_name]}&postid={$warn[warned_post]}&orderstring={$order}'>Complete Removal</a>"

now those links will work again as they should

sv1cec 02-27-2006 04:44 AM

Darn man, that's why I hate 3.5. You have to learn mostly everything from scratch.

Thanks for the heads-up Delphi, maybe this is my problem with the removal in admincp. I'll work on it maybe today. I think I'll define $admincp as a global variable somewhere in the start, and leave the code alone. There is no reason to change every occurence of it. Is there any place, where all the obsolete variables and structures are collected, so that one can reference it and take it from there? The only thing I had found in the past, was a thread, where you had to scroll through all the posts to get that information. Hasn't Jellsoft released any official document with these changes?

Again, thanks.

Delphiprogrammi 02-27-2006 12:44 PM

hi John ,

Found another problem.If you completely remove a warn and you send email about this

Quote:

Dear tester,

A warning you have received for violating Array[bbtitle] Rules has been totally removed from your account, by the Forums team. The removed warning concerned:

you are crossposting
(Warning Type = 'CrossPosting')

The post for which you were warned, and whose warning has now been totally removed, can be seen here:

Array[bburl]/showthread.php?p=165

With this warning being removed, 4 point(s) have been removed from your total.

Your total Warning Level at the moment is: 0 point(s).

Please reply back if you have a dispute.

----------------

Array[bbtitle] Team

i think that is caused by a template in templates it is still $vboptions and not $vbulletin->options no sure however i'll try to find the problem

update

problem found it's the $thread2 variable causing the failing url's in admin_warn.php

sv1cec 02-27-2006 03:00 PM

I think I've spotted that too, and corrected it. Thanks for the heads-up though.


All times are GMT. The time now is 08: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.02267 seconds
  • Memory Usage 1,790KB
  • 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
  • (6)bbcode_php_printable
  • (4)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