Skip to content

Conversation

@rica-carv
Copy link
Contributor

Motivation and Context

Remove harcoded HTML form PERMS forum shortcode

Description

Moved embebed HTML to template

How Has This Been Tested?

Tested in latest Github e107 code

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist


return implode("<span class='forum-perms-separator'><!-- --></span>", $permDisplay);

global $FORUM_VIEWFORUM_TEMPLATE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using global is very PHP5. Please load the template. It can be done in the construct()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the way the forum code is written. The template is already loaded in the main forum_view.php code, and for me it was a overload to load the template twice...
There's another way to do it. Pass the template via sc var, but that would require rewrite the main php file code....
Anyway all the forum code needs a major rewrite, it's poorly programmed...

If i'm allowed, i can do it...

Copy link
Member

@Moc Moc Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, for quite some time I've been considering a rewrite from scratch of the forum plugin but while still keeping the same database structure.

We could start a rewrite as a new plugin in a separate repository. Then at some point it can be merged into core.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit ccf3c5b and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 48.9% (0.0% change).

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants