Page 1 of 1

Forcing pm popups on all users

Posted: 18 Nov 2011, 02:50
by Solidjeuh
Users are not noticing they have pm messages because they have disabled the pm popup notification.

Solution:

Open: includes/functions.php

Find:

Code: Select all

    // The following assigns all _common_ variables that may be used at any point in a template.
        $template->assign_vars(array( 
Before Add:

Code: Select all

    $user->optionset('popuppm', true); 
This is to force the pm pop up on every one regardless of their UCP setting.

Found this on google.. And wanted to share with you all :thumb:

Forcing pm popups on all users

Posted: 18 Nov 2011, 03:59
by Theriddler
:thumb: thnx nice one, maybe better than the one i use now

i previously used this in overal_header.html

FIND:

Code: Select all

<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
INLINE FIND:

Code: Select all

IF S_DISPLAY_PM
REPLACE WITH:

Code: Select all

IF S_NEW_PM
or this:

Code: Select all

IF S_USER_NEW_PRIVMSG
i'm not sure anymore because i'm using the pm bar reg mod

Forcing pm popups on all users

Posted: 18 Nov 2011, 04:22
by martin123456
Nice find but there is also one on this site somewhere and all you need to do is change a number lol

Forcing is no good you can force what ever you like but IF the browser is told NO pop ups then they wont get the pop up ;)

use a bar or the red blinking pm mod

Forcing pm popups on all users

Posted: 18 Nov 2011, 06:04
by Blackwolf
removed

Forcing pm popups on all users

Posted: 18 Nov 2011, 06:18
by Solidjeuh
What does this do exactly Blackwolf?
Change the popup notify in control panel to yes?

Forcing pm popups on all users

Posted: 18 Nov 2011, 10:56
by doktornotor
Edited for thread cleanup.

None of the above solves the problem for any new users who register after you do this... So, there is something missing there. Like:

Open: functions_user.php
Find:

Code: Select all

		'user_options'		=> 230271,
Replace with:

Code: Select all

		// Activate PM popup by default for new users
		'user_options'		=> 231295,
For clarity - I am talking about this mod (i.e., PM Notify & Guest Register bar), not about any pop-up windows which are basically useless with any normal browser as they get blocked.

Forcing pm popups on all users

Posted: 18 Nov 2011, 11:07
by Stoker
I would just take this piece out of the overall_header.html: and S_USER_PM_POPUP

Forcing pm popups on all users

Posted: 18 Nov 2011, 11:21
by Blackwolf
Please remove my quoted text from doktornotor post......I was in a rush trying to help from work. Dont want to get on the wrong side of people.

Forcing pm popups on all users

Posted: 18 Nov 2011, 11:33
by doktornotor
Stoker wrote:I would just take this piece out of the overall_header.html: and S_USER_PM_POPUP
Well, yeah... if you really want to force it no matter what. I just wanted it enabled by default so if people want to disable, they are free to do so. From a quick look at the DB, about 1% of users have disabled this so that not might be a big deal if you really force it enabled. I will possibly look at the UCP edits to remove the options from UCP so that people do not have settings there that take no effect.

Edit: Done.

Open: styles/prosilver/template/ucp_prefs_personal.html

Find:

Code: Select all

	<!-- ENDIF -->
	<dl>
		<dt><label for="notifypm1">{L_NOTIFY_ON_PM}:</label></dt>
		<dd>
			<label for="notifypm1"><input type="radio" name="notifypm" id="notifypm1" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> 
			<label for="notifypm0"><input type="radio" name="notifypm" id="notifypm0" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
		</dd>
	</dl>
	<dl>
		<dt><label for="popuppm0">{L_POPUP_ON_PM}:</label></dt>
		<dd>
			<label for="popuppm1"><input type="radio" name="popuppm" id="popuppm1" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> 
			<label for="popuppm0"><input type="radio" name="popuppm" id="popuppm0" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
		</dd>
	</dl>
	<dl>
		<dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
		<dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd>
	</dl>
	<!-- IF S_STYLE_OPTIONS -->
Replace with:

Code: Select all

	<!-- ENDIF -->
	<dl>
		<dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt>
		<dd><select name="lang" id="lang">{S_LANG_OPTIONS}</select></dd>
	</dl>
	<!-- IF S_STYLE_OPTIONS -->
Open: styles/subsilver2/template/ucp_prefs_personal.html

Find:

Code: Select all

<!-- ENDIF -->
<tr> 
	<td class="row1" width="50%"><b class="genmed">{L_NOTIFY_ON_PM}:</b></td>
	<td class="row2"><input type="radio" class="radio" name="notifypm" value="1"<!-- IF S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="notifypm" value="0"<!-- IF not S_NOTIFY_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
<tr> 
	<td class="row1" width="50%"><b class="genmed">{L_POPUP_ON_PM}:</b></td>
	<td class="row2"><input type="radio" class="radio" name="popuppm" value="1"<!-- IF S_POPUP_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_YES}</span>&nbsp;&nbsp;<input type="radio" class="radio" name="popuppm" value="0"<!-- IF not S_POPUP_PM --> checked="checked"<!-- ENDIF --> /><span class="genmed">{L_NO}</span></td>
</tr>
<tr>
	<td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td>
	<td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
</tr>
<!-- IF S_STYLE_OPTIONS -->
Replace with:

Code: Select all

<!-- ENDIF -->
<tr>
	<td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td>
	<td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td>
</tr>
<!-- IF S_STYLE_OPTIONS -->

Forcing pm popups on all users

Posted: 18 Nov 2011, 13:05
by martin123456
doktornotor wrote:Edited for thread cleanup.

None of the above solves the problem for any new users who register after you do this... So, there is something missing there. Like:

Open: functions_user.php
Find:

Code: Select all

		'user_options'		=> 230271,
Replace with:

Code: Select all

		// Activate PM popup by default for new users
		'user_options'		=> 231295,
For clarity - I am talking about this mod (i.e., PM Notify & Guest Register bar), not about any pop-up windows which are basically useless with any normal browser as they get blocked.
Dont for get to run the database query for older members ;) as this only works for member's who join AFTER you do this edit ;) and this is the one i posted about i use it ;)