vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Umm Having Truble (https://vborg.vbsupport.ru/showthread.php?t=44559)

supersimon 10-13-2002 01:35 AM

Umm Having Truble
 
iam havin truble makinga link on ur postbit lile rite now i have


PHP Code:

     <a href="moderator.php?s=$session[sessionhash]&action=edit&userid=$userinfo[userid]">Add  Win/Loss</a

but when a mod clicks on that link it brings them to a screen were they can view there info not edit it for them to edit it they have to search his name and clcik edit (i have installed a hack were mods can edit a users prefrences) and then they can edit it.......
i need to make it soo when they click teh link on the posbit it goes directly to teh edit screen and this is for supermods so it uses /mod/user.php not /admin/user.php

can someone help me ?

for a demo
http://www.liquidflo.com/rap/showthr...?threadid=1805

supersimon 10-13-2002 01:50 AM

ahhh sorry wrong forums this should be in Hlep me Finish a hack

Xenon 10-13-2002 09:15 AM

have you edited your moderator.php
so it has this block in it?

PHP Code:

if ($action=="edit") {

  
$userid verifyid("user",$userid);

  
$permissions=getpermissions();
  if (
$permissions[cancontrolpanel]) {
    
header("Location: admin/index.php?s=$session[sessionhash]&loc=".urlencode("user.php?s=$session[sessionhash]&action=edit&userid=$userid"));
  } elseif (
$permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1")) {
    
header("Location: mod/index.php?s=$session[sessionhash]&loc=".urlencode("user.php?s=$session[sessionhash]&action=edit&userid=$userid"));
  } else {
    
show_nopermission();
  }

  exit;



supersimon 10-13-2002 02:53 PM

no how can i do this ?

Xenon 10-13-2002 03:11 PM

how you edit a file?

you need a texteditor: UltraEdit for example then open moderator.php find the start of another ifblock and insert before what i posted

supersimon 10-13-2002 05:16 PM

i use Dreamwaever but what ifblock am i looking for ?

supersimon 10-14-2002 02:11 PM

bump ???

Xenon 10-14-2002 03:57 PM

as i said it's not important!

add it for example after this:
PHP Code:

if ($action=="useroptions") {

  
$userid verifyid("user",$userid);

  
$permissions=getpermissions();
  if (
$permissions[cancontrolpanel]) {
    
header("Location: admin/index.php?s=$session[sessionhash]&loc=".urlencode("user.php?s=$session[sessionhash]&action=edit&userid=$userid"));
  } elseif (
$permissions[ismoderator] or $ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canviewprofile=1")) {
    
header("Location: mod/index.php?s=$session[sessionhash]&loc=".urlencode("user.php?s=$session[sessionhash]&action=viewuser&userid=$userid"));
  } else {
    
show_nopermission();
  }

  exit;



supersimon 10-14-2002 09:52 PM

umm iam running a 2.2.7 and i couldnt find that ?
so i pasted it in with teh other ifblocks and it didnt work ?
iam pasting this in moderate.php rite

NTLDR 10-14-2002 10:11 PM

Code:

        <a href="moderator.php?s=$session[sessionhash]&action=edit&userid=$userinfo[userid]">Add  Win/Loss</a>
Should be:

Code:

        <a href="moderator.php?s=$session[sessionhash]&action=edit&userid=$post[userid]">Add Win/Loss</a>
If you want to edit the person who posted.


All times are GMT. The time now is 10:03 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.01078 seconds
  • Memory Usage 1,747KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete