Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2067 Attachment Usage Information Improvement #3120

Merged
merged 11 commits into from
Apr 22, 2018
Merged

Fixes #2067 Attachment Usage Information Improvement #3120

merged 11 commits into from
Apr 22, 2018

Conversation

effone
Copy link
Member

@effone effone commented Apr 14, 2018

#2067

Didn't modify function get_friendly_size( ) as it may be designed this way to use at somewhere else...

Changes:

  • Modified newpost & newreply not to display attachment usage (only display quota) when no attachment quota is used as discussed here.
  • User CP Attachment usage enhanced.

Splitted the language variable to use as necessary.
Changed / added variables.
Fine tuned 'usercp_attachments'
Added new template 'post_attachments_viewlink' to hold attachment statistics page link.
Updated existing and added link to view attachment stats page (separate template).
Updated existing and added link to view attachment stats page (separate template).
@@ -12035,7 +12036,7 @@ if(use_xmlhttprequest == "1")
</tr>
<tr>
<td class="trow2" width="40%"><strong>{$lang->attachstats_spaceused}</strong></td>
<td class="trow2" width="60%">{$friendlyusage} ({$percent})</td>
<td class="trow2" width="60%">{$friendlyusage}</td>
Copy link
Contributor

Choose a reason for hiding this comment

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

If removed completely, you can remove attachments_usage_percent too, because then there's only one reference to it (attachments_usage_quota) ☺️

Copy link
Member Author

@effone effone Apr 14, 2018

Choose a reason for hiding this comment

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

Modified attachments_usage_percent to hold required space and parentheses.
Hard coded space removed from usercp.php
Done.

Space added to language
Hardcoded space removed.
Removed unnecessary blank value assignment
@@ -291,7 +291,8 @@
$l['date_uploaded'] ="Posted";
$l['no_attachments_selected'] = "You did not select any attachments to delete.";
$l['attachments_deleted'] = "The selected attachments have been successfully deleted.<br />You will be now redirected to the attachments manager.";
$l['attachments_usage_quota'] = "- Using {1} of {2} ({3}) in {4} Attachments";
$l['attachments_usage_quota'] = "- Using {1} of {2} in {3} Attachments";
$l['attachments_usage_percent'] = "( {1}%)";
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that space intentional ?

Copy link
Member Author

@effone effone Apr 14, 2018

Choose a reason for hiding this comment

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

Yep. required while the % is being appended to the usage size ...
Just moved it out of usercp.php, as shade instructed to avoid hardcoding and placed in language.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh wait, misplaced the space. Revising now ...

'attachments_usage_percent'
... for $percent
@Ben-MyBB Ben-MyBB added the b:1.8 Branch: 1.8.x label Apr 22, 2018
@euantorano euantorano merged commit cb5ce8c into mybb:feature Apr 22, 2018
@effone effone deleted the patch-3 branch April 22, 2018 19:42
Eldenroot pushed a commit to Eldenroot/mybb that referenced this pull request May 8, 2018
* Attachment status language update.

Splitted the language variable to use as necessary.

* Attachment status update

Changed / added variables.

* Attachment usage template changes

Fine tuned 'usercp_attachments'
Added new template 'post_attachments_viewlink' to hold attachment statistics page link.

* Attachment usage updated

Updated existing and added link to view attachment stats page (separate template).

* Attachment usage updated

Updated existing and added link to view attachment stats page (separate template).

* Modified attachment statistics page

Fine tuning ...

* Comment incorporation

Space added to language

* Comment incorporation

Hardcoded space removed.

* $percent updated

Removed unnecessary blank value assignment

* Space placing revised

'attachments_usage_percent'

* Refined repeat assignment

... for $percent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants