Hot answers tagged

2

I think I have a good idea where the error is. You are using $this->getFileName() to get the files original name, then you mutate the filename using normalize(). At this point you have a new file name, but the system doesn't realise that this is the filename to be used forevermore. Basically, you will either need to rename the file in your file system ...


2

Personally I wouldn't use a .css.php file. The following assumes you WON'T be supporting Internet Explorer and I will be answering your question about CSS filters. The grid/masonry can be asked as a separate question. So, let's say you want to set a CSS filter (grayscale) and the percentage is set dynamically. You firstly want to have the following CSS file (...


2

Here are the official Joomla! Docs for anyone else looking in the future: https://docs.joomla.org/How_do_I_use_Gmail_as_my_mail_server%3F How do I use Gmail as my mail server? If you have a working Gmail account you can use Gmail as your mail server by setting it in the global configuration. On the server tab set the following: Mailer: SMTP SMTP Host: smtp....


1

As @Sharky said, it seems like your SQLSRV extension isn't enabled. You can manually activate it by changing your php.ini file, enabling this extension and downloading the drivers. PHP Documentation says: The SQLSRV extension is enabled by adding appropriate DLL file to your PHP extension directory and the corresponding entry to the php.ini file. The SQLSRV ...


1

You can definitely delete rows from multiple tables in a single query, but Joomla doesn't offer a query-building technique to accommodate this. If you absolutely demand that query builder methods must be used, then you'll need to conduct some "surgery" (which isn't very pretty) on the generated query before executing it -- see https://joomla....


1

Why don't you do it in 2 steps? I would do something like the following code. As you can see I use name spacing (since Joomla 3.8), used quoteName the table + field names and added a try/catch block. use Joomla\CMS\Factory; public function delete_codes() { $id = $this->input->getInt('id'); $query = $db->getQuery(true) ->delete($db->...


1

Don't use JUri for fetching local files. It returns the web address of your site. Fetching files over HTTP is extremely slow compared to fetching files locally. Use one of JPATH constants to get a local filesystem path, e.g.: $json = JPATH_BASE . '/modules/mod_kou_stack_exchange/media/js/sites.json'; $json = file_get_contents($json); https://docs.joomla....


1

Use the filepath: JUri::base() . '/modules/mod_kou_stack_exchange/media/js/sites.json' The filesystem equivalent of, eg. /public_html/yoursite/modules/... or /htdocs/yoursite/modules/... where Joomla is installed in yoursite directory.


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