News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Form Mod

Started by live627, July 09, 2008, 10:24:44 PM

Previous topic - Next topic

SychO

can someone post the possible settings in a field ? I know there is required and there is the options for a select box, but what else ? thank you
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Big Game

My site hosts competitions between members.
Therefore My custom form is set to add Member1 vs Member2 in the subject field.

Is there anyway to have the mention members mod work with this one.
It would be great if my members could just start typing a name in the subject field of the custom form and the mention box pops up!

Big Game

@Live627 Also, is there a way to make this work with child boards?
It displays and posts when I click "Subject" from the child board, but it actually posts to the parent board instead of the child board.

Kindred

then you have configured it incorrectly.

my form posts to a child board just fine...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Big Game

Quote from: Kindred on August 21, 2016, 09:28:02 AM
then you have configured it incorrectly.

my form posts to a child board just fine...

Oh okay. Thanks for replying. In that case, I will try to find what I did wrong.

What about my first question about the mention members working in the subject area?

Kindred

Probably not, since this mod has no received any updates in a while and it would take some code merging to add another mod to this one
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Big Game

Quote from: Kindred on August 21, 2016, 02:26:06 PM
Probably not, since this mod has no received any updates in a while and it would take some code merging to add another mod to this one

Alrighty, thanks again for the fast reply.

Big Game

Quote from: Kindred on August 21, 2016, 02:26:06 PM
Probably not, since this mod has no received any updates in a while and it would take some code merging to add another mod to this one

back again ...

I have uninstalled and deleted the mod with plans to reinstall and start over.
But when i reinstall I get this error ..



Anyway you can decipher this for me?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Big Game


Biology Forums

Here's how to fix the erasing of permissions.

Find (at around line 880 to 890):

AND permission NOT IN ('" . implode("', '", $context['illegal_permissions']) . "')"), __FILE__, __LINE__);
Where you see the "WHERE" mysql statement, add:

permission NOT LIKE 'custom_forms%' AND

No more erasing of permissions.

SychO

Quote from: Stylus on August 23, 2016, 09:23:54 PM
Here's how to fix the erasing of permissions.

Find (at around line 880 to 890):

AND permission NOT IN ('" . implode("', '", $context['illegal_permissions']) . "')"), __FILE__, __LINE__);
Where you see the "WHERE" mysql statement, add:

permission NOT LIKE 'custom_forms%' AND

No more erasing of permissions.

this ?

if ($_GET['group'] != 3 && empty($_GET['pid']))
{
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}permissions
WHERE id_group = {int:current_group}
' . (empty($context['illegal_permissions']) ? '' : ' AND permission NOT IN ({array_string:illegal_permissions})'),
array(
'current_group' => $_GET['group'],
'illegal_permissions' => !empty($context['illegal_permissions']) ? $context['illegal_permissions'] : array(),
)
);


if yes could you be more precise of where to paste the line please
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

SychO

this is much better

in ManageSettings.php

find

                $smcFunc['db_query']('', '
DELETE FROM {db_prefix}permissions
WHERE id_group = {int:current_group}
' . (empty($context['illegal_permissions']) ? '' : ' AND permission NOT IN ({array_string:illegal_permissions})'),
array(
'current_group' => $_GET['group'],
'illegal_permissions' => !empty($context['illegal_permissions']) ? $context['illegal_permissions'] : array(),
)
);


replace WHERE with:

WHERE permission NOT LIKE "custom_forms%" AND permission NOT LIKE "CustomForm_view_perms" AND
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

JerzyLS

I can't understand. Where I would replace the query?

Kindred

actually, I understand SQL and I am not certain what he is trying to replace within the query and why....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SychO

Quote from: Kindred on September 01, 2016, 10:39:42 AM
actually, I understand SQL and I am not certain what he is trying to replace within the query and why....

@Stylus showed a way to fix the bug where every time you change the permissions for a group, you get back to the form mod and find that that group's permission in viewing a form is now removed, I just corrected what his answer.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Kindred

Except your SQL statement seems incorrect to me and it is distinctly unclear which section you intend to be replaced
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

SychO

Quote from: Kindred on September 02, 2016, 11:13:40 PM
Except your SQL statement seems incorrect to me and it is distinctly unclear which section you intend to be replaced

I tried it and I currently have it like that, It works just fine, I no longer have that bug where every time I make a permission change for a group the custom forms permissions set back to default for that group.

$smcFunc['db_query']('', '
DELETE FROM {db_prefix}permissions
WHERE permission NOT LIKE "custom_forms%" AND permission NOT LIKE "CustomForm_view_perms" AND id_group = {int:current_group}
' . (empty($context['illegal_permissions']) ? '' : ' AND permission NOT IN ({array_string:illegal_permissions})'),
array(
'current_group' => $_GET['group'],
'illegal_permissions' => !empty($context['illegal_permissions']) ? $context['illegal_permissions'] : array(),
)
);

Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

JerzyLS

In Source/ManageSettings.php

I have only this:

// Delete any permissions that belong to the form.
$smcFunc['db_query']('', '
DELETE
FROM {db_prefix}permissions
WHERE permission = {string:permission}',
array(
'permission' => 'custom_forms_'.$form_id,
)
);


But this:

// Delete the previous permissions...
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}permissions
WHERE id_group IN ({array_int:group_list})
' . (empty($context['illegal_permissions']) ? '' : ' AND permission NOT IN ({array_string:illegal_permissions})'),
array(
'group_list' => $_POST['group'],
'illegal_permissions' => !empty($context['illegal_permissions']) ? $context['illegal_permissions'] : array(),
)
);


...is in Source/ManagePermissions.php

And there is other array {}.

I'm going to replace WHERE query only.

JerzyLS

And I just checked it.
Not working for me. It's still erasing permissions of custom forms. :(

Advertisement: