New answers tagged

0

Now i had time to look at your answers. Thank you very much everyone for the discussion was enriching for me. Before checking var_dump () - Answer NULL. The problem was solved with a correction of the check which shared with us @mickmackusa namely: <? Php if ($ this-> item-> params-> get ('itemExtraFields') &&! Empty ($ this -> item-&...


0

$this->item->extra_fields is most likely empty/null and therefore not an array or object, so PHP cannot count it. I believe you can add an additional check to see if it's empty and set, like so: <?php if (!empty($this->item->extra_fields) && isset($this->item->extra_fields)) : ?> <?php if ($this->item->params->...


0

After much frustration I finally traced the problem to a typo in the templateDetails.xml. Once I fixed that, the code/method I outlined above worked, and the button styling in the module's backend appeared in all its colorful glory.


1

When running Joomla from git clone you can use build/stubGenerator.php script. It will generate stubs.php file in Joomla's root directory.


1

If I understand your problem correctly then you just have to change the first few lines of your original code because you do not just want look for the user ID from the database (user table) but you also need to define the user ID from the particular article's URL. So try it with using the following at the beginning of your code: $articleUrl = \Joomla\CMS\...


0

thanks for your answer. Maybe i didnĀ“t explain clearly.. the user that see the information.. must to be public.. the user is not a guest.. can not login .. only see the information. i generate a link for each registered user --> this link they will share with the customers... so the idea is with the link see the article. for example for the user_id = 969 ...


0

You should first separate when you have a know user from a guest one: $user = JFactory::getUser(); if ($user->guest) { echo "<p>You must login to see the content</p>"; } else { // add your code } There is not way of know what user is, if he not logged-in first, so I think the best is show a message to him for logged-in ...


1

After a long period of time, I have managed to find a solution to my problem. I have decided to rewrite the code from scratch. The code is the following: <script type="text/javascript"> var vehicles = new Array(); var markersLayer; function initializeGoogleMap() { var googleStreets = L.tileLayer('http://{s}.google.com/vt/lyrs=m&x={...


Top 50 recent answers are included