News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

[Free] Separate Terms and Rules

Started by [chrisB], April 02, 2025, 04:49:03 PM

Previous topic - Next topic

[chrisB]

There used to be a mod for 2.0 which separated the links of the terms and rules, I can't find it now. I guess it could have been a trick posted in the forum, but I do believe it was a mod.

If one doesn't exist, would one of the awesome mod creators please make one?

Options:
Separate the page for the terms and rules. (i.e index.php?agreement and index.php?policy)
Enable and disable each option enable/disable agreement, enable/disable policy
 Ability to change policy to rules (I aim to use a mod which has its own policy page, but changing to rules would be nice but would mean the action to policy would need to change to index.php? rules)
I'm stuck in a time warp from the early 00's.

live627


[chrisB]

Quote from: live627 on April 03, 2025, 12:33:51 AMwas it called "The Rules"?

I honestly don't remember, sorry. It was a useful mod though.
I'm stuck in a time warp from the early 00's.

live627

An equivalent mod is attached; I wanted that mod but my site was modded so much that it gave errors. So I rewrote it in 2011 to use integration hooks.

[chrisB]

Quote from: live627 on April 06, 2025, 04:41:26 AMAn equivalent mod is attached; I wanted that mod but my site was modded so much that it gave errors. So I rewrote it in 2011 to use integration hooks.

Thank you,

Could you tell me the links the mod creates? Is this the correct URL? https://24c059f20e5655044.temporary.link/index.php?action=rules

I have a menu mod installed and it hasn't determined any new links, and I otherwise can't locate any.

(test environment)
I'm stuck in a time warp from the early 00's.

live627

that link is correct

in Subs-Rules.php, findfunction rules_menu_buttons($menu_buttons)and reee place withfunction rules_menu_buttons(&$menu_buttons)https://github.com/live627/smf-mods/blob/794f4d6b7ca6351b45eb7dd8868c4600f963aecb/rules/Subs-Rules.php#L19

[chrisB]

Quote from: live627 on April 06, 2025, 08:42:38 PMthat link is correct

in Subs-Rules.php, find
function rules_menu_buttons($menu_buttons)and reee place with
function rules_menu_buttons(&$menu_buttons)https://github.com/live627/smf-mods/blob/794f4d6b7ca6351b45eb7dd8868c4600f963aecb/rules/Subs-Rules.php#L19

I applied the code above, I get the 500 page error on my live site (which is different hosting than my test).

I get no physical errors in the log (SMF), but my site's log shows this.

#0 /home/--/domains/--/public_html/index.php(187): obExit()
#1 {main}
  thrown in /home/--/domains/--/public_html/Sources/Subs.php on line 4135
I'm stuck in a time warp from the early 00's.

[chrisB]

@live627 I'm sorry, I uninstalled the mod in an effort to see if something went wrong with the initial copy I had downloaded. Since re-installing it, I can't separate the agreement and privacy policy.

If you would be able to advice me, I would really appreciate.

I'm delighted to see the mod exists, so thank you for saving it.
I'm stuck in a time warp from the early 00's.

[chrisB]

SMF Version: 2.1.x
PHP Version: 8.3
MySQL/MariaDB Version: 10.6.21-MariaDB
Forum Link: https://poetryartonline.com/

Problem Description:
I recently encountered an issue with a mod I installed. After uninstalling it due to errors with the rules page it creates and downloading a fresh copy, I reinstalled it, but the mod no longer functions as expected. I've noticed that when uninstalling the mod, it leaves behind settings in the database, which may be causing this problem.

Link to Mod:
https://www.simplemachines.org/community/index.php?msg=4188339

I've already tried the following steps:
  • Uninstalling and reinstalling the mod using fresh files.
  • Verifying that the mod's files were correctly uploaded and permissions are set appropriately.
  • Checking the SMF error log for entries related to the mod.

Despite these efforts, I haven't been able to resolve the issue.

Questions:
  • Should I manually clean up leftover database entries related to the mod, and if so, what's the safest way to do so?
  • Are there any additional troubleshooting steps you recommend?

Error Log:
Initial issue was the rules page gave a 500-page-error.

This is the first error I got.
[color=#4d4d4d][size=2][font=DejaVu Sans Mono, Menlo, Monaco, Consolas, monospace]#0 /home/--/domains/--/public_html/index.php(187): obExit()[/font][/size][/color]
[color=#4d4d4d][size=2][font=DejaVu Sans Mono, Menlo, Monaco, Consolas, monospace]#1 {main}[/font][/size][/color]
[color=#4d4d4d][size=2][font=DejaVu Sans Mono, Menlo, Monaco, Consolas, monospace]  thrown in /home/--/domains/--/public_html/Sources/Subs.php on line 4135[/font][/size][/color]

After reinstalling the mod, I started getting this error.
Type of error
Undefined_vars
Error message
2: Undefined array key "cannot_view_rules"
File
/home/--/domains/--/public_html/Sources/Security.php
Line
1035
URL of page causing the error
https://--.com/index.php?action=rules
Backtrace information
#0: smf_error_handler()
Called from /home/--/domains/--/public_html/Sources/Security.php on line 1035
#1: isAllowedTo()
Called from /home/--/domains/--/public_html/Sources/Rules.php on line 11
#2: Rules()
Called from /home/--/domains/--/public_html/index.php on line 184

Just to be clear, I realise that Live627 is most likely busy. I want to mention that I am only trying to problem-solve this. While I have shared the errors, I do not expect support regarding them. I am simply trying to provide as much information as possible, so I might be able to work out the issues my site has with the mod.

I appreciate any help or advice on this issue!
I'm stuck in a time warp from the early 00's.

Kindred

1- support for specific mods should be asked in the thread dedicated to supporting that mod.
in this case, your original request thread (merged) since mods are outside of general rpoduct support

2- most mods leave the settings/database edits on uninstall - because that uninstall/reinstall is the normal method to update a mod.

3- a 500 error is a SERVER side error....   usually due to some (maybe poorly) configured setting on the server, not because the mod is broken
Сл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."

[chrisB]

Thank you for the reply and the information, @Kindred . I understand that mod-specific support should be requested within the dedicated thread, and I'll follow that advice moving forward.

Regarding the uninstall behaviour, I appreciate the explanation that settings and database edits are usually left intact for updates. That makes sense now, though it wasn't clear to me initially. However, I'm unsure why removing the mod via uninstalling would lead to issues when reinstalling it. Could it be that the lingering database entries or settings are causing conflicts?

As for the 500 error, could you elaborate on what kind of server misconfigurations might commonly cause this issue? I'd like to ensure I'm addressing the root cause effectively.
I'm stuck in a time warp from the early 00's.

Kindred

typically it's a mod_security misconfiguration
for 500 errors, your SERVER error log should have an entry (not smf errors)

but database settings would not cause the mod to fail...     

and not sure what you mean by "issues when reinstalling"    what issues, specifically? Is it that you get a 500 when doing a reinstall?
Сл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."

[chrisB]

Quote from: Kindred on April 15, 2025, 02:53:03 PMtypically it's a mod_security misconfiguration
for 500 errors, your SERVER error log should have an entry (not smf errors)

but database settings would not cause the mod to fail...     

and not sure what you mean by "issues when reinstalling"    what issues, specifically? Is it that you get a 500 when doing a reinstall?

Thank you for the information regarding the server error.

I don't mean for the database to cause the mod to fail in terms of errors, but preventing the mod from actually doing what it is supposed to do?

For example, it doesn't separate the agreement and policy now.

This is the issue I encountered after uninstalling the mod, when it's reinstalled, I cannot separate the pages like the mod is intended to do.
I'm stuck in a time warp from the early 00's.

[chrisB]

@live627 I'd appreciate any advice, as the mod doesn't seem to be working for my live site upon removing it. Then reinstalling, the agreement page doesn't seperate: https://poetryartonline.com/index.php?action=agreement

I had someone look at my setup, and they believe the issue with the rules page isn't due to the configuration of my server.

My server uses LiteSpeed, and I have PHP 8.3 enabled.

My test site is shared hosting, and I don't have the issue removing the mod on there but the rules page doesn't load. I haven't managed to get it to work in any environment. I'm not suggesting the mod doesn't work, I am sure it does. Nor am I saying its poorly coded, I just wish to get it working for me.

If you would be able to take a look, I would be happy to throw $10-20 your way.
I'm stuck in a time warp from the early 00's.

live627

Oh I think I understand now; you want the standard agreement page  seperated and not a new area.

[chrisB]

Quote from: live627 on April 28, 2025, 07:26:42 AMOh I think I understand now; you want the standard agreement page  seperated and not a new area.

I don't think it matters if the mod creates a new area (or page).

If the outcome means;

Agreement, Rules and Policy have their their own areas/page. (I can use a privacy policy mod for that)

index.php?action=agreement
index.php?action=rules

On my test site it works okay, I just can't access the rules page. I am really confused why uninstalling the mod on my live site, seems to have messed it up though.
I'm stuck in a time warp from the early 00's.

Advertisement: