1381
trabis
Re: Custom Blocks in Xoops 2.3.0 RC2
  • 2008/9/8 19:33

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


OK, so go to line 69

$module_list $module_handler->getList($criteria);


Replace by this
$module_list $module_handler->getList($criteria);
$module_list[0] = _AM_CUSTOM;


Notice that _AM_CUSTOM will need to be defined in system/language/admin/groups.php

But this is just a temporary fix, phppp will have to look into this.



1382
trabis
Re: Custom Blocks in Xoops 2.3.0 RC2
  • 2008/9/8 19:06

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


You are right, this is a(nother) bug and you will have to wait for a fix. Custom blocks are not displaying in groups administration.



1383
trabis
Re: Custom Blocks in Xoops 2.3.0 RC2
  • 2008/9/8 18:45

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


If you applied the fix then it should appear more check boxes for setting 'block access rights' in administration->groups.

Go there, click on "Modify" (after the group) and tell me what you see.



1384
trabis
Re: Module developmant - Documentation or Info
  • 2008/9/8 18:33

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

hervet wrote:
Quote:

trabis wrote:
You can use the 'online' handler to ger all logged users

I believe that it will "run" only if the block is visible.


I guess you we need to have the "who´s online block"(or similar) visible so it keeps database updated.

This would update the table
/*global $xoopsUser, $xoopsModule, $_SERVER;*/

    
$online_handler =& xoops_gethandler('online');

    
mt_srand((double)microtime()*1000000);
    
// set gc probabillity to 10% for now..
    
if (mt_rand(1100) < 70) {
        
$online_handler->gc(300);
    }
    if (
is_object($xoopsUser)) {
        
$uid $xoopsUser->getVar('uid');
        
$uname $xoopsUser->getVar('uname');
    } else {
        
$uid 0;
        
$uname '';
    }
    if (
is_object($xoopsModule)) {
        
$online_handler->write($uid$unametime(), $xoopsModule->getVar('mid'), $_SERVER['REMOTE_ADDR']);
    } else {
        
$online_handler->write($uid$unametime(), 0$_SERVER['REMOTE_ADDR']);
    }



1385
trabis
Re: Module developmant - Documentation or Info
  • 2008/9/8 18:25

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


You have to thank Irmtfan for that.

It is kind of lost in the wiki confusion is not it?
This is so useful that it deserves a direct link in front page.



1386
trabis
Re: My points 1.0 - Feature Requests
  • 2008/9/8 18:19

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


The beta version is working for submissions (but not for votes).

I have been working in other 'more interesting' things so I´m not very motivated to get back to this right now.



1387
trabis
Re: Custom Blocks in Xoops 2.3.0 RC2
  • 2008/9/8 18:12

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


There is a(nother) bug in XOOPS 2.3Rc2

This time in groups administration.
You have to edit line 75 in system/admin/groups/groupform.php

Search:
$blocks_module[$blocks_obj[$bid]->getVar('mid')][$blocks_obj[$bid]->getVar('bid')] = empty($title) ? $block->getVar("name") : $title;


Replace By:
$blocks_module[$blocks_obj[$bid]->getVar('mid')][$blocks_obj[$bid]->getVar('bid')] = empty($title) ? $blocks_obj[$bid]->getVar("name") : $title;



1388
trabis
Re: Module developmant - Documentation or Info
  • 2008/9/8 12:12

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


A great resource:
https://xoops.org/modules/mediawiki/index.php/Categoryevelopment



1389
trabis
Re: A problem in XOOPS 2.0.17
  • 2008/9/8 11:45

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


My version of smartpartner(1.2) does not have that addPermission call.
What version are you using?

BTW: mytabs 2.x does not need smartobject



1390
trabis
Re: Module/block which displays how many users were online today
  • 2008/9/8 11:32

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


You can also use XOOPS api:

$member_handler =& xoops_gethandler('member');
$days 1;
$time time() - (60 60 24 $days);
$criteria = new Criteria('last_login'$time'>');
$total $member_handler->getUserCount($criteria);
if ( 
$total >= 
{
  echo 
"Already ".$total." visitors today.";
}
else
{
  echo 
"No users today";
}




TopTop
« 1 ... 136 137 138 (139) 140 141 142 ... 190 »



Login

Who's Online

233 user(s) are online (148 user(s) are browsing Support Forums)


Members: 0


Guests: 233


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