vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Administrative and Maintenance Tools - Advanced Warning System 3.6.7 (https://vborg.vbsupport.ru/showthread.php?t=124477)

sv1cec 02-04-2007 06:29 AM

Quote:

Originally Posted by alexhirurg (Post 1166827)
And also about USERCP template - it's not changed by install instructions, but how user can see his warnings in user CP ?

The user can see his warnings from his User Profile. There are links in there to show him his warnings. It's a minor job to add a similar link in User CP, and frankly that's a good idea.

Delphiprogrammi 02-04-2007 10:29 AM

Quote:

Originally Posted by sv1cec (Post 1174165)
The user can see his warnings from his User Profile. There are links in there to show him his warnings. It's a minor job to add a similar link in User CP, and frankly that's a good idea.

Done BUT there is something wrong the warning information is not showing where it should ... look at the pic .I wrote this small plugin for this thing

PHP Code:

$user = & $vbulletin->userinfo;
$warn_page "";
eval(
'$warn_page .= "' fetch_template('usercp_warn_view_top') . '";');
$get_warns=$db->query_read("SELECT w.*,u.username as wusername,u.userid as wuserid,wt.* FROM
"
.TABLE_PREFIX."warnings w
LEFT JOIN "
.TABLE_PREFIX."user u ON(u.userid=w.warned_by)
LEFT JOIN "
.TABLE_PREFIX."warning_types wt ON(wt.tid=w.warned_warning_id)
WHERE w.warned_user='
{$user['userid']}' ORDER BY w.warned_time DESC");
while(
$warn=$db->fetch_array($get_warns))
{
 
$warn['date'] = vbdate($vbulletin->options['dateformat'],$warn['warned_time']);
    
$warn['time'] = vbdate($vbulletin->options['timeformat'],$warn['warned_time']);
    
$wmessage=stripslashes($warn['warned_reason']);
 eval(
'$warn_page .= "' fetch_template('usercp_warn_view_row') . '";');
}
eval(
'$warn_page .= "' fetch_template('usercp_warn_view_end') . '";'); 

used hook location "usercp_start" for some reason the template "usercp_warn_view_row" is not being fetched i don't get it

sv1cec 02-04-2007 10:41 AM

Well, I am not sure, but since this user has no warning points, hence no warnings, what did you expect the warn_view_row to show? LoRL, did you try it with a warned user?

Delphiprogrammi 02-04-2007 11:02 AM

Quote:

Originally Posted by sv1cec (Post 1174300)
Well, I am not sure, but since this user has no warning points, hence no warnings, what did you expect the warn_view_row to show? LoRL, did you try it with a warned user?

:D :D The user i whas testing didn't have a warning :D :D this is something for the "our stupidest mistakes thread" the thing is working ok now

sv1cec 02-04-2007 11:17 AM

LoRL, it has happened to all of us, don't worry! Nice work.

NFLfbJunkie 02-08-2007 12:22 AM

When I click on the "comment" from the admincp warnings log, I get the following:

"The requested URL /forums/admincp/admin_warn.php was not found on this server".

My admin control panel is named something other than 'admincp' so where would I need to replace 'admincp' with what I labeled mine as?

Delphiprogrammi 02-08-2007 11:01 AM

Quote:

Originally Posted by Junkie (Post 1177188)
When I click on the "comment" from the admincp warnings log, I get the following:

"The requested URL /forums/admincp/admin_warn.php was not found on this server".

My admin control panel is named something other than 'admincp' so where would I need to replace 'admincp' with what I labeled mine as?

That should be already there but i forgot to add it to that section.To make that work if you have a "custom" admincp directory open admin_warn.php and find (if it is not there add it)

PHP Code:

$admincpdir=$vbulletin->config['Misc']['admincpdir']; 

then still in the same file (admin_warn.php) around line 714 there is this code

PHP Code:

$d="<A HREF=\"{$vbulletin->options[bburl]}/admincp/admin_warn.php?do=showcomment&id=$warn[wid]\"  onclick=\"window.open('{$vbulletin->options[bburl]}/admincp/admin_warn.php?do=showcomment&id=$warn[wid]','','width=1024, height=500, resizable=yes, scrollbars=yes'); return false;\" target=\"_blank\">$vbvb</a></font>"

replace that with

PHP Code:

$d="<A HREF=\"{$vbulletin->options[bburl]}/$admincpdir/admin_warn.php?do=showcomment&id=$warn[wid]\"  onclick=\"window.open('{$vbulletin->options[bburl]}/$admincpdir/admin_warn.php?do=showcomment&id=$warn[wid]','','width=1024, height=500, resizable=yes, scrollbars=yes'); return false;\" target=\"_blank\">$vbvb</a></font>"

to explain more clearly you need to replace "admincp" with $admincpdir this variable contains the correct complete path to your admincp (it reads from /includes/config.php)
save file upload that should do it

NFLfbJunkie 02-08-2007 12:05 PM

Thank you so much for the quick reponse. This very useful MOD is working great on my board.

NFLfbJunkie 02-08-2007 01:06 PM

Is there a way to remove the vBulletin "Give Infraction" link that shows in the user's profile and the icon https://vborg.vbsupport.ru/external/2007/02/12.gif that shows in the postbit?

Steeler Nation 02-08-2007 01:18 PM

I'm getting errors when I try to warn or leave a note:

Quote:

Fatal error: Call to undefined function: check_user() in /home/www/steelernation/forums/Warn.php on line 605
Quote:

Fatal error: Call to undefined function: check_user() in /home/www/steelernation/forums/Warn.php on line 120


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