51
phatjew
Re: speaking of permissions for modules . . .
  • 2003/10/22 23:09

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


Thanks -- that was a great answer. I should have thought of it myself, but I am a XOOPS newbie.




52
phatjew
Re: New user -> Not Registered but other group?
  • 2003/10/22 22:55

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


I asked this question last week. The response that I got was that in Mainfile.php, it is hardcoded. There is no way to change the default group in the admin page, but if you want to tinker with assigning the default group names to different group IDs, that is where you would do it.




53
phatjew
speaking of permissions for modules . . .
  • 2003/10/18 17:34

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


The module I am writing has sub-menu items in the main menu. One of them is a "submit" link, exactly lke the one for the Web Links module. However, I only want the submit menu option to show up for certain groups. Is there a way to change a module's Main Menu options based on group permissions?

Thanks in advance for any help with this.

--Rafi

Speak to me in PHP.



54
phatjew
Re: How to change default group when user registers
  • 2003/10/18 16:30

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


I noticed those lines in Mainfile.php before, and they concerned me at that time. If I want to add new groups, should they also get global defines for them, like this:

define('XOOPS_GROUP_ADMIN', '1');
define('XOOPS_GROUP_USERS', '2');
define('XOOPS_GROUP_ANONYMOUS', '3');
define('XOOPS_GROUP_STAFFWRITER', '4');

Do these have to be added manually, or are they unnecessary?

--Rafi



55
phatjew
How to change default group when user registers
  • 2003/10/17 21:36

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


I apologize if this has been answered before -- I searched the forums with "register", "default", and "group" in various permutations for 30 minutes but I could not find it.

I am using v2.0.5, and I can't figure out how to change the default group that users are put in when they register.

Can anyone help?

--Rafi



56
phatjew
Re: Multiselect in preferences - how do I?
  • 2003/10/17 21:26

  • phatjew

  • Just popping in

  • Posts: 56

  • Since: 2003/10/8


This was a tricky one, but I figured it out for the reviews module that I am writing (possibly soon to be released).

First, you must understand that by putting a [] after the name of an input on a form, that makes it pass its value as an array. However, it also makes it difficult for javascript to see that element, so you want to start with the name of the list box NOT having the [].

1. go to:
http://javascript.internet.com/forms/form-swapper-2.html

and get the code (with javascript) for the menu swapper. This allows you to choose as many items as you want from one multiple select and move them to a second multiple select. I personally am using XOOPS 2.0.5, and I put the javascript here and below into xoops.js, since I use it on many pages. The definition of my second multiple select is as follows:
<select multiple size='10' name='review_categories' style='width:150'>

2. When you submit the form, you must include a little javascript to select all of the items in the second list, and make it pass the values as an array. Otherwise, they are not passed. I did htis with the following code:

<input type='submit' name='contents_submit' onClick='makeArray(this.form.review_categories)' value='Go'/>

where review_categories is the name of my second multiple select, and "makeArray" looks like this:

function makeArray(tBox)
{
tBox.name=tBox.name + "[]";
for (i=0;i<tBox.length;i++)
{
tBox.options[i].selected = true;
}
}

NOTE -- this is where the [] is added to the name of the input, making it pass the values as an array.

3. On the next page, you can access all the values of the input by using array syntax (review_categories[0], review_categories[1], etc., in my case).

Hope this helps.

--Rafi




TopTop
« 1 ... 3 4 5 (6)



Login

Who's Online

292 user(s) are online (182 user(s) are browsing Support Forums)


Members: 0


Guests: 292


more...

Donat-O-Meter

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

Latest GitHub Commits