1
markcoleman
Formulaire NOPERM for anon users
  • 2008/2/4 14:22

  • markcoleman

  • Just popping in

  • Posts: 4

  • Since: 2006/9/25


I have 2 different sites doing the same thing. Both are XOOPS 2.0.17 and Formulaire 3.33. I have a contact form set up and when anon users go to fill it out they get a NOPERM message and a redirect to the front page. I have given permissions for the form in Formulaire and access to Formulaire to the Anon group. Any suggestions?

2
hmorgan
Re: Formulaire NOPERM for anon users
  • 2008/2/7 7:51

  • hmorgan

  • Just popping in

  • Posts: 2

  • Since: 2008/2/7 7


The problem appears to be that the name of the permission specified when the Formulaire system checks for viewing rights is hard coded, and is using the French name for the permission. The quick fix is to change it to the language you are using. For me, that's English. You'll need to make changes to these four files in the formulaire directory:

formulaire.php
index.php
blocks/formulaire_menu.php
blocks/qcm_menu.php

Look for lines that call the checkRight() method like this:

if ( $gperm_handler -> checkRight( 'Droits des categories', ...

Change the Frech permission name to your language, like this for English:

if ( $gperm_handler -> checkRight( 'Permissions of the categories', ...

The long term solution will be to use the language constants instead of hard coding the permission names. The developer has a constant for this, called _AM_CATPERM, but it appears that these files don't currently include the library files. Oh well. Hope this solves the problem for you.

3
blueteen
Re: Formulaire NOPERM for anon users
  • 2008/2/7 14:04

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Great hmorgan, you're right

/modules/formulaire/index.php
line 43, change
$perm_name 'Droits des categories';

to
$perm_name 'Permissions of the categories';


/modules/formulaire/formulaire.php
line 120, change
if ( $gperm_handler -> checkRight'Droits des categories'$id$groups$formulaireModule->getVar('mid') ) ) {}

to
if ( $gperm_handler -> checkRight'Permissions of the categories'$id$groups$formulaireModule->getVar('mid') ) ) {}


/modules/formulaire/blocks/qcm_menu.php
line 30, change
if ( $gperm_handler -> checkRight'Droits des categories'$row['id_form'], $groups$formulaireModule->getVar('mid') ) ) {

to
if ( $gperm_handler -> checkRight'Permissions of the categories'$row['id_form'], $groups$formulaireModule->getVar('mid') ) ) {


/modules/formulaire/blocks/formulaire_menu.php
line 30, change
if ( $gperm_handler -> checkRight'Droits des categories'$row['id_form'], $groups$formulaireModule->getVar('mid') ) ) {

to
if ( $gperm_handler -> checkRight'Permissions of the categories'$row['id_form'], $groups$formulaireModule->getVar('mid') ) ) {



After theses change, it seems you need to uninstall the reinstall the module.

I'll contact Philou !

4
Single
Re: Formulaire NOPERM for anon users
  • 2008/2/8 13:05

  • Single

  • Just popping in

  • Posts: 13

  • Since: 2008/2/8 1


I hade the same problem, i create an anonymous group in the database.

5
markcoleman
Re: Formulaire NOPERM for anon users
  • 2008/2/9 14:31

  • markcoleman

  • Just popping in

  • Posts: 4

  • Since: 2006/9/25


Great, thanks for the help, I will give it a shot.

6
voltan
Re: Formulaire NOPERM for anon users
  • 2008/2/13 17:37

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


I test it . not worked in localhost (by xampp) .
xoops 2.0.18

7
blueteen
Re: Formulaire NOPERM for anon users
  • 2008/2/13 18:02

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


Did you try uninstall the reinstall ?

8
markcoleman
Re: Formulaire NOPERM for anon users
  • 2008/2/13 20:15

  • markcoleman

  • Just popping in

  • Posts: 4

  • Since: 2006/9/25


After uninstalling and reinstalling with the four changes it worked fine.

Thanks again.

9
voltan
Re: Formulaire NOPERM for anon users
  • 2008/2/15 17:48

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


I uninstall and install again and set permission . an see (( NOPERM )) message again. but when i install module in new XOOPS work nice
xoops : 2.0.18

10
Daethian
Re: Formulaire NOPERM for anon users
  • 2008/3/17 14:23

  • Daethian

  • Quite a regular

  • Posts: 305

  • Since: 2005/3/4 1


Thanks for the instructions, I was having this problem too!
http://www.artfire.com/daethian
My Artfire store- Vintage Jewelry and New Bead Jewelry

Login

Who's Online

171 user(s) are online (127 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

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

Latest GitHub Commits