21
andersa
Re: Making ordered lists with html in news module
  • 2004/9/5 20:52

  • andersa

  • Just popping in

  • Posts: 45

  • Since: 2004/5/27


Ok I seem to have this figured out. It was that combination of the NN and MAC stylesheets that was throwing me off.

How can you know which on is being used?




22
andersa
Making ordered lists with html in news module
  • 2004/9/4 17:15

  • andersa

  • Just popping in

  • Posts: 45

  • Since: 2004/5/27


I am using XOOPS 2.0.7.1 with a slightly modified version of the phpkaox theme.

When I post a news article and try to make an ordered list with the
    tags, I get a bulleted list with discs instead of ordered numbers.

    Any hints on css or theme change I can make to get ordered lists?

    Anders



    23
    andersa
    Re: Switching a user between two groups
    • 2004/7/15 19:35

    • andersa

    • Just popping in

    • Posts: 45

    • Since: 2004/5/27


    Ah! It took a bit of work to convert the module to using forms, so I could do post the form. I was just using get.

    I've got my module up and running now! Thanks!



    24
    andersa
    Switching a user between two groups
    • 2004/7/15 12:07

    • andersa

    • Just popping in

    • Posts: 45

    • Since: 2004/5/27


    I have two groups which I know has IDs 4 and 5. I am trying to switch a user between the two groups with this code:

    Quote:

    $member_handler =& xoops_gethandler('member');

    $result = $member_handler->removeUsersFromGroup(4,array($xoopsUser->getVar('uid')));
    $member_handler->addUserToGroup(5,$xoopsUser->getVar('uid'));


    I know for sure the first call fails ($result is False), and the user doesn't get added to the second group either, so I guess that fails too. But can anyone see why?



    25
    andersa
    Re: Getting a blank page when developing new module
    • 2004/7/13 13:43

    • andersa

    • Just popping in

    • Posts: 45

    • Since: 2004/5/27


    Great tips! Thanks. It was the getUsercountbyGroup() call that should have been associated with the member_handler object.



    26
    andersa
    Getting a blank page when developing new module
    • 2004/7/13 13:19

    • andersa

    • Just popping in

    • Posts: 45

    • Since: 2004/5/27


    I use this code in the index.php file of my module.

    Quote:
    require('header.php');

    // Find out it current user is a member of the group active users or if it's a guest user
    if($xoopsUser->isGuest())
    {
    $isguest = True;
    }
    else
    {
    $isguest = False;
    $ugroups = $xoopsUser->getGroups();
    if(in_array(4,$ugroups)) $uactive = True;
    else $uactive = False;
    }

    // Get list to fill out table
    $member_handler =& xoops_gethandler('member');
    $activeusers = $member_handler->getUsersByGroup(4,true,getUserCountByGroup(4),0);
    $inactiveusers = $member_handler->getUsersByGroup(5,true,getUserCountByGroup(5),0);

    // Generate table

    $colmember = 'Medlem';
    $colrank = 'Post';
    $colemail = 'Email';
    $outtable = '';

    foreach($activeusers as $user)
    {
    $outtable .= '';
    $outtable .= ''.$user->name().'';
    $outtable .= ''.$user->rank().'';
    if($isguest)
    {
    $outtable .= ''.$user->email().'';
    }
    else
    {
    $outtable .= ''.$user->email().'';
    }
    $outtable .= '';
    }

    foreach($inactiveusers as $user)
    {
    $outtable .= '';
    $outtable .= ''.$user->name().'';
    $outtable .= ''.$user->rank().'';
    if($isguest)
    {
    $outtable .= ''.$user->email().'';
    }
    else
    {
    $outtable .= ''.$user->email().'';
    };
    $outtable .= '';
    }

    // We must always set our main template before including the header
    $xoopsOption['template_main'] = 'memberlist_list.html';

    // Include the page header
    require(XOOPS_ROOT_PATH.'/header.php');

    $xoopsTpl->assign('member', $colmember);
    $xoopsTpl->assign('rank', $colrank);
    $xoopsTpl->assign('email', $colemail);
    $xoopsTpl->assign('memberlist', $outtable);

    // Include the page footer
    require(XOOPS_ROOT_PATH.'/footer.php');
    ?>


    And this is the template:

    Quote:


    <{$member}>
    <{$rank}>
    <{$email}>

    <{$memberlist}>


    All I get is a completely empty page, not even any html header tags or anything. Can anyone spot any obvious mistakes?



    27
    andersa
    What variable names are available in getVar()?
    • 2004/7/12 7:27

    • andersa

    • Just popping in

    • Posts: 45

    • Since: 2004/5/27


    I was trying to get the group names for the group a particular user was a member of and I was given this chunk of code: :)
    Quote:
    $member_handler =& xoops_gethandler('member');
    $groups = $member_handler->getGroupsByUser($xoopsUser->getVar('uid'),true);
    echo 'You are in the following groups:
    ';
    foreach ($groups as $group) {
    echo $group->getVar('name') . '
    ';
    }


    So my question is, how do I know which variable are available in the getVar() call?



    28
    andersa
    Re: User/Group info
    • 2004/7/12 6:58

    • andersa

    • Just popping in

    • Posts: 45

    • Since: 2004/5/27


    Thanks.. I'll try it out..



    29
    andersa
    User/Group info
    • 2004/7/11 19:22

    • andersa

    • Just popping in

    • Posts: 45

    • Since: 2004/5/27


    Trying to desciphre XOOPS horrible docs.. :)

    I need to get the names of the groups a user is a member of.

    I have found the call $xoopsUser->getGroups(), but all I get are some numbers, seemingly corresponding to group ids. However what I really need are the group names.

    Also when I move a user from one group to another, the numbers don't change. Are these numbers cached?



    30
    andersa
    Re: How do I change the block titles?
    • 2004/6/6 10:38

    • andersa

    • Just popping in

    • Posts: 45

    • Since: 2004/5/27


    I found it. You can edit the block titles from the block editor.

    Some things are in the language files, but not everything apparently..




    TopTop
    « 1 2 (3) 4 »



    Login

    Who's Online

    193 user(s) are online (130 user(s) are browsing Support Forums)


    Members: 0


    Guests: 193


    more...

    Donat-O-Meter

    Stats
    Goal: AU$15.00
    Due Date: Jul 31
    Gross Amount: AU$0.00
    Net Balance: AU$0.00
    Left to go: AU$15.00
    Make donations with PayPal!

    Latest GitHub Commits