1
haryadoon
Re:Too many users ? Email doesn't seem to work.
  • 2004/10/24 9:56

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


Thanks. I have split the group into four (A - D, E - L, etc) and that works fine.



2
haryadoon
Too many users ? Email doesn't seem to work.
  • 2004/10/23 2:47

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


Xoops 2.0.7.3 -- emails have stopped working correctly !

I now have 365 users, and XOOPS Email Users no longer works. When I try to send an email to all Registered users, I just get a blank page and no emails are sent.



3
haryadoon
Too many users ? Groups don't seem to work.
  • 2004/10/23 2:24

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


Xoops 2.0.7.3 -- groups have stopped working correctly !

I now have 365 users, and XOOPS Groups (Modify) no longer shows the left-hand box for selecting users. Now, when I select Admin > System Admin > Groups > Modify a group, then scroll to the bottom of the page, to the area marked "Edit Members of this Group", I see only one list box, listing only the users that are currently assigned to the group. There is no left-hand box to select users from. Since all my users are registered, the group Registered Users shows 365 entries, and I can delete users from the group, but I can't add new ones !



4
haryadoon
Too many users ? Groups don't seem to work.
  • 2004/10/23 2:24

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


Xoops 2.0.7.3 -- groups have stopped working correctly !

I now have 365 users, and XOOPS Groups (Modify) no longer shows the left-hand box for selecting users. Now, when I select Admin > System Admin > Groups > Modify a group, then scroll to the bottom of the page, to the area marked "Edit Members of this Group", I see only one list box, listing only the users that are currently assigned to the group. There is no left-hand box to select users from. Since all my users are registered, the group Registered Users shows 365 entries, and I can delete users from the group, but I can't add new ones !



5
haryadoon
Re: Registration/Membership Management Question
  • 2004/8/20 4:47

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


Many thanks for your ideas ! I've used them for my own customisations.

I need to allow the user to subscribe or unsubscribe to a particular group. This group allows me to send specific emails to people who want to get that type of email. The new user registration page needs to include a field to opt in or out. The user edit page ("edit account" or "edit profile") must allow the user to change this selection. When the user selects "yes", the code needs to add this user to the group; if the user selects no, the code needs to remove the user from the group.

Here's what I did :

1. include/registerform.php, around line 82:
Quote:
...
$reg_form->addElement(new XoopsFormPassword(_US_PASSWORD, "pass", 10, 32), true);
$reg_form->addElement(new XoopsFormPassword(_US_VERIFYPASS, "vpass", 10, 32), true);

// 17 Aug 2004 - Charles Thompson
// Added "Junior Club Weekly Draw"
$jr_draw_email = isset($HTTP_POST_VARS['jr_draw_email']) ? $HTTP_POST_VARS['jr_draw_email'] : "1";
$reg_form->addElement(new XoopsFormRadioYN("Do you wish to receive the weekly Junior Club draw by email ?",
"jr_draw_email", $jr_draw_email));
// end change - 17 Aug 2004 - Charles Thompson

$reg_form->addElement(new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', 1));
if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') {
...

This code sets up the new user registration form. Here, I add a new form row after the password row, before the "okay to send mail" row. The new row includes a prompt and a yes/no radio group. I hard-coded the text in English; I should have added this to language/english/user.php and referenced it here, but I couln't be bothered. The field name, jr_draw_email will contain a 1 for yes or a 0 for no, and is referenced in the next bit of code ...

2. register.php, around line 153 :
Quote:
...
$user_viewemail = isset($user_viewemail) ? intval($user_viewemail) : 0;

// 17 Aug 2004 - Charles Thompson
// Added "jr_draw_email" below
echo "<input type='hidden' name='user_viewemail' value='".$user_viewemail."' />
<input type='hidden' name='timezone_offset' value='".(float)$timezone_offset."' />
<input type='hidden' name='url' value='".$myts->makeTboxData4PreviewInForm($url)."' />
<input type='hidden' name='pass' value='".$myts->makeTboxData4PreviewInForm($pass)."' />
<input type='hidden' name='vpass' value='".$myts->makeTboxData4PreviewInForm($vpass)."' />
<input type='hidden' name='jr_draw_email' value='".intval($jr_draw_email)."' />
<input type='hidden' name='user_mailok' value='".intval($user_mailok)."' />
<br /><br /><input type='hidden' name='op' value='finish' /><input type='submit' value='". _US_FINISH ."' /></form>";
// end change - 17 Aug 2004 - Charles Thompson
// CloseTable();
} else {
...

This is the block that sets up the form post variables, which will be posted back to this program when the user submits the form. All I have done here is add a hidden field for the yes/no value selected by the user -- $jr_draw_email.

3. register.php, around line 220 :
Quote:
...
echo _US_REGISTERNG;
include 'footer.php';
exit();
}
// 17 Aug 2004 - Charles Thompson
// If user wants to belong, add user to group "Junior Weekly Draw"
if ($jr_draw_email == 1) {
$gid = 5; // change this some time so that it calls member->getGroup to find the correct ID
$member_handler->addUserToGroup($gid, $newid);
}
// end change - 17 Aug 2004 - Charles Thompson

if ($xoopsConfigUser['activation_type'] == 1) {
redirect_header('index.php', 4, _US_ACTLOGIN);
...

This is in the block that processes the submitted form fields. $jr_draw_email is populated automatically from the form POST values, from the hidden field added in (2) above. addUserToGroup is defined in kernel/member.php. I have hard-coded the group ID because I can't find an easy way to get a group ID from a text string (the group name). Remember, a value of 1 means the user wants to join the group.

4. edituser.php, around line 117 :
Quote:
...
} else {
setcookie($xoopsConfig['usercookie']);
}

// 17 Aug 2004 - Charles Thompson
// If user wants to belong, add user to group "Junior Weekly Draw"
$gid = 5; // change this some time so that it calls member->getGroup to find the correct ID
$groups =& $xoopsUser->getGroups();
if ($jr_draw_email == 1) {
if (!in_array($gid, $groups)) {
$member_handler->addUserToGroup($gid, $uid);
}
} else {
if (in_array($gid, $groups)) {
$uid_arr = array($uid);
$member_handler->removeUsersFromGroup($gid, $uid_arr);
}
}
// end change - 17 Aug 2004 - Charles Thompson

if (!$member_handler->insertUser($edituser)) {
include XOOPS_ROOT_PATH.'/header.php';
...

Unlike the registration form, the edit profile page is processed with just one php file - edituser.php. This section of code is executed when the user saves the updated details. Again, I hard-coded the group ID, and again, I use getGroups and addUserToGroup, as described above. removeUsersFromGroup is found in kernel/member.php. It requires an array of users.

5. edituser.php, around line 225 :
Quote:
...
$form->addElement($pwd_tray);
$form->addElement($cookie_radio);

// 17 Aug 2004 - Charles Thompson
// Add "Jr Club Weekly Draw" option
$groups =& $xoopsUser->getGroups();
// Group 5 is "Junior Club Weekly Draw"
// ths will need to be fixed some time in the future
$jr_draw_email_val = in_array('5', $groups) ? '1' : '0';
$jr_draw_email = new XoopsFormRadioYN(
"Do you wish to receive the weekly Junior Club draw by email ?",
"jr_draw_email", $jr_draw_email_val);
$form->addElement($jr_draw_email);
// end change - 17 Aug 2004 - Charles Thompson

$form->addElement($mailok_radio);
$form->addElement($uid_hidden);
...

Later in edituser.php, we find the code that displays the form for the user to edit. Again, I hard-coded the group ID and prompt text (see above).

Please note that the group membership changes don't seem to appear until the user logs out and back in again. I can't work out why that is ! After changing the group membership this way, the admin can see the user really is attached to the group (using the admin/groups page).

Can anyone help with my two problems :
1. How to get the group ID from the group name (without going straight to the database) ?
2. How to avoid logging out and in again in order for the user to see this change in group membership ?



6
haryadoon
Re: Customisation of Xoops Registration screen
  • 2004/8/17 3:22

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


I need to subscribe the user to a specific group when he/she ticks a box on the registration (and user edit) page. Has anyone done that before ? Or is there a better way to do it ?

I have a new group, "newgroup", that is used for emails only. If the user opts in, they should be able to add themselves to the group. The only way to do this now is to log in as admin and manually update the group with the new users.



7
haryadoon
TinyEvent - display more than one event in block
  • 2004/8/17 2:57

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


I have TinyEvent 1.01 running beautifully in XOOPS 2.0.6 and love it.

One problem, though ... the block only displays one event at a time. I have 7 events defined, all for the future, but only the first is displayed.

In TE admin preferences, I have set "Number of Events in Block" = 5.




8
haryadoon
Re: Children's sports clubs
  • 2004/8/2 0:49

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


Cheers, mate.

At this stage, I'll be doing some of this as plain HTML modules, FAQs and news items. I also hope to have the registration done as an extension to the standard XOOPS new user registration. Other things, like a scores database and Honours Board, I'll do as new modules over the next year so they're ready for next season.



9
haryadoon
Re: Children's sports clubs
  • 2004/8/1 19:27

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


Thanks. I've done the committee members list using a very simple HTML menu item, which I learned from XOOPS for Dummies.

Did you use TinyContent for all those items on your "About DCAS" menu ?

Registration is in September, so I don't expect to be able to do it this season, but there's plenty of time to do it next year. Since registration is not much more than basic XOOPS sign-up with some extra fields, there shouldn't be too much programming.

For the scores, I'd really like to find a module that already does 80% of what I want. I'll look at TinyContent and the sites suggested by other posters, and keep this thread open with my progress !



10
haryadoon
Children's sports clubs
  • 2004/7/30 10:14

  • haryadoon

  • Just popping in

  • Posts: 10

  • Since: 2004/7/29


I am building a XOOPS site for my kids' sports club (it's cricket, but any sport will do), and want to know if you have encountered others who wish to manage their club through a XOOPS site. I have spent the last couple of days building a basic site with news, faq, etc, but now need modules for :

- Scores : our club has many teams, playing against teams from other clubs once a week. Each team is in a grade, based on the age of the players (e.g. Under 10, Under 8, etc). I'd like to record the scores for each game (but not all the statistics - yet), and present them by date (all games on a date) or by team (all games played by one team).

- Fixtures : I receive the schedule of games and where they are to be played on a Tuesday - for the upcoming Saturday. I want to display this schedule on the web page AND notify all registered users by email. This could be done with a normal news item, but not the "notify all" function.

- Honours board : this is just a table of players names, dates and their achievement (runs, catches, etc).

- Registrations : 500 or so kids need to register each year ! We do it all on paper forms sent in the mail. It would be so much better to do it online. But we also use the registration form for ordering gear (like uniforms and equipment), which means I can't just extend the standard registration details. Or can I ?

- Committee Members : This is another simple table with people's names, position and contact details.

I have this information on my current site - collegians.org - but it is all manually updated, and I am the only one with FTP access to update content. The scores, team lists, etc, are all managed by our administrator on an Access database and spreadsheets. Yuck !

So ! Does anyone have any suggestions or experience with modules with the above functionality ? I'm not averse to hacking an existing module or even building one from scratch, but would much rather contact someone who has a similar need.




TopTop



Login

Who's Online

161 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 161


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