New answers tagged

0

Ummm. PHP code inside a module has no access to nor knowledge of the markup that will eventually be wrapped around it. There's no telling what chrome a template override may put in place, and the module actually gets rendered before it does, so at the time the module PHP gets executed, the markup wrapping the module has yet to be determined. I can't imagine ...


0

Just the same code as i had on my old clean php website. Copied the code and pasted it and it worked right away. Might work on it more when i have the website opened. Right now im all for it to work. // Create connection $conn = new mysqli($servername, $username, $password, $db_name); // Check connection if ($conn->connect_error){ die("Connection ...


0

I got it working, by using the entire code from before. Didnt even think about testing it int its purity since i assumed that the connection needed to be rebuilt. But it worked with a simple copy/paste. Thanks for all help!


2

✔️ The use of $jinput->get() with INT parameter to sanitise the incoming data for security and stability. 💡 To maintain a consistent variable naming convention in accordance with Joomla's official recommendation: Regular Variables and Class Properties Regular variables follow the same conventions as functions. This will allow your script to ...


1

This error was caused by the AutoTweet NG Light RSS module. As I could see the RSS feed in my browser I was reasonably sure the 403 forbidden error was a red herring. I tested this by trying Joomla! Core Mod_feed (feed display), this worked. I can only assume some sort of server configuration error due to cURL but I do not control the server so this is ...


3

I would have preferred to just suggest some touch ups to your snippet, but there is too much for me to address in your answer as a comment and I'd rather explain fully. Instead, I'll post this new answer which will review and clean up your assumed-working coding attempt for the benefit of you and future researchers. You are declaring $images = json_decode($...


1

The solution to my question. I think is valid: <?php $images = json_decode($item->images); ?> <span itemprop="image" itemscope itemtype="https://schema.org/ImageObject"> <link itemprop="url" href="<?php // Create new DOMDocument object. $dom = new DOMDOcument; // Load article text into DOMDocument. $dom->loadHTML($item->...


Top 50 recent answers are included