I have a simple question.
What is the mechanism of URL parameter passing?
Is it the same with GET method?
I am using
JRequest::getVar()
It could get the parameters from the URL, I am wondering how it works.
Thank you.
JRequest::getVar() and the rest of the JRequest ilk was the Joomla 1.5 (and earlier) way of getting GET and POST values, in Joomla! 2.5 and newer, JRequest has been superseded by JInput.
If you're working on a Joomla 1.5 or earlier site you can read about JRequest on the Joomla Doc's website. Basically JRequest provides combined and consistent access to the superglobal arrays $_GET, $_POST and $_REQUEST while providing you with tools to filter the user provided values.
If you're working on Joomla 2.5 or later you should use JInput which supersedes it.
Related
So, I've just built my website authentication system using laravel fortify, however, I'm finding a problem on how to implement the remember me option. I could use some help. if there's a built-in method in fortify it would be even better.
I am using laravel 8 and fortify 1.6
According to this issue https://github.com/laravel/fortify/issues/17
Taylor suggests that you shouldn't use the Auth::attempt method in Fortify::authenticateUsing method as it will essentially be logging in twice.
You should use Auth::validate.
Btw, if you have an input (checkbox) named "remember" it will still be passed along.
Hope this helps someone, because I spent hours trying to get to the bottom of how to use remember with Fortify::authenticateUsing.
So, after surfing in the whole fortify assets xD, I found that it accepts a second parameter in the attempt method which is rememberMe option as a "remember" post data name. So u just have to set the remember me checkbox name to "remember" and its gonna work like magic.
Requirments: I can't use components and ajax interface (joomla com).
My goal: Send POST data from default.php (mod_x) to helper.php (mod_x). Data is checked checkboxes - using ajax.
How to do this?
I know there has to be a method, to do this directly (can someone give me an example), by removing (I know its security risk, but there has to be a way to secure it by hacking joomla)
defined('_JEXEC') or die('Restricted access');
Is there some way to give a module task - just like you can do using component (controller)? I can't use component myself. How would this be done? Please be explicit.
Is there any other possible way? There has to be... I'm ready for some serious brain-storm. Let's get creative, guys.
P.S. To sum it up, I try to find some creative way to not use components, just module to do ajax call from default.php (ajax runs on checked checkbox/s)
I would prefer also an example in code. Thank you!
Fron Joomla 3.2 if you needed to make an AJAX request in Joomla! from a custom module or plugin, you can build the URL as below.
index.php?option=com_ajax&module=your_module_name&method=YourMethodName&format=json
Explanation of each parameter
1. index.php?option=com_ajax : ALL requests must be routed through com_ajax.
2. module=your_module_name: The first part of this is the type of extension you're using. This can either be 'module' or 'plugin'. The second part is the name of the extension. please take care you're not including the prefix 'mod_' or 'plg_', just the name.
3. method=YourMethodName: This is the method name that you are trying to call. If you're using this in a module then the method must be appended with 'Ajax'. So, the method represented here will be YourMethodNameAjax. If you're using this on a plugin, the method must be prepended with 'onAjax'. So, the method represented here will be onAjaxYourMethodName.
Check more at Joomla doc
I noticed in Grails 2.4 documentation (http://grails.org/doc/latest/ref/Tags/remoteLink.html), it mentioned the remoteLink tag is now deprecated.
But I don't understand the second part of the warning:
"Applications may provide their own Ajax tags and/or Javascript plugins may provide Ajax tags of their own".
So it will be simply removed so we shouldn't use it at all? What is the replacement for that?
Thanks.
Basically, they're removing the tags because they don't add much value, and instead contribute to bad design patterns - they're too low level. It's usually best to play within whatever Javascript frameworks you're using, and make higher level tags that make the AJAX calls for a purpose, rather than having a Grails tag JUST for making an AJAX call.
https://groups.google.com/forum/#!topic/grails-dev-discuss/IXvqDUr6CIE
https://groups.google.com/forum/#!topic/grails-dev-discuss/4yesijtFSB4
I have a page that displays different content based on a parameter in the querystring. At the moment I have caching disabled on the page. Is there a way to make Typo3 cache a version for each different URL accessing the page (or each combination of querystring params)?
This happens if you do not use the API:
http://typo3.org/documentation/article/the-mysteries-of-chash-1
Always create your link with typolink.
Since 6.x you can configure some required parameters in the install tool.
I've written a few joomla components but feel like I could write them better and more efficient. I was hoping someone can recommend me an example I can download which follows mvc and is written well .and I'm not talking hello world, something with many features. joomla 1.5 only
com_weblinks in default Joomla! 1.5 installation is the only component which is fully written with Joomla 1.5 MVC.
I suggest you to look at it when you're writing a new component - that's what i do.
Have you followed the tutorial at joomla docs? I know it's a "helloworld" example, but it shows how to implement a model using the database, the controller, and the view. I think it's a good point to start.
http://docs.joomla.org/Tutorial:Developing_a_Model-View-Controller_Component_-_Part_1