On one of the sites i need to do some changes on for a client i am having trouble finding something.
On the standard Joomla 3 registration system a custom field was added to the form, but that form does not email to the admin when someone registers, please can someone point me in the correct direction on where i can make that field be sent in the email.
I have looks on quite a few pages on the net but have not come right with any of the answers that i found. I have also tried going to most of the php files to see if i cant find something but i am not having much luck.
Unfortunately that email is hard coded; it is really a legacy from Joomla 1.0. What you would probably want to do is turn off the core notification system and instead use a plugin that would be triggered with the onUserAfterSave event and use similar code to what is in the core. You will find that in the activate($token) method in the frontend registration model for com_users.
The plugins/user/joomla plugin gives an example of how to build an email, bit in your case you would want to build it when the user is created in the site application (isSite() == true). You can also look at the contactcreator plugin in the same folder; it also uses the onUserAfterSave event.
Related
I have contact form 7, form in my Wordpress site.
I want when form is submitted (and mail has sent) to pass via post method, the data to onother PHP file. In my last PHP file I have code to send form's data to a CRM system.
I have searched over the internet for a solution. Some people say its easy some other not. But at the end there isn't any example on how to do that.
Also I did not found anything in CF7 documentation.
What I found is hook and actions.
The only logical solution I found is that in this link .
But I don't understand where to put the code and how to call it.
The best way is to create a custom Plugin. Then you can add the code listed in your link to your Plugin code.
A guide to Plugin development can be found here. A good Plugin template to get you started can be downloaded from here.
I currently have a MySQL database from my old site that used to have a basic PHP log-in form and it would query a table containing the user information to log them in. Basic stuff. However I've recently moved to WordPress and it appears to be quite overwhelming at first, so I'm struggling to understand how to integrate my old log-in form with a WordPress site.
I have tried looking at this post:
Wordpress login system and I am still confused. I understand the 'loop' is responsible for displaying multiple 'Posts' on a single page. But to integrate my own PHP code or more specifically; a log-in page, would I make a logged-in 'Post' and a not-logged-in 'Post', and perhaps use a template to display one or the other for a single page via a 'Loop' that uses an if statement to check if the user is logged in?
Or is there some easier method that I'm completely missing?
Thanks!
EDIT: I've thought about creating two pages, both using a template to check if the user is logged in at the top, and display relevant content if they are, or redirect to the log-in page if they aren't. Would this work?
The other possible method I could think of is creating two Posts and displaying the relevant one on a single Page via The Loop. Would this be possible? Are there any security concerns?
EDIT2: I'm going to try the Members plugin and see if I can modify the WordPress MySQL tables to allow room for my previous data.
EDIT3: I need to sync my user logins to our external database as it contains flags to check whether my members are able to access our 'support' pages. I'm not sure how this would be viable while relying on the normal WordPress login system and tables.
Keep it simple stupid.
The point of WordPress is to make things easier. So if you want to go with WP, you should adopt the WP way of doing things.
As comments has suggested, import your current user table into WP. Should be simple enough to change the columns around to get a working import directly into the WP users table.
If there is extra information in your current user table, simple create new fields in the User Profile section of WP. There should be plugins for this (although I have not tried any), but it is quite simple to add these fields yourself, just google for it, there are many tutorials.
For a frontend page to be accessed by only logged in users, simple create a page template and check if user is logged in with is_user_logged_in().
For the access part (Support Pages), either create different user roles and check that the currently logged in user is of the correct role. Or you could also add a custom user capability and validate it on your support pages.
Based on the very general details you have given there is no 'easier method' you are missing. We can't help you form the requirements of your application, but we can help with code if you paste examples of the code you are using, what you are trying to achieve, and what is going wrong with it. Pick one thing, try it out, and if it doesn't work and you get stuck then post it here.
I've been assigned to create a captcha verification for a custom component in joomla, but I'm stuck at how to do it properly.
I'm aware of the fact that there are many captcha plugins like recaptcha available but I am required to use a custom captcha created by the company.
It saves the image text in a session and creates the image in a component so calling index.php?option=com_captcha directly in the browser will output a captcha image.
The problem is that I'm completely new to joomla and can't seem to find a proper way to create code that could be reused through out the system. I tried to do this by creating a module that would call the captcha component, then do the logic and check if captcha was correct.
The problem I faced with doing this was the fact that I couldn't find a way to pass variables to my module, thus I couldn't pass the session variable that's required by captcha component.
I've looked at plugins but I'm not sure that you can call a plugin directly from a component.
I'm currently stumped and got no ideas which direction to go to and what to search for. Any help will be appreciated, thanks.
You don't mention your Joomla! version but if it's 1.6+ why not use a captcha plugin?
Then any third party extension can use it automatically if you set it as the sites default captcha mechanism.
Plugins are also a lot easier to write than a component... captcha plugins only have a few required methods — onInit($id), onDisplay($name, $id, $class) and onCheckAnswer($code)
I'm trying to integrate a form like this into Wordpress
This form works perfectly with the PayPal API sandbox. However, when I tried to move this work over to the WP site of my organization, globalcitizenyear.org/donate/donation-form-2/, I keep coming up short.
Anyone have any tips to keep in mind when doing this? What steps would you take first to make this happen in Wordpress - any details on what to avoid, or what potential hangups might be?
Make a page called page-donation-form-2.php and load this code into it. You can leave in the get_header() and get_footer() tags if you want to have the site wrapper around the outside.
Make sure to change your form action also. And remember, that since this is in WordPress now, you will need to avoid some reserved form elements. Full list here.
If you have any trouble, please post your code here.
Hey, I'm quite new to Drupal and am having some issues with implementing a node form on the front page of the site.
I want to have a really simple quick post form on the users front page when they are logged in, just a few fields and a submit button, no advanced options or anything.
Is there a really simple way to do this by placing some php in the front-page.tpl.php file?
I think what you are looking for is http://drupal.org/project/webformblock. (also requires the webform module)
Create a region on the front page and just put this block in it. You can set options in the block to only appear on the front page.
Or you could just invoke the block directly in the tpl.php file.
http://drupal.org/node/26502
Yes and no. This is not the drupal way of doing things- although you COULD make it work this way.
If you are looking for a simple solution, try a module like webform and put it on the front page. You can do this by either creating a page and setting it as the front page (under site information in the admin menu), or by creating a block, putting it in the 'content top' region of your theme, and in the configure block setting it only to display on (a special keyword that means frontpage).
Hope this helps!
Chris.
If your login goes to the /user page you can use the webformblock module (http://drupal.org/project/webformblock) to configure a Webform to only show up on the "user" page under site building > blocks > configure (next the the webform block). You can also check the option there to only show the block for authenticated users or another role of your choice.
You do not want to create a form without going through Drupal's form API, as you lose a lot of security features and there are many tools out there already that make it easy to generate and maintain forms through the Drupal interface. As the above answers suggest, webform is the Drupal way to create quick forms. And I think you will love the interface.
http://drupal.org/project/webform
Thanks for all your help guys. I tried the webformblock module and whilst it did fit the bill, it required me to create a new content type (maybe I wasn't using it right?).
In the end, after searching I found the Form Block module http://drupal.org/project/formblock which fitted my needs perfectly. It can be configured for existing content types really easily.