[SOLVED] Mass PM link creation

Makes it posble for admin to specify witch type of users may mass PM any usergroup
Also PM users can be a list of usernames, so PM can be sendt to any number of users

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

[SOLVED] Mass PM link creation

Postby cayotic on Tue 04. Mar, 2003 04:52

This mod has a lot of potential for a busy board. It's a pain to pm on person at a time. Now you can PM a group.... I like it lot, however, the install doesn't create a link to access the groupmsg.php file. And sure with my basic scripting ability I could create a link but it would be viewable to ppl that shouldn't see it.

Niels asked me post this here because we were playing email tag all day, and this may help out others with the same question. (I'm assuming I'm the first with this question without searching first since it was suggested I post this topic)

So how do you create a link to the groupmag.php only viewable by admin/mods.

From playing email tag today I learned that this goes on the php page...

Code: Select all
'U_GROUPMSG' >= ($userdata['user_level'] > ADMIN) $u_groupmsg : '',


Now what guys?
Last edited by cayotic on Wed 05. Mar, 2003 22:45, edited 1 time in total.
cayotic
Poster
Poster
 
Posts: 11
Joined: Wed 15. Jan, 2003 03:55

Postby sanderson_250 on Tue 04. Mar, 2003 10:53

Then you'd have to put {U_GROUPMSG} into whichever template you want it displayed on. I'm guessing groupcp_user_body.tpl would be best, but I'm just installing this hack now so I'm not positive. ;)

I'm pretty sure the code you posted should be more like this:
'U_GROUPMSG' => ($userdata['user_level'] > ADMIN) $u_groupmsg : '',
sanderson_250
Poster
Poster
 
Posts: 34
Joined: Sat 23. Nov, 2002 10:22

Postby cayotic on Tue 04. Mar, 2003 20:07

the code I posted was straight from the email from Niels......

So... for the link I use {U_GROUPMSG}, but where do I place the code in the groupmsg.php file?

Find What:

Add after/before What:
cayotic
Poster
Poster
 
Posts: 11
Joined: Wed 15. Jan, 2003 03:55

Postby Niels on Wed 05. Mar, 2003 18:03

I'll try explain how I did implement this (except mine support user permissions control - since I'm runing with the extra permission mod)

in privmsg.php
Code: Select all
[FIND]
$savebox_url = ( $folder != 'savebox' || $mode != '' ) ? '<a href="' . append_sid("privmsg.$phpEx?folder=savebox") . '">' . $lang['Savebox'] . '</a>' : $lang['Savebox'];

[AFTER ADD]
$mass_pm_img =  ( $userdata['user_level']>=ADMIN ) ? '<a href="' . append_sid("groupmsg.$phpEx") . '"><img src="' . $images['mass_pm'] . '" border="0" alt="' . $lang['Mass_pm'] . '" /></a>' :'';
$mass_pm_url =  ( $userdata['user_level']>=ADMIN ) ?'<a href="' . append_sid("groupmsg.$phpEx") . '">' . $lang['Mass_pm'] . '</a>' :'';

[FIND 3 PLACES]
'INBOX' => $inbox_url,

[AFTER ADD]
'MASS_PM_IMG' => $mass_pm_img,
'MASS_PM' => $mass_pm_url,


change the path in this, if you prefere another image.....
in file subsilver.cfg
Code: Select all
[FIND]
?>

[BEFORE ADD]
$images['mass_pm'] = "$current_template_images/msg_outbox.gif";


in file privmsg_body.tpl
Code: Select all
[FIND]
<td><span class="cattitle">{SAVEBOX}</span>&nbsp;</td>

[AFTER ADD]
<td>{MASS_PM_IMG}</td>
<td><span class="cattitle">{MASS_PM}</span>&nbsp;</td>


I haven't tested this, but I would expect it to work
Last edited by Niels on Wed 05. Mar, 2003 21:54, edited 1 time in total.
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby cayotic on Wed 05. Mar, 2003 20:19

near complete...

the first page to edit isn't groupmsg.php though it's privmsg.php for those of you following along at home.

I couldn't find the info you said to there so I looked else wheres. Just happened to be the next placed I checked.

I am having a problem with the link {MASS_PM} on the privmsg_body.tpl though. It isn't displaying text. When I simply write 'MASS PM' instead it messes up all the words on that title bar.

I did add the following code as you told me too, and I do have an image in place.
Code: Select all
'MASS_PM_IMG' => $mass_pm_img,
'MASS_PM' => $mass_pm_url,
cayotic
Poster
Poster
 
Posts: 11
Joined: Wed 15. Jan, 2003 03:55

Postby Niels on Wed 05. Mar, 2003 22:02

I hqave tryed registed at your site, but apperently I did not recive the account activation key (at least not imidiatly)
and I asume I lack privileges to see how it behavies
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby cayotic on Wed 05. Mar, 2003 22:10

it shows you are online... so you had to've activated it by now....

Get my PM...

What are you wanting to do... The groupmsg is working properly... but if you just want to read what we BS about, so be it....

Enjoy
cayotic
Poster
Poster
 
Posts: 11
Joined: Wed 15. Jan, 2003 03:55

Postby Niels on Wed 05. Mar, 2003 22:13

I did understod by your above post, that the link did not show prober ? did I missunderstod ?

verify that this is pressent in your language file

Code: Select all
// Add to custom mass PM
$lang['Mass_pm'] = 'Group PM';
$lang['Enable_mass_pm'] = 'Enable mass PM ';
$lang['Enable_mass_pm_explain'] = 'By enabling this, you will receive PMs sent by the admin/moderators to the usergroups you belong to';
$lang['Allow_mass_pm_notify'] = 'Yes, notify by e-mail';


it could be that you are missing the first, since it is not in the how-to

you may delete my account on your site, since I do not need it :D
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Next

Return to Custom mass PM [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron