181
coopersita
Re:Welcome *name* block

What if you don't want to use something other than the user name, let's say location (user_from)? And you didn't want to use a block?

How would you show the location in the theme?



182
coopersita
Re: registred users index page different.

Hi,

Why not instead of having a whole different page, make a block with the message, and have it only visible for non-registered users? (admin->groups>Annonimous)

Hope this helps



183
coopersita
Re: Is anyone interested ine a Genealogy Module for Xoops2?

I would be interested as well.



184
coopersita
Modifying new user notifications

I want to add an option to my XOOPS so that if people choose to, they would be notified when someone else from the same location registeres.

I thought the place to do this would be register.php, so towards the end I now have:

if ($xoopsConfigUser['new_user_notify'] == && !empty($xoopsConfigUser['new_user_notify_group'])) {
            
$myts =& MyTextSanitizer::getInstance();
//my code starts here
            
$criteria = new CriteriaCompo();

            
$criteria->add(new Criteria('user_from''%'.$myts->addSlashes(trim($HTTP_POST_VARS['user_from'])).'%''LIKE'));

    
        
$foundusers =& $member_handler->getUsers($criteriatrue);
        
        foreach (
array_keys($foundusers) as $j) {
            
$userdata['user_from'] = $foundusers[$j]->getVar("name");
            
$xoopsMailer =& getMailer();
            
$xoopsMailer->useMail();
            
$member_handler =& xoops_gethandler('member');
            
$xoopsMailer->setToGroups($userdata['email']);
            
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
            
$xoopsMailer->setFromName($xoopsConfig['sitename']);
            
$xoopsMailer->setSubject(sprintf(_US_NEWUSERREGAT,$xoopsConfig['sitename']));
            
$xoopsMailer->setBody(sprintf(_US_HASJUSTREG,$myts->oopsStripSlashesGPC($uname)));
            
$xoopsMailer->send();
            }
            
//end my code
            
$xoopsMailer =& getMailer();
            
$xoopsMailer->useMail();
            
$member_handler =& xoops_gethandler('member');
            
$xoopsMailer->setToGroups($member_handler->getGroup($xoopsConfigUser['new_user_notify_group']));
            
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
            
$xoopsMailer->setFromName($xoopsConfig['sitename']);
            
$xoopsMailer->setSubject(sprintf(_US_NEWUSERREGAT,$xoopsConfig['sitename']));
            
$xoopsMailer->setBody(sprintf(_US_HASJUSTREG,$myts->oopsStripSlashesGPC($uname)));
            
$xoopsMailer->send();
        }


The code I added is from the member search module. I was wondering if anyone has any ideas on how to fix this...

I guess one of my problems is that I'm using $HTTP_POST_VARS['user_from'] to search for users, but I'm not sure where is the information for the person that is registering stored (which variable), and how to access it.

Any help will be appreciated.



185
coopersita
Re: What is formSelectCountry for?

I decided to just hardcode the select options into the edituser.php file.

$country_select = new XoopsFormSelect(_US_COUNTRY'country'$xoopsUser->getVar('country'));
    
$country_select->addOption("Afghanistan"); 
$country_select->addOption("Albania"); 
$country_select->addOption("Algeria"); ...



186
coopersita
What is formSelectCountry for?

I noticed a XOOPS drop down menu that lists all the countries. I added the country field to my registation form and I was using it for that. The only problem is that in the database stores the two letter code for the selected country. I want to modify xoopslists.php so that it will store the country name instead of the code, but I don't know if that list is used by some other module or file.

I tried making another form element, but it didn't work.

Any ideas?



187
coopersita
Re:How to modify New Members block?

Thanks again.

I guess I'll once I actually have some blocks to build I'll figure it out.



188
coopersita
Re:How to modify New Members block?

Worked perfecly. Thanks.

So my next question. If I want to add a new block that needs to retrieve user info from the DB, do I have to add the necessary php in a new function to that same system_blocks.php?



189
coopersita
How to modify New Members block?

I want to list in my New Member block the real name instead of the user name.

How do you do that?

I've looked at the block template, but I where is the php that sends the vars to it?



190
coopersita
Re: Make real name a required field for user registration

Worked like a charm. Thanks.




TopTop
« 1 ... 16 17 18 (19) 20 »



Login

Who's Online

325 user(s) are online (204 user(s) are browsing Support Forums)


Members: 0


Guests: 325


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