I need to display user profiles in Joomla 1.6.
Is there a default way to do that (url based with user id) or do I need to install an Extension or Plugin?
I hope it to be something like that: index.php?option=com_users&user_id=42
The question is not much about programming, but maybe someone can give me a hint :)
Thanks for looking at the question.
This may help: http://docs.joomla.org/Creating_a_profile_plugin
The proper way to do it is to create a profile plugin, and enable the "User - Contact Creator". As well, configure the contacts component to "show profile"
This way, your user profiles appear in a contact - which can be listed. Additionally, the Joomla router gives it a pretty address which includes the name of the user:
http://www.yoursite.com/users/3-michael-richey.html
The id prepended to the name in the URL isn't the user id, but the contact id. So it adds some security in that the actual user id isn't revealed in the URL.
Other things, of course, must be done to achieve an adequate level of pretty in the output - but this is the way to start without altering the core.
Related
first post here.
I am making a site for someone who wants to embed their own youtube links. I am relatively new to web development and this is my first commission so I was wondering how I could hand over the site to the client and allow them to upload their links without me having to edit the mark up for him.
I understand how to use an '<iframe' youtube link in HTML to embed videos and am considering creating a database using PHPmyadmin that uses a form that the client can fill in with the iframe link whenever he needs to embed a new video.
I understand if that sounds like a convoluted way of doing this but if anyone knows a more intuitive way to solve this issue please let me know :)
I think it can be done using a database, may be MySQL, to keep it simple and a simple backend programming language, PHP would do.
You create an admin page just to collect the URLs from the admin. A nice little login page which stores admin username and password in a table. And you can use this module to assign roles to admin, add an admin or delete one.
Inside the module created above, create a page with a form to fetch and store URLs in the database. If you are going to categorize the videos, use suitable columns. Say you are going to categorize based on the genre and length, the table in your database should contain genre and length so that you can use them as filters later on.
Use cookies to create session for the admin. This is to avoid redirecting him to the login page after every single reload.
For all other user who is not admin, do not redirect to the admin page. Redirect them to a common page where they can search and enjoy the videos that the admin has added.
Again, like mentioned in many comments above, wordpress does it all. You have an option to use it too, it's free.
Is it possible to update the content of a website (add Item, remove Item, update Infos, etc...) directly from the webpage?
For example, you have a webpage and you make a new page in it, that only the admin can access. That page should contain some options that allow the admin to change/update contents on the actual website(what people can see) easily.
(Without the admin having to write new HTML or PHP code...)
I heard something about Joomla or Wordpress but I don't really know how they work.
Thank you.
Basicaly, joomla has some fonctionnalities to edit content by the frontoffice. Of course, the user need to be logged and access levels need to be well managed. You should to try it with a basic installation and see if it's coherent with respect to that you looking for.
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.
Hey guys hope all is good and here's my question: When you click on a Facebook profile the address bar shows the URI named after the account's owner, for example:
Name: John Smith
Facebook URI: facebook.com/john.smith
The question is, how is this achieved to dynamically name a page based on the name of each user. I do not believe Facebook would make a directory named after each user and then add the same html, css, scripts etc in every directory... So if I decided to make a member's page in PHP how would I go about naming it depending on the user's name?
All constructive answers welcome and have a nice day.
If you have used any frameworks before, you'd be familiar with the concept of routing.
I will give you a rough idea which can be reproduced in any framework. There is an assumption that I will make: You have a table which is storing the user's details and it has a field for the custom URL slug.
Now the logic:
Let's say you have a route configured like website.com/user/mr.xyz.
This means that the route for user/query will be set to a controller like User(query).
Now, you check the query value and see if it is present in your database with the customized URL field.
If it matches, then you load that user's profile.
Update
You should see how routes work in Laravel. If you are not aware of frameworks, then you should learn one to understand how these things work.
This is usually acheived through a rewrite module such as apache's mod_rewrite.
This internally changes (rewrites) the url from domain.com/profilename to something like domain.com/profile.php?profile=profilename. You can then access the query parameter using $_GET['profile']. This is actually a feature of apache and not PHP.
The rewrite happens on the server so the browser will still display the friendly url to the user.
Here is a more in-depth article/tutorial.
http://net.tutsplus.com/tutorials/other/a-deeper-look-at-mod_rewrite-for-apache/?search_index=13
Good luck
I am new to Joomla, I am currently trying to set up a information portal for a university which will have information regarding all the faculty members. The information to be displayed would have information like Subjects they teach, total experience, phone number, email id, address, etc etc.
Normal way to deal with this to write a new article about each faculty member.
But I want this to be more dynamic. I dont like the idea to create a new article for each faculty. I am looking for a way that all the information(subjects, email, phone, etc) should be stored in database and while displaying all information should be fetched from the database itself and should be displayed in a preformated way.
Please let me know if anyone is having any idea regarding this..Many Thanks in advance
I'd use a CCK plugin like K2 and add and Extra Field Group, like this ... that way it could be added in the admin. Done what you're doing with many types of content this way.
UPDATE: Just remembered this great little component called joodatabase
You can create a module, or use one from the Joomla extension directory (You're looking for a directory module). A module in Joomla will allow you to access the data stored in the database.
http://extensions.joomla.org/search?q=directory
You can include an external PHP Script in your article and let the php script handle the data based on the query string paramerter(may be like faculty id or something). In order to do that you will need to install a module. http://extensions.joomla.org/extensions/edition/custom-code-in-content/60. Using this module you should be able to include a php script within the article.
Old thread but still a hot topic
I think Dynamic Articles with TinyButStrong would solve this problem
https://www.tinybutstrong.com/plugins/joomla/tinybutstrong_help.html
For example adding Tag or Search Parameter into content if no article exist.
Place for much more phantasy