[4.0] Improvement Vote Plugin#31098
Conversation
3 instead of 2 stars fa-icons instead of .png images
|
The evaluation with whole function values. I did not understand how to modify the table for decimal ratings, should I make an ALTER TABLE? If yes, with what new attribute? |
|
@sandewt seems like we have to alter the table's |
|
What about not altering the column (preferred) but using a conversion of 1-100 for 0.1-10.0 rating? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31098. |
I'm trying to explainfile: \components\com_content\src\Model\ArticleModel.php Line 152: here round is 0 decimal, becomes 1 decimal rating = rating_sum / rating_count (= average) Suppose: rating_sum = 100 and rating_count = 30
The final rating then becomes: |
variable $text is canceled extra space
Unnecessary
Unnecessary
There are many ways to indicate a rating. This PR is in line with the current situation. Yes, a lot is possible. But an apparently small change often gives a lot of work. You can always open a new issue with a new proposal. |
style="margin-left: -1.2em becomes style="margin-left: -1.15em
I can't find the cause. Need some help. |
|
Restarted drone |
|
Please explain how to test |
|
To get a correct placement in rtl you need to reverse the color and anyway a class to replace the inline style to get |
|
Thanks @infograf768 ,
You mean in: build/media_source/plg_content_vote/css ? |
I guess so and evidently loading it from media/plg_content_vote/css/ in rating.php
|
|
@sandewt no, one I made, but as @infograf768 no need to mess with copyright yourself. Simply do file_get_contents ( assuming your not using my helper ) on the svg file itself and your done. Auto updated and everything. |
I totally agree.
I wait and see if your PR [#31410] - [4.0] htmlhelper svg is successful. |
back to an older situation
|
Back to an older situation: See [4.0] Webauth inline SVG button: #31516 (comment) See: [4.0] htmlhelper svg #31410 |
|
I have tested this item ✅ successfully on c0f9d3d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31098. |
The check is now in the right place.
|
I have tested this item ✅ successfully on c0f9d3d This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31098. |
|
When I have tested this item, an error occurred Chrome on Windows 10 with Xampp Server |
What are the specifications of your test environment? Please, check the error log. [EDIT] |
|
rtc after checking again. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31098. |
controle file_exists
|
@rjharishabh please test |
|
@sandewt I am getting this and the image is also not present in both chrome and firefox |
Looks like you're not doing anything wrong, check the following: The images are .svg files. |
|
Thanks all 👍 |
|
@sandewt 👍 |
CI error is unrelated










Pull Request for Issue #30193.
Summary of Changes
In the current situation only two stars can be seen.
In the new situation, a half star has been added.
Font Awesome icons are used and no longer two (bad) .png images.
Testing Instructions
Install Multilingual Sample Data
Use
npm ci(npm run build:css) orPrebuilt package(bottom page)I.
Cast votes.
II.
Change the values in the table #__content_rating.
Values for testing: round = 0.5 (old round to 1)
rating 3.2 -> 3 stars
rating 3.3 -> 3.5 stars (10 : 3 = rating_sum / rating_count)
rating 3.4 -> 3.5 stars
rating 3.7 -> 3.5 stars
rating 3.8 -> 4 stars
III.
Test in a LFT and a RTL language.
IV.
Test overrides (images).
V.
Code review + security.
The role and aria-label attribute have been added for accessibility. See the html source code too.
Actual result BEFORE applying this Pull Request
Two stars can be seen: a whole and an empty star.
E.g. vote average = 3.3 becomes 3 stars.
Expected result AFTER applying this Pull Request
Three different stars can be seen: a whole, a half and an empty star.
E.g. vote average = 3.3 becomes 3.5 stars.
Documentation Changes Required
?
Additional comment
When PR #31096 is added, there are more options in terms of the look and feel of the stars.
[EDIT]