I need to create a new page for each user on signup so when you go to the site's explore page and click on someone's name or picture, it will take you to their specific page and display their data. (database is firebase firestore and firebase storage, saved link to each person's doc)
This is one of the issues I've been trying to fix for about a month(just fixed the explore page issue and got everyone profile pic to display with that individual user's name right below). I have tried making a new html page with someone's php and js script (didn't work, not familiar with php) and url rewriting.
I haven't been able to find anything else concrete or at least something else to point me in the right direction. Any pointers or tips?
(Vanilla/node.js)
With PHP, on clicking a persons username you can add the username as a parameter to the url e.g yoursite.com?user=personsusername then use GET method to retrieve the username and output data relating to that username from the database
Related
I'm developing a review site.
I'm attempting to show a poster's displayName and photo, which means whatever people login in or not, any guys can see the poster's displayName and photo. The poster first log in and then post a review. other guys can see the post content, the poster's displayName, and photo url. How can you achieve it with Firebase Auth and Firestore?
I know that I can do it by using getUser or getUsers function from this ticket.
How to retrieve another user's info like email and displayName in Firebase?
However, those functions seems to be for admin so it's not good to use it in the above case due to security issue.
Any advice?
Firebase admin SDK is only to use on server side. If you want to have a poster display name and photo, just add it to a post he creates or create a collection with a poster's information in it. So when you get a post with owner uid you can again fetch data with poster information.
I recommend having first option because it needs just one read for users to make. And like I said in comment if user change some think you can find all his posts and change his display name or photo there. Feel less reliable, but in reality you don't want to have 50k reads instead of 25k out of poster 5 posts.
I'm developing a REST API with Wordpress. I had to develop a new one myself, ignoring the Gravatar method. Currently, users can upload images. But I have to somehow merge the avatar path with the user's data.
I need user_avatar field like user_login, user_nicename, user_url. I know, I can hide the path of the avatar file with the wp_usermeta of the user.
But I need to do more queries to get this information. To bypass this situation, I need to combine the relevant avatar path with the user's information. When I use the get_user() or get_users() methods, I want to see the user_avatar field in them.
Can I set this flow to appear in every query without breaking the database structure? Or do you have a better suggestion for it?
this is my first time posting on StackOverflow but this site is awesome. Thanks in advance for any help you're able to give.
I have a site which gives users access to different pages based on their permissions so each user needs to have their menu dynamically generated when they log in. However, a user's options probably won't be changing very often.
The site currently has a Master page which pulls a list of their pages from the database and builds a menu. It does this each time the user loads a page.
I wanted to cut down on calls to the database so started putting the menu data into a Session variable. I was hoping someone more experienced could help me out in making sure that this is the best way to do it. I think I would prefer a way to store it on the user's machine and not the server.
I have this is my Master's Page Load:
User u = new User(Page.User.Identity.Name, Globals.getCnString());
DataTable menu;
if(Session["MENU"] == null)
{
Session["MENU"] = u.getMenu();
}
menu = (DataTable)Session["MENU"];
foreach (DataRow r in menu.Rows)
{
//build menu code here.
}
Thanks again!
If user's options won't be changing very often, why don't you build the menu only when the change happened, save it in user's profile table (in html format), and pass it to a literal control in the Master page instead of the menu, in that way you'll not store it on the user's machine(which is not recommended for a website).
Create an XML file with the list of URLs. For each URL element, add an attribute for permissions and base the visibility of each link on that.
I've created a view (Drupal 6) that gets put on the users profile page.
The view is supposed to list all the images that the user has uploaded. However, the view is showing every uploaded image by all users.
(When a user uploads an image, it first gets approved by me, and then posted by me and displayed on the homepage with a credit to them and a link to their user profile -- so they are not the "author" of the post, I always am.)
How can I limit the photos displaying on their user profile to just show the images uploaded by that particular user?
Thank you.
Use arguments handling: add argument - User ID, check "if argument not provided" and select php code: return arg(1); // if views shown as block and you want to show it in user profile, path will like user/UID, so arg(1) return UID.
2Ted: hello Ted! php code will absolutely secured, if you will check it, for example via is_numeric() function. Also users cann't get any images, becuase Views wil use Block display, and you cann't provide for this arguments directly.
2user967969: Additionally about approving: You can create second field, where you will store user profile UID. So for my above text you should use this field for argument handling, instead of user uid.
first time here. I have searched all day for my particular issue with no luck.
I have users that have specific roles auto generated (they purchase a game). I want to display files available to their particular role on their user profile page. I just want to know how I can add a generic view or associate a panel with user profile pages. I want this to display for every user, not on a per user basis. Basically it'll act like, say, direct2drive, you log in and go to your user profile basically and see what games you bought. Seems simple but I am having a heck of a time figuring out how to do this.
I am pretty used to using views but I just don't get how to edit the user profiles like I want to.
Thanks!
The simplest way is to install views_attach, and create a view with a Profile display. This displays the View on the user profile pages, rather than on its own page or in a block, and will pass the user's uid to the View as an argument.
Alternatively, if you're already using comfortable using panels, you can go to admin/build/panels and enable the Users panel. This replaces the user profile page with a panel, which you can add views, nodes and blocks to as normal.