Is it possible to create a hook when a user creates an account?
I have googled and found some stuff on hooks and joomla but nothing really concrete.
Anyone knows if this is possible? Or do I really have to mess with the code. I just want to create code that is upgrade safe.
Thanks
Yes, this is possible. You're going to write an user plugin based on user events for plugin system. From your question I believe you want onAfterStoreUser or onBeforeStoreUser event hooks. Check these provided links for official documentation with examples.
Related
I haven't found anyone asking this question yet although it seems like this should be a more commonly asked question.
Is there a way of selecting which action a plugin should use depending on the page?
If I go to example.com/news then the news plugin should use the listAction but if I go to example.com/clear the news plugin should be using the deleteAllAction. Is there a way to accomplish this? Or rather is there an easier way than using extbase routeEnhancers?
I guess the easiest way would be to register a new plugin with a different action but the same base.
need to delete or add fields in the registration form,Where can i handle this problem in the Joomla?
i Google this question and get some answers about mod_bt_login.php which is in module, but still can not handle this problem.
I would recommend using Community Builder
It allows you to add custom fields to your registration form and integrates with a lot of other extensions such as Kunena etc.
Do bare in mind that it's quite a heavy extension
Hope this helps
Profile plugin allows the addition of supplemental fields in the registration and profile forms of the com_user front end and in the user create/edit form in the back end.
A simple example plugin with the name User - Profile is included in the basic Joomla! installation as a proof of concept. Much more complex plugins are possible.
Ref: http://docs.joomla.org/Creating_a_profile_plugin
Example: http://www.inmotionhosting.com/support/edu/joomla-25/user-profile/front-end-form
The solution is good and lightweight, but of you need an easy way of managing these fields I'd recommend Lodder's answer or JomSocial, though both are quite heavy.
It's also good if you need to bundle the plugin with your own extension.
I know very little of WP aside form it being a CMS geared towards (or started from) blogging, but may people have found the product capable of functioning as their sites CMS.
I was recently asked to write a PHP app to signup, (with email confirm and email notification to admin), login to make and manage orders. - so a user can register and get an email confirmation... once they are approved, they can log in, and place an order. and manage their information. There is also an admin section to manage the users and requests... ALL very straight ahead.
So I write it - and test it and everything is fine... Until the client tells me that it's going to be part of a WP site.
Problem, the client ONLY knows HTML, NOT PHP... I don't know WP.
When I upload a directory to the root - and try to run the app, I get redirect to /$url .. and a page not found displaying in the WP theme.
I have a feeling it has to do with the AUTH module I'm using... but there is a huge BIG PICTURE issue I need to conquer - how to integrate an existing PHP app into a WP site...
Q: how do I reference and use the WP emailing system?
thx - I know it's a broad question. but if someone can point me into a direction...
I have read the post regarding templates in WP and setting up a template with PHP code so it's executed... but it seems 'wrong' to have to create a template for each php page.
What your app is about ? If you got only the Auth module already coded you should only import user and password because WP does this out-of-the-box.
Wordpress can be twist up for your need but you need to do it in the WP way :).
If you want to add some functions to it check out the plugin library on wordpress.org. If you know wordpress and no plugin match your needs then the best way to go is writing your own plugin : https://codex.wordpress.org/Writing_a_Plugin
Or maybe just add your custom functions into functions.php, see https://codex.wordpress.org/Theme_Development#Functions_File
For pages, you basically have to type of it in WP : articles - i.e. blog posts - and the static pages. You can add some custom one check https://codex.wordpress.org/Post_Types
I know this answer is more a bunch of links but if you don't nothing about WP you should first learn how it works before try to hack it.
Hope it helps !
Hey there. I'm currently learning how to write plugins for wordpress platform and I already know the basics. However, I need to invoke some function when a single article page (single.php) loads. Basically, I want to take that post ID and use it in my algorithm. I can't find any pre-defined action hook in wordpress framework so I thought I could write my very own one, but I don't know what's the mechanism for it. I read several guides on internet but still have no clue how it works. Can someone help me with this? Code examples are welcome.
You can start at the loop_start hook and check is_single() or whatever else you need to determine if you're being called from a singular page. I highly doubt you need to be creating new action hooks in the WordPress core for whatever you're doing.
I'm trying to create a custom version of WordPress and now I'm stucked with the plugins api...
Is there someone who can explain me how it works.
Thank you.
You could read the Developer Documentation of Wordpress, that's how everybody learns how to create plugins.
Start with this guide on writing your first plugin. Other than that, you should poke around existing plugins and see if you can follow all the API calls described here.
If you want more specific answers you should first start trying to develop something simple and come back when you hit a specific roadblock.