5 votes
Accepted

How to generate a dynamic note field for a custom component?

Use Form::setFieldAttribute(). Typically, this is done in the model's getForm() method. However, if it's cosmetic only, it can be done in the view too. In /administrator/com_image/models/forms/image....
Sharky's user avatar
  • 11.2k
2 votes

How to prevent a single user from voting multiple times on a single article?

Your $rating variable contains the following fields: content_id, rating_sum, rating_count and lastip You can see this by examining the database table #__content_rating. The ratings are not saved ...
fruppel's user avatar
  • 3,733
2 votes
Accepted

Registering EasyPost library in J4 module - Class not found

Assuming you are using the same code for J3, it's working by coincidence. The library is using PSR4 autoloading but in J3 JLoader::registerNamespace() defaults to PSR0. Normally this wouldn't work but ...
Sharky's user avatar
  • 11.2k
2 votes

Modify CSS class on specific pages

Create a custom class i.e. .alt-image and define the CSS in your template as follows .alt-image .article-intro-image img {border-radius: 10px !important} Then you simply add your class in the menu ...
Guitarman's user avatar
  • 182
2 votes
Accepted

Cannot extend my custom component's validation rules -- does not validate

Just do addrulepath="components/com_mycomponent/models/rules" and leave out the /myrule.php. I presume you're terminating the <field .../> ok in the XML and adding <?php at the start of ...
Robbie Jackson's user avatar
1 vote

Home page problem (maybe css related)

I'm not sure why but your website has some duplicated CSS IDs e.g.: id="sppb-addon-1.51206879815E+12" id="section-id-1.51927852025E+12" CSS ID selectors should be unique. Also, CSS selectors ...
Neil Robertson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible