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)

sv1cec 04-11-2006 05:26 PM

MarcusTangh, I am sure you are capable of writing a better hack than this. Please go ahead and do it.

sv1cec 04-11-2006 05:30 PM

MThornback,

'comment' is a string, why are you comparing to with zero? Try comparing it with ''.

MThornback 04-12-2006 03:16 AM

Quote:

Originally Posted by sv1cec
MThornback,

'comment' is a string, why are you comparing to with zero? Try comparing it with ''.

That would be because I am an admirer and editor of code...more than I am good at writing it :p

So this should work then? Cause it doesn't

Code:

// Require Comment //
if ($vbulletin->GPC['comment']=='')
{
        $message_left="{$user['username']} could not be warned because you did not enter a reason for the warning. Please  go <a href='javascript:history.go(-1)'>back</a> and try again.";
}
else
{
        eval('$warn_page .= "' . fetch_template('warn_redirect') . '";');
}


sv1cec 04-12-2006 03:56 AM

LoL, I'll have to look at the code to see how this Javascript needs to be called. Did you verify that the comparison works? In other words, with the above code, does the program goes into the IF statement or in the ELSE statement?

MThornback 04-12-2006 04:23 PM

It goes right to the else...it seems to ignore the IF altogether....it went to the IF when I was comparing it to zero...for obvious reasons :p

sv1cec 04-12-2006 05:32 PM

Try this.

In Warn.php find:

Code:

$slcomment=$vbulletin->GPC['comment'];
Add below that:

Code:

if ($slcomment=='')
{
        $message_left="{$user['username']} could not be warned because you did not enter a reason for the warning. Please  go <a href='javascript:history.go(-1)'>back</a> and try again.";
}
else
{

Then in the same file, find:

Code:

$url="showthread.php?p={$post}";
eval('$warn_page .= "' . fetch_template('warn_redirect') . '";');

Replace that with:

Code:

}
$url="showthread.php?p={$post}";
eval('$warn_page .= "' . fetch_template('warn_redirect') . '";');

Let me know if it works. Note that I edited the code this morning, so please make sure you are using the latest one, as it appears above.

Also, you do not have to use the "Back" javascript, it will redirect you automatically.

akanevsky 04-12-2006 05:46 PM

Quote:

Originally Posted by Psionic Vision
Is ever going to be a non-beta?

Apparently not, but oh well. I don't need it anymore.

sv1cec 04-13-2006 09:11 AM

Another fed-up customer.

akanevsky 04-13-2006 02:02 PM

Yup, what can be done... :-/

Delphiprogrammi 04-13-2006 06:45 PM

hi people,

i got the warn_notes to work !!!!!! and added it to the product XML.I hate half work and keep playing with it till i found what went wrong

those notes do work fine :D :cool:


All times are GMT. The time now is 06:31 PM.

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.02845 seconds
  • Memory Usage 1,740KB
  • 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
  • (5)bbcode_code_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