Joomla Standalone Script in PHP - Handshake - joomla

I want to grab the User Object in Joomla in another PHP script.
Anway, what I want to do is grab the Joomla User (JUser) on a non-Joomla page. More or less I want a way to grab the joomla username, email and name etc and throw it to a php script for use in another custom application.
What is the best way to do this? Make a specialized joomla page by importing the framework, grabbing the necessary info from the user, setting those as session variables and then redirecting to the PHP page I want to use that information in?
Or do I just make some sort of link on a Joomla page with querystring variables corresponding to the current User and when they click the link I grab the info from the Querystring?
I'm looking for a best case scenario of how to get the User info to a custom application.
Any insight would be appreciated.

Best way would be to create a User plugin that logs into your script when someone logs into Joomla: Joomla unified logins for forum and a custom made php sub-site

depends on what you want the data for.
the juser data is serialised and stored in the session, so you could reverse engineer that and pull out the juser data... That would be messy.
alternatively you could make a plugin that stores the juser data in a session variable of your own making. the session variable will be available to other php scripts.. asuming they use the same session methods. (joomla has its own)
you could make a plugin that stores the data in a database that is assessible to the other script, or a flat file etc. in essence a similar process to using a session
You could also load up enough of joomla to use the joomla functions that you need to retrieve the juser values.. (messy)

Related

How to load content from another Joomla database

I have two Joomla websites of related organisations: J1 and J2.
How can I load the content and title of an article which is stored in J2 to show in J1?
I can access configuration.php of J2 and get its database connection details or type it myself.
Also this probably would have to be some kind of plug-in where one just type:
{getExternalArticle=id} within the body of any content in J1.
Any suggestions for the best approach?
See this for reference:
http://docs.joomla.org/Connecting_to_an_external_database
Creating a content plugin:
http://docs.joomla.org/J1.5:Creating_a_content_plugin
This is specific to the old Joomla 1.5 and there are a few differences in 2.5 and the above is the use of JFields instead of JParameters in xml declaration and in the name of the events.
You can see more details on this here:
http://www.inmotionhosting.com/support/edu/joomla-25/create-plugin
This might be useful too:
How to get article text by article ID in Joomla?
You might want considered writing a program (perhaps in PHP) that could run as a CRON job and with authorization credentials to access the MySQL TABLE(s) needed from the other site to pull in those Joomla articles and have it populate the website so it could be displayed properly. I am making an assumption that one website has updates and you want them display on the other website, so I would look as a method for one site to feed another.

membership website codeigniter

i am newbie here in codeigniter. i was asked to build a-dooid-like-site or a-aboutme-like-site for my local college so they can make their own identity card. i plan building this website using codeigniter since i heard codeigniter is the most easy to understand and i dont have more than 2 weeks to complete the task.
my questions is :
if the dooid build up with codeigniter, how could i make a function
that allows people choosing their direct url. i mean, if i have a
class "User" and there is a "show" method that need
"username" as a parameter. the URL should seems like this one:
www.Mysite.com/User/show/<username>
how could they make a their own url like this one:
www.Mysite.com/<username>
i plan to restrict some "method" guest and it will
be enabled when user login into site. i mean if i have a class
"user" there is a "edit_profiles" method. guest can see the
"show" method but logged in users will be able to
"edit_profiles" after login. on the same class.
can you tell me how the codeigniter session library class concept? i confused with native session php. is there anybody that can show me some links contains session class tutorial that stores session into databases?
Yes this is possible, look into the documentation for custom routes:
http://codeigniter.com/user_guide/general/routing.html
For access control it is simplest to use a prebuilt login library
such as ionauth or tankauth both or which provide the
features you'll require.
The sessions used by CI do not use PHP native sessions. The best guide is in the dosumentation: http://codeigniter.com/user_guide/libraries/sessions.html Where the data is stored is determined by the sessions in the config file and is described in the documentation.

joomla integrating external php signup form

I have a joomla website.here is the link
link for siteI want to integrate a external php signup and login form.I create a php signup form.It works perfecly.
signup linkBut the problem is i dont know how to integrate that form to my joomla web pages...I want to secure my web pages..Only registered users can view my page....please help me..
Why have you create your own register form? Joomla already has the one. To see it follow the link index.php?option=com_user&task=register, Login for there index.php?option=com_user&task=login. If you need more fields to be filled out during registation you may you Community Builder. This extention allows to add to user profie as many fields as you want
It is also possible to use Chronoforms to allow for registration that brings in multiple fields as well without having to bring in an external file for registration/login.
Using the tools Joomla has to stay within Joomla is really the best way to go about it. It will allow you to keep your sanity and keep things as uniformed as possible.

show specific content for each registered user in joomla 1.6

I am looking for a module/extension, or something that can help me to
make a page/item that only one specific user registered can see.
I would like also create a space dedicated to this user, where i can publish there pages and aticles.
Maybe using php and the variable that contains the username and an iframe, but I dont know how to doit.
Thank for the help
GMAccess is a Joomla! component that makes managing groups and access permissions easy, you will be able to create a special group and add your user (via Joomla's user management) to it and manage which pages can be viewed by that group.

Joomla module/component for table administration

My client's website runs on Joomla and they would like me to add some custom functionality to the site.
It is a quotation system, so they will just need to be able to update the values that are used to caluclate the quote. So there would only need to be 4 parts to this:
Settings page in the admin section
Database table that stores the settings
Front end form
PHP script to process the form / query the database table
If I was not using a CMS I could easily accomplish this task but my client would like this system to be integrated with Joomla. Can anyone advise how I should approach this?
You should be able to accomplish this easily with Chronoforms and Chrono Connectivity from Chrono Engine. Use the Chronoforms to create the forms that access the data and Connectivity to display and edit the data.
Forms - http://extensions.joomla.org/extensions/contacts-and-feedback/forms/1508
Connectivity - http://extensions.joomla.org/extensions/directory-a-documentation/faq/5661
Try the Joomla Component Creator it will allow you to get started writing your logic.

Resources