vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   recently added admin can read pms but help me plz (https://vborg.vbsupport.ru/showthread.php?t=74517)

Thug 01-17-2005 01:44 PM

recently added admin can read pms but help me plz
 
We recently added this hack https://vborg.vbsupport.ru/showthrea...t=read+user+pm
but we cant read them via admin cp we have to use a link
http://www.oh-twadi.com/forum/admincp/pm.php?userid=1
and u have to change the number at the end to wateva user u want to see
is there a better hack? or a way u can make it so u can go to admincp and see them there and also not have to change the url manualy?
plz help

yoyoyoyo 01-17-2005 02:02 PM

Quote:

Originally Posted by Thug
We recently added this hack https://vborg.vbsupport.ru/showthrea...t=read+user+pm
but we cant read them via admin cp we have to use a link
http://www.oh-twadi.com/forum/admincp/pm.php?userid=1
and u have to change the number at the end to wateva user u want to see
is there a better hack? or a way u can make it so u can go to admincp and see them there and also not have to change the url manualy?
plz help

change the number to a name and try that, but this doesn't really belong in the mod request area.

MotoUp 01-17-2005 02:59 PM

Try this...

Code:

##############################################################
#                                                            #
#        To insert a direct access in the User Manager:            #
#                                                            #
##############################################################

Files to edit        =>        1
Phrases to add        =>        1

##############################################################
Edit admincp/user.php
##############################################################

---------------------
find:
---------------------

                                => $vbphrase['delete_user'],

---------------------
under add: (Respecting the tabulations)
---------------------

                        "pm.php?$session[sessionurl]userid=$userid"
                                => $vbphrase['read_pm_user'],

##############################################################
Add new phrase
##############################################################

Phrase type        =>        CONTROL PANEL GLOBAL
Varname                =>        read_pm_user
Text                =>        Read Private Messages (You can insert any other text to your election.)


Thug 01-18-2005 09:11 AM

what will that do?

WetWired 01-18-2005 11:47 AM

It will put an option to read a user's PMs into the admincp edit member page, for greater convenience.

Thug 01-18-2005 11:57 AM

ok thanx
so i need to do what it says and then i shud be able to read them in admin cp?

MotoUp 01-18-2005 02:17 PM

Yep, then you should be able to read them from admin CP without having to type in the link.

Thug 01-19-2005 12:42 PM

where will i see thme at now?
where can iaccess them at? cannot seem to find them

neocorteqz 01-19-2005 12:45 PM

Quote:

Originally Posted by Thug
where will i see thme at now?
where can iaccess them at? cannot seem to find them

if you added that code above, then it will be in the drop down menu when you view a user from the admn Panel.

Thug 01-19-2005 12:52 PM

does not appear to be there
what will it say

WetWired 01-19-2005 01:03 PM

If you added the phrase like the instructions said, it should say
Read Private Messages
In the drop down at the top of the edit user page.

Thug 01-19-2005 01:05 PM

ok i will check

neocorteqz 01-19-2005 01:05 PM

Quote:

Originally Posted by WetWired
If you added the phrase like the instructions said, it should say
Read Private Messages
In the drop down at the top of the edit user page.

unless he didn't add the global phrase.

Thug 01-19-2005 01:06 PM

what global phrase?

here is what the modifed code looks like

$quicklinks = array_merge(
$quicklinks,
array(
"user.php?$session[sessionurl]do=emailpassword&email=" . urlencode(unhtmlspecialchars($user['email']))
=> $vbphrase['email_password_reminder_to_user'],
"../private.php?$session[sessionurl]do=newpm&userid=$userid"
=> $vbphrase['send_private_message_to_user'],
"usertools.php?$session[sessionurl]do=pmfolderstats&userid=$userid"
=> $vbphrase['private_message_statistics'],
"usertools.php?$session[sessionurl]do=removepms&userid=$userid"
=> $vbphrase['delete_all_users_private_messages'],
"usertools.php?$session[sessionurl]do=removesentpms&userid=$userid"
=> $vbphrase['delete_private_messages_sent_by_user'],
"usertools.php?$session[sessionurl]do=removesubs&userid=$userid"
=> $vbphrase['delete_subscriptions'],
"usertools.php?$session[sessionurl]do=doips&userid=$userid"
=> $vbphrase['view_ip_addresses'],
"../member.php?$session[sessionurl]do=getinfo&userid=$userid"
=> $vbphrase['view_profile'],
"../search.php?$session[sessionurl]do=finduser&userid=$userid"
=> $vbphrase['find_posts_by_user'],
"../$modcpdir/banning.php?$session[sessionurl]do=banuser&userid=$userid"
=> $vbphrase['ban_user'],
"user.php?$session[sessionurl]do=remove&userid=$userid"
=> $vbphrase['delete_user'],
"pm.php?$session[sessionurl]userid=$userid"
=> $vbphrase['read_pm_user'],
)
);

if (intval($user['adminpermissions']) & CANCONTROLPANEL AND in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)))
{
$quicklinks["adminpermissions.php?$session[sessionurl]do=edit&userid=$userid"] = $vbphrase['edit_administrator_permissions'];
}

$userfield = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "userfield WHERE userid = $userid");

neocorteqz 01-19-2005 01:10 PM

Quote:

Originally Posted by Thug
what global phrase?

If you look at the bottom of the instructions above, it says the following
Code:

  Add new phrase
 ##############################################################
 
 Phrase type        =>        CONTROL PANEL GLOBAL
 Varname                =>        read_pm_user
 Text                        =>        Read Private Messages

and you need to add your code above in tag's to prevent unlicensed users from reading it.

Thug 01-19-2005 01:11 PM

Quote:

Originally Posted by Thug
what global phrase?

here is what the modifed code looks like

$quicklinks = array_merge(
$quicklinks,
array(
"user.php?$session[sessionurl]do=emailpassword&email=" . urlencode(unhtmlspecialchars($user['email']))
=> $vbphrase['email_password_reminder_to_user'],
"../private.php?$session[sessionurl]do=newpm&userid=$userid"
=> $vbphrase['send_private_message_to_user'],
"usertools.php?$session[sessionurl]do=pmfolderstats&userid=$userid"
=> $vbphrase['private_message_statistics'],
"usertools.php?$session[sessionurl]do=removepms&userid=$userid"
=> $vbphrase['delete_all_users_private_messages'],
"usertools.php?$session[sessionurl]do=removesentpms&userid=$userid"
=> $vbphrase['delete_private_messages_sent_by_user'],
"usertools.php?$session[sessionurl]do=removesubs&userid=$userid"
=> $vbphrase['delete_subscriptions'],
"usertools.php?$session[sessionurl]do=doips&userid=$userid"
=> $vbphrase['view_ip_addresses'],
"../member.php?$session[sessionurl]do=getinfo&userid=$userid"
=> $vbphrase['view_profile'],
"../search.php?$session[sessionurl]do=finduser&userid=$userid"
=> $vbphrase['find_posts_by_user'],
"../$modcpdir/banning.php?$session[sessionurl]do=banuser&userid=$userid"
=> $vbphrase['ban_user'],
"user.php?$session[sessionurl]do=remove&userid=$userid"
=> $vbphrase['delete_user'],
"pm.php?$session[sessionurl]userid=$userid"
=> $vbphrase['read_pm_user'],
)
);

if (intval($user['adminpermissions']) & CANCONTROLPANEL AND in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s', $superadministrators, -1, PREG_SPLIT_NO_EMPTY)))
{
$quicklinks["adminpermissions.php?$session[sessionurl]do=edit&userid=$userid"] = $vbphrase['edit_administrator_permissions'];
}

$userfield = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "userfield WHERE userid = $userid");

thats the code?

could u send me what the code should look like

neocorteqz 01-19-2005 01:17 PM

Quote:

Originally Posted by Thug
thats the code?

could u send me what the code should look like

so what you want to do now is in the Laguages & Phrases section, click on Phrase manager, then Click add new phrase, then in the drop down box you want to select control panel global, varname will be read_pm_user, and the test will be Read Private Messages or whatever you'd like to call the variable.

Thug 01-19-2005 01:19 PM

ok i wil ltry

neocorteqz 01-19-2005 01:21 PM

Quote:

Originally Posted by Thug
ok i wil ltry

you asked, so the code after you make the file edit in admincp/user.php should look like this.

Code:

    => $vbphrase['delete_user'],
                            "pm.php?$session[sessionurl]userid=$userid"
    => $vbphrase['read_pm_user'],

note that nothing will show up untill you add the Control Panel Global Phrase.

Thug 01-19-2005 01:23 PM

ok let me just forward this to my admin see if he got it

thanx everyone ive now done it
big thanx to you all sorry for being a pest

neocorteqz 01-19-2005 01:34 PM

Quote:

Originally Posted by Thug
ok let me just forward this to my admin see if he got it

thanx everyone ive now done it
big thanx to you all sorry for being a pest

No big deal, thats what this forum is here for.

hope everything works out.

Thug 01-19-2005 01:35 PM

so far so good with it. im stuck on the rules of how to use the mailing list
silly me


All times are GMT. The time now is 05: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.01312 seconds
  • Memory Usage 1,774KB
  • 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
  • (3)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)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