41
Antoine
Re: Problem with mailing users
  • 2005/8/25 9:10

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


You potentially have a lot of users and the datastructure that the XoopsMailer tries to set-up exeeds the limit set in the PHP config file and/or the mail you are trying to send is very large.
If this involves a site hosted by yourself you should try to change the memory_limit variable to say 16M and see if that works.
Otherwise you will have to ask your hosting provider to allow your scripts to allocate more memory.

Hope that helps.

EDIT: Why this out of memory issue occurs in your /modules/system/xoops_version.php file is a bit of a mystery though. Could be a weird coincidence but maybe you could post the contents of that file just to be sure?



42
Antoine
Re: visibility of blocks inquiry
  • 2005/8/25 9:04

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


I think that a workaround would be to disable certain blocks from your module code if you do not want them displayed even when they belong to your module. After the page has been rendered you could enable the block again so that it is displayed normally again within modules.
This would involve looking up the block's bid in the xoops_newblocks table.
I whipped up this bit of code. Haven't tested it at all so I hope that it works:
<?php
/**
 * Functions to temporarily hide or show certain blocks so they can be 
 * made to be visible in some pages of a module instead of all
 *
 * Invoke disableBlock before including header.php in a module
 * Invoke enableBlock after including footerphp in a module
 * @author  Dirk Louwers <dirk,louwers@symtech.nl>
 * @copyright (c) 2005 Dirk Louwers
 * @example 
 * (...)
 * disableBlock(12, true);
 * include('../../header.php');
 * (...)
 * include('../../footer.php');
 * enableBlock(12, true);
 * (...)
 */

/**
 * Disables a block by making it invisible
 * @param int $blockid
 * @param bool $force set to true if you have any GET variables
 * in the page request
 * @return false on error, else true
 */
// public
function disableBlock($blockid$force=false)
{
    global 
$xoopsDB;
    
    if(
intval($blockid 0))
    {
        
$sql 'Update '.$xoopsDB->prefix('newblocks').' Set visible=0'
            
.' Where bid='.intval($blockid);
        if(
$force) {
            
$result $xoopsDB->queryF($sql);
        }
        else {
            
$result $xoopsDB->query($sql);
        }
        if(!
$result) return false;
        return 
true;
    }
    return 
false;
}

/**
 * Enables a block by making it visible
 * @param int $blockid
 * @param bool $force set to true if you have any GET variables
 * in the page request
 * @return false on error, else true
 */
// public
function enableBlock($blockid$force=false)
{
    global 
$xoopsDB;
    
    if(
intval($blockid 0))
    {
        
$sql 'Update '.$xoopsDB->prefix('newblocks').' Set visible=1'
            
.' Where bid='.intval($blockid);
        if(
$force) {
            
$result $xoopsDB->queryF($sql);
        }
        else {
            
$result $xoopsDB->query($sql);
        }
        if(!
$result) return false;
        return 
true;
    }
    return 
false;
}
?>
.



43
Antoine
Re: Module Administration not working
  • 2005/8/25 8:26

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Could you go to your Admin Panel->Settings->General Settings and change Debug Mode to PHP Debug, then see if any errors appear and if they do post them here?



44
Antoine
Re: Changing registered user to Admin from database??
  • 2005/8/25 8:20

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Basically you need to make this user a member of the Admin group. For these examples I will assume you use XOOPS as your db prefix.

1) First look up the uid of the user in the xoops_user table.
2) Then run the following query:
Insert Into xoops_groups_users_link
(groupiduidValues (1, [your uid])

Where [your uid] is the uid you looked up.



45
Antoine
Re: XoopsMailer->sendMail usage
  • 2005/8/23 10:32

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Thanks a bunch!
So what is the sendMail($email, $subject, $body, $headers) function for? And what is meant with the $headers parameter in it?



46
Antoine
Re: XoopsMailer->sendMail usage
  • 2005/8/23 8:09

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


bump

Pretty, pretty please?



47
Antoine
Re: Custom block with content and menus
  • 2005/8/23 8:06

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


From a technical point of view: No you cannot display a module's output in the XOOPS center block area. Only blocks can be displayed. However it should be possible to display your module's output in the area where you are now used to see your center block data displayed. Just fiddle aroudn with your theme a bit. Don't forget to make a back-up.



48
Antoine
Re: Cant use uppercase file extensions in CBB file uploads?
  • 2005/8/22 14:54

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Indeed it used to be a problem where the extention of a file was case sensitively compared to a lost of (lowercase) extensions=>mime-types.
Maybe the module you are referring to has based some of it's code on the uploader.php file.



49
Antoine
Re: Custom block with content and menus
  • 2005/8/22 14:42

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Blocks are not accessed by any menus. They just display or not based on the rights of the viewer and sometimes (depending on theme) wether that category of blocks is rendered to begin with.
Modules however, that allways display in the center, can be accessed by useof menu items. Maybe that is what you are looking for?



50
Antoine
XoopsMailer->sendMail usage
  • 2005/8/17 10:13

  • Antoine

  • Friend of XOOPS

  • Posts: 112

  • Since: 2004/11/14


Hi,

I'm trying to use XoopsMailer for the first time.
I am using something like:
$myMailer = new XoopsMailer();
$result $myMailer->sendMail($xoopsConfig['adminmail'], 'Site-error'$body, array());

I am using the default PHPMail() to try and send the e-mail. My php.ini settings are correct.
The error I am getting is:
Could not instantiate mail()

Please, can anyone help me out?

EDIT: I am running XOOPS 2.0.13.1




TopTop
« 1 2 3 4 (5) 6 7 8 ... 11 »



Login

Who's Online

156 user(s) are online (98 user(s) are browsing Support Forums)


Members: 0


Guests: 156


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