1
simonvl
Re: News 1.2.1
  • 2005/1/17 16:22

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


Does anyone know where you can download a version of news 1.2.1 with all the permissions correct. it takes ages to go through and change all the permissions of all the files!!!
thanks in advance- have searched around with no luck!



2
simonvl
Re: Combining WF-Section and WF-Channel
  • 2004/8/16 7:25

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


In the admin section, go to system-->blocks

Find WF-Section Top or WF-Section Recent depending whether you want the most read or latest articles.

Click Edit.

Choose where it goes and on which parts of the website it displays. Select "Visible in" WF-Channel, and you will get a mixed list across topics for the latest articles.

I don't know if there is an easy way to do this for each channel separately, you might have to php code it yourself. I can't help you with this bit.

Hope that helps
Simon



3
simonvl
Re: Xoopsmembers search by group and rank (HACK)
  • 2004/4/19 13:54

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


It sounds like a slight error in the code. Check it through. If that fails, turn on PHP debug in admin/general and post the details of your debug info. Someone here may be able to help.
Simon



4
simonvl
Re: need a hack for XFSection
  • 2004/4/18 4:33

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


I see you've been up all night too!

Well, good luck with the admin option hack...
You will need to mess around with tables and change several files. I did it for a very simple tickbox field for iMenu (see post).

I found that it was very simple once I found a similar field (in my case another tick box in the admin)- I just changed the name and made sure the new one was in all the places the original one was. I'd recommend backing up and trying something similar if you've never messed with a module before.

Have fun!
Simon



5
simonvl
Re: Xoopsmembers search by group and rank (HACK)
  • 2004/4/18 2:28

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


As I promised, here is a further extension of the hack.

I would like to be able view the members without having to go through the search form (by putting [$op = "submit";] at the top of the form). Additionally, I would like to be able to have all groups shown if the visitor is logged on ($xoopsUser), but only certain groups if it is an anonymous visitor.
I used this code around line 215 (of the hacked version available from my website):
//hack 3
    
if ( !empty($HTTP_POST_VARS['groupid']) && $xoopsUser ) {
        
$groupid = ($HTTP_POST_VARS["groupid"]);
    }
    elseif ( 
$xoopsUser ) {
        
$groupid = array(1,2,4,7);
    }
    else {
        
$groupid = array(1,7);
    } 
    
// end hack 3



6
simonvl
Re: need a hack for XFSection
  • 2004/4/18 1:59

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


Having a quick look at submit.php, I'll hazard a guess. I'm not a php programmer so it is only a guess...

Remove
$xt->makeSelBox(0);
$sform->addElement(new XoopsFormLabel(_WFS_CATEGORYob_get_contents()));
ob_end_clean();
$sform->addElement($topic_select);
$sform->addElement(new XoopsFormSelectGroup(_WFS_GROUPPROMPT'groupid'truetrue5true), false);


And replace it with something like
$sform->addElement(new XoopsFormHidden('topic_select',2));
$sform->addElement(new XoopsFormHidden('groupid',array(1,2,3)));


The idea being that these are posted as hidden fields- topic as "2" and group ids as an array of all those you want to have access to the article.
But I am pretty sure there is something wrong with what I put above. Hopefully it gives you a starting point though.

Simon



7
simonvl
Re: Xoopsmembers search by group and rank (HACK)
  • 2004/4/18 0:18

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


That's absolutely fantastic!! It worked first time!
Thanks so much, its very kind of you to help me.

For anyone interested, I have implemented this "search for users by group" hack- you can view the result at http://www.chillout.org.uk/modules/xoopsmembers/exampleindex.php
(for a limited time only) and you can see the code used in my wfsnippets section.
Enjoy.
(more hacks to this module will hopefully follow in this thread)
Simon



8
simonvl
Re: Adding rank to xoopsuser module
  • 2004/4/16 0:25

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


That's beautiful, thank you!
I have posted a post on the hack forum if you are interested.
THank you for your help, once again! I'm slowly getting the hang of the XOOPS world... and php into the bargain!
Simon



9
simonvl
Xoopsmembers search by group and rank (HACK)
  • 2004/4/16 0:17

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


I am developing a hack to allow xoopsmembers to be searched by group and rank.

I am posting this unfinished hack here in case other people better at php want to help me to develop this.

Current problems to solve:
---------------------------
1) the array within the array: user groups within the userdata array- how can I access these for both matching in the search, and for displaying in the smarty template?
2) XoopsFormSelectGroup- how to use?
(see below for where I want to use these)

So far I have got the searchresults section of index.php to be able to access this information, as follows:
section to get groups
(added just after
$start = (!empty($HTTP_POST_VARS['start'])) ? intval($HTTP_POST_VARS['start']) : 0;
$member_handler =& xoops_gethandler('member');
$total = $member_handler->getUserCount($criteria);
//----------------------hack show groups by samuels- edited by simonvl------------------------
        
function GetGroupsNames ($uid)
        {
            
$member_handler =& xoops_gethandler('member');
            
$User= new XoopsUser($uid);
            
$user_groups=$User->getGroups();
            
$count count($user_groups);
    
//$groups =& $member_handler->getGroups();
            
for ($i=0;$i<$count;$i++)
            {
                
$thisgroup =& $member_handler->getGroup($user_groups[$i]);
                
$g[$i]=$thisgroup->getVar('name');
            }
            return (
$g);

        }

This gets the groups each user found by the search is subscribed to and pust them in the array $g, where $g['0'] is the first group the user was assigned, etc.

The next bit puts this info into the $userdata array which xoopsmembers uses to store info and put it into a smarty variable as an array.
Added after
$userdata['id'] = $foundusers[$j]->getVar("uid");
$userdata['groups'] = GetGroupsNames($userdata['id']);
            
$usergroupinfo $userdata['groups'];
            echo 
$usergroupinfo['0']; //just for testing
// this bit thanks to Mithrandir:
            
$rank $foundusers[$j]->rank();
            
$userdata['rank'] = $rank['title'];
            
$rankinfo $userdata['rank'];
            echo 
$rankinfo//just for testing

At the moment, this successfully echos the rank information of each user, but of course returns "array" for the group.

using this for the search form
I can add a standard text matching search field for user ranks, or a selection box, or a hidden field that only lets visitors see certain ranked users- this I might use for a custom implementation of ranks on my site as a classification system.

Now, I want to select groups and put their name into the search form, to find members in that group. Should I use
XoopsFormSelectGroup($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false) (and if so, how!)
or should I use a normal xoopsformselect element and name the groups (making the implementation less flexible)?

Also, how do you get it to try to match the entry to all of the values in the array $g?

Ultimately, I would like members to be able to search all members, but anonymous visitors to be only allowed to search (and view) special members, moderators and admins- these are the society committee members at chillout.org.uk

Anyone want to help out here?
Thanks in advance
Simon



10
simonvl
Adding rank to xoopsuser module
  • 2004/4/12 16:50

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


I am trying to get the rank of a user into the variables available in the xoopsusers $userdata[] array.
So far I have::
// After these lines
    
$start = (!empty($HTTP_POST_VARS['start'])) ? intval($HTTP_POST_VARS['start']) : 0;
    
$member_handler =& xoops_gethandler('member');
    
$total $member_handler->getUserCount($criteria);


// I have added

        
function GetRankTitle ($uid)
        {
            
$member_handler =& xoops_gethandler('member');
            
$User= new XoopsUser($uid);
            
$user_rank $User->getRank();
            return (
$user_rank['title']);
        }

and then
// After this line
            
$userdata['name'] = $foundusers[$j]->getVar("uname");
// I have added
            
$userdata['rank'] = GetRankTitle($userdata['id']);


I was using the example in a post on adding User Rank

This does not work- I get Fatal error: Call to undefined function: getrank() in /home/chillout/public_html/modules/xoopsmembers/index.php on line 341. Perhaps the method is no longer compatible with XOOPS 2.06? Please can someone enlighten me?
Thank you very much in advance.
Simon




TopTop
(1) 2 3 4 »



Login

Who's Online

234 user(s) are online (150 user(s) are browsing Support Forums)


Members: 0


Guests: 234


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