1
Peekay
Private Messaging - another pref request
  • 2013/3/10 15:17

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


For businesses that use Xoops, it's great when you can provide resources for your customers by setting up an account for them. However, I don't really want one customer sending other customers PMs from their user profile.

I can hack away at the templates to remove the PM buttons (I did so many years ago in this post) but having PMs as a pref would be nice.

A pref to hide the 'Register now' text on the login block without hacking the template would also be nice for when new user registration is turned off.

2
Mamba
Re: Private Messaging - another pref request
  • 2013/3/10 22:19

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Good suggestions.
Can you please:

- enter them on SourceForge, and provide a link to this thread
- provide the tracking numbers back here, so the Core Team knows which Request it is related to

Thanks!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
irmtfan
Re: Private Messaging - another pref request
  • 2013/3/11 8:48

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


showing 'Register now' is not a feature IMO.
It is a an small displaying bug.
It should not show the register link when the registration is off.
to solve this you should do this.
1- in XOOPS255/system/blocks/system_blocks.php function b_system_login_show()

add these:
function b_system_login_show()
{
    global 
$xoopsUser$xoopsConfig;
    if (!
$xoopsUser) {
        
$block = array();
        
$block['lang_username'] = _USERNAME;
        
$block['unamevalue'] = "";
        
$block['lang_password'] = _PASSWORD;
        
$block['lang_login'] = _LOGIN;
        
$block['lang_lostpass'] = _MB_SYSTEM_LPASS;
        
$block['lang_registernow'] = _MB_SYSTEM_RNOW;
        
//$block['lang_rememberme'] = _MB_SYSTEM_REMEMBERME;
        
if ($xoopsConfig['use_ssl'] == && $xoopsConfig['sslloginlink'] != '') {
            
$block['sslloginlink'] = "<a href="javascript:openWithSelfMain('".$xoopsConfig['sslloginlink']."''ssllogin'300200);">"._MB_SYSTEM_SECURE."</a>";
        } elseif (
$xoopsConfig['usercookie']) {
            
$block['lang_rememberme'] = _MB_SYSTEM_REMEMBERME;
        }
        
// START to add allow_register config
        
$config_handler =& xoops_gethandler('config');
        
$GLOBALS['xoopsConfigUser'] = $config_handler->getConfigsByCat(XOOPS_CONF_USER);
        
$block['allow_register'] = $GLOBALS['xoopsConfigUser']['allow_register'];
        
// END to add allow_register config
        
return $block;
    }
    return 
false;
}

then in the block template.
XOOPS255/modules/system/templates/blocks/system_block_login.html
add this:
<{if $block.allow_register}>
        <
a href="<{xoAppUrl register.php}>" title="<{$block.lang_registernow}>"><{$block.lang_registernow}></a>
    <{/if}>


4
xoobaru
Re: Private Messaging - another pref request
  • 2013/3/12 0:30

  • xoobaru

  • Just can't stay away

  • Posts: 494

  • Since: 2010/12/2


Quote:

For businesses that use Xoops, it's great when you can provide resources for your customers by setting up an account for them. However, I don't really want one customer sending other customers PMs from their user profile.


Would still be nice if PM had additional selectable group only option (for the current logged in group). That would be ideal for businesses. This is an old discussion. According to irmtfan, group only used to exist in PM, but for some unknown reason it was removed. I swung this bat many times, but it comes down to an issue of limited resources, and priority of what needs to get done. Otherwise I know its feasible to do.

5
Peekay
Re: Private Messaging - another pref request
  • 2013/3/18 11:13

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


That works Irmtfan, but only if you leave the escaped double-quote in the anchor tag, otherwise it's a blank page.

Change:

$block['sslloginlink'] = "<a href="javascript:openWithSelfMain('".$xoopsConfig['sslloginlink']."''ssllogin'300200);">"._MB_SYSTEM_SECURE."</a>";


To:

$block['sslloginlink'] = "<a href="javascript:openWithSelfMain('".$xoopsConfig['sslloginlink']."''ssllogin'300200);">"._MB_SYSTEM_SECURE."</a>";


I have been removing that link manually for years. Many thx for this fix. Just need the same now for user.php. Gonna take a look at it this weekend.

** EDIT **

As a matter of urgency (IMHO) a patch is needed for 2.5.5 so that the 'code' and 'quote' tags will display back-slashes. I have drawn attention to this bug before. The back-slash needed in the above fix is not visible, so the best I can do is tell you it is needed between the ';' and the double-quote at the end of the anchor tag.

6
irmtfan
Re: Private Messaging - another pref request
  • 2013/3/19 2:47

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


@Peekay:
what do you change? i cannot find any difference in your code.
btw i didnt touch $block['sslloginlink'] i just change lines between the START and END

7
Peekay
Re: Private Messaging - another pref request
  • 2013/3/19 9:04

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Quote:

Peekay wrote:

As a matter of urgency (IMHO) a patch is needed for 2.5.5 so that the 'code' and 'quote' tags will display back-slashes....


That's the problem. I added a back-slash and Xoops CODE tag deleted it.

Quote:
The back-slash needed in the above fix is not visible, so the best I can do is tell you it is needed between the ';' and the double-quote at the end of the anchor tag.

8
irmtfan
Re: Private Messaging - another pref request
  • 2013/3/21 5:34

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Aha
Now i understand
Im sorry i didnt read your entire post i just read first rows.
Actually xoops 2.5.5 (and 2.5.6) has 5 or 6 functional bugs reported and solved but not added to main branch yet.
I think this bug in xoops sanitizer has been mentioned in other topics.
Actually it seems core team dont want to implement these solutions in 2.5.5 but they should be solved in 2.6.
so please test in 2.6 and report
Imo functional bugs are very important, more than some warnings & depricates & notices

9
Mamba
Re: Private Messaging - another pref request
  • 2013/3/21 7:39

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Quote:
Actually xoops 2.5.5 (and 2.5.6) has 5 or 6 functional bugs reported and solved but not added to main branch yet.

Are they all listed in Bugs on SourceForge, incl. their solutions?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Login

Who's Online

114 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 114


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits