Jump to content

Vineet Sawant

Members
  • Posts

    217
  • Joined

  • Last visited

Everything posted by Vineet Sawant

  1. I don't think it works that way if the user_city custom_field is not a pagefield. I'm using a select field type for storing city list, not cities pagefield which I was using for theatres. I completely agree with that. Thus, I think just like you, having a custom setup would be better. I might need your help in setting up a custom login/registration & profile editing set up. But I'll start by trying it on my own, if I feel I just can't do it, I hope you'll be there to help me out. I really do appreciate your help a lot. Thanks again.
  2. Hello Adrian, The problem was, I wanted the cities to be displayed like 'New York', rather than 'new-york'. With $user->user_city, initially I was only getting the array's index value(I guess that's what its called), like 2. In the backend, user_city was a select box using input like 1:=New York, 2:=Toronto, etc. So I used soma's advice on some other thread and tried to get the name of the city instead of the array index. The real problem I'm facing is, every time I add a custom field to user, such as user_city, I need to modify FrontendUserProfiles module to make it available to users and also to allow users to be able to add & update their city. The reason is, I'm completely dependent on the module which somehow I feel is making it less flexible for me to do any kind of modifications to user related data. I'm starting over with user management. I will be creating users through PW's core user module and will link a page to every user, this page can have all the rest of information such as user's city. Thus I can easily add the "cities" pagefield which we created, to user's profile. This way, cities available for users to select will be exactly the ones that are available for theatres. This will also help if in future we'r going to add more cities. So I guess that'll solve all my current problems would be solved. Thanks a lot for your help.
  3. Hello Adrian, I got the dropdown to select the currently selected city, as you had suggested. Following is the code I used: echo '<option value="'.$city->name.'"' .($session->current_city == $city->name ? 'selected': '' ).'>'.$city->title.'</option>'; There's just a little modification to the code you had given. Can you please check the following code for me and tell me if I'm doing it right way? $options = $fields->user_city->getInputfield($user)->getOptions(); $u_city = $options[$user->user_city]; $cities = $pages->get('name=cities')->children(); if($input->get->selected_city){ $session->current_city = $input->get->selected_city; } else{ if($user->isLoggedin()) { $session->current_city = $u_city; } }; echo "<form><select onchange='this.form.submit()' name='selected_city'><option> </option>"; foreach ($cities as $city) { echo '<option value="'.$city->name.'"' .($session->current_city == $city->title ? 'selected': '' ).'>'.$city->title.'</option>'; } echo "</select></form>"; Now when a user logs in, the select box correctly select's his/her default city. But it doesn't show the selected city if user changes it. I know for it to work, the $current_city variable must get value of the option tag not the name. How do I get the value? Sorry, I know I'm asking too much from you :\ Thanks for your help.
  4. hey, I tried to implement above code but it gives me error: Fatal error: Exception: Unknown Selector operator: '=$' -- was your selector value properly escaped? Here's my code for theatres list page called as theatres. echo "<ul class='theatres_list row'>"; foreach($page->children('theatre_city=$session->current_city') as $child){ ... } echo "</ul>"; But if I manually add city name instead of $session->current_city, it works. What am I doing wrong? or is it like selectors do not take values from variables?
  5. That's a nice suggestion but the cities will be only a few in the beginning as we'r allowing only a few selected theatres on this site. At most there will be only 7 cities. But still having add new button will be helpful in future. Thanks once again, I really appreciate your help, before posting the question I spent over 3hours trying to come up with a solution but couldn't do anything. I didn't even consider sessions.
  6. Ah, that's right, I can make a cities page and list cities under it as children. I never gave cities so much importance so I ended up just keeping a text field for Theatre's city. Will do as you suggested, the picture is quiet clear now, thanks a lot Adrian.
  7. Alright, so I have a dumb question, selected_city is the select bid that holds the city list I suppose, right? On which page template do I add this custom select field?
  8. Thanks Adrian, that sounds like a good solution. I'll need to learn processing forms
  9. Hello all, I'm working on a project where the content of the website will change location wise. Content is basically the list of local theatres. If someone from New York visits the site, he/she can select city as NY and Broadway theatre will be shown first in the list. Also, since users have their accounts set up already, I want to make sure by default they are shown the content of their city, but they can change city anytime by using the select box fixed on top. I know this would be easier once I figure out how do I sort the content. What I've thought so far is, I can maintain a variable, something like a global variable called as $current_city. By default, it'll be like $current_city = $user->user_city. But when user selects other city, the $current_city variable should take the selected value. Thanks for your time.
  10. Thanks guys, simple grid looks like a nice grid to me.
  11. Very nice site, love it. Can you, if you don't mind, tell me which CSS framework are you using? Looks great.
  12. That's by far my most favorite website made with ProcessWire, really good job!
  13. Great job, I love the design & the weather widget is very beautiful.
  14. Ah, forgot to mention, that there's also a way to add team members which are displayed on the Company page. Since right now, team's photos are not available, I've kept the team section hidden. I am hoping to unveil it soon (provided the photographer shows up soon). Later on, I'm planning on adding a way for team members to log in & maintain their own bio page on the site. This page will act like a social profile for team members. Also, there will be a private section for each user to log into & maintain his/her task sheet on daily/weekly basis. This will help us in tracking individual & project progress. The reason behind thinking all this is, just because I know ProcessWire allows me to do all this. I'm gonna do it cause I can do it And also, it'll be very helpful for the upper management. Hope you guys ain't bored.
  15. Hello All, So we redesigned our company website (finally!!!) that was under redesigning for over a year. And I'm very excited to present it here. My initial (very firm) decision was to make the new site using Textpattern as it fulfilled almost all our requirements and developing a site using Textpattern would have only taken a day or two for me. But ever since I've found ProcessWire, I can't think of using Textpattern anymore. It's like cheating on your wife for a new girl you met just a while ago who's slimmer, sexier, fulfills all your demands & most importantly, never restricts you from doing anything that you wish, unlike your wife who has already set rules & restrictions. Not that I'm criticizing Textpattern in any way, it's a great reliable CMS which is easy to use & customize, but like I said, PW's making me cheat on Textpattern. Coming back to real topic, here I present our website: www.adveti.com This is the very first PW site made by me that's gone live, few more are in queue. About the site, it's a responsive mobile friendly website, for that we use a tiny CSS framework which I had made a while ago, we call it Tiny Grid. It's still under construction. We've to upload many of our projects. Just to get the site launched, I've added only about 6 projects that we did recently. There's a lot more work to be uploaded. It's a very simple & basic site which mainly focuses on displaying our work, so we've tried to keep as simple as possible, minimal you can say! FormTemplateProcessor module proved to be very useful in making project planner which helps in providing clients rough estimate of the project cost, thanks to Ryan for that. So I'd love to hear your feedback, if you like it, hate it, have suggestions,everything & everyone's welcome. Thank you all, and sorry for the long post
  16. Yes, I believe too, if the community's going to being so awesome & helpful, I'm pretty sure, it'll happen very soon! Thanks again.
  17. Umm... about that, wanting something modular, could you kindly explain me when it's better to have a module rather than using raw code? I'm a bit slow when it comes to coding so please bear with me
  18. Hi kongondo That's some really cool stuff you've got there Thanks for clearing my doubt now I finally understood how it works. It's just amazing I'll now be playing around with it a bit & let you know if I could achieve what I wanted. Thanks again.
  19. Hello Matthew, I'm glad that you are working on a similar project. While conceptually it's very clear to me that PW can make & run a good social network, due to my other projects I've not been able to actually work on Social Networking project. But I'm working on a project that allows users to buy drama tickets online, which for a designer guy like me, is a big task. This project has helped to understand PW better and made me confident. I'm hoping to start the social networking project soon, I will keep this post updated with my learnings & experience. For now, I can share my user registration & management experience, if you need it. Also I can discuss the logic I've built for my social networking project. I hope this help. Thanks for your interest. Vineet
  20. Hi kongondo, Thanks for the reply. It really looks like a very good option to do what I'm looking to. One question though, do I need to create a page, lets say, shows(which will be seen in main navigation in admin panel) and then create a child page of it to use PW's variables on it? Thanks a lot.
  21. Hi onjegolders, That was the initial thought but I want to filter some rows from the seat chart which will be manually selected to be kept reserved from the end users. This can only be done from backend I suppose. Even if just for instance it was okay to do it from frontend, idk how exactly to do that? Can you please tell me in brief? Thanks for your reply.
  22. Hello, I need to customize admin panel for special requirements. Basically I've a theatre seat chart which is being generated by repeater field which adds rows to seat chart. Every theatre has a seat chart which is unique. Right now, I can display seat chart of any theatre by simply using theatre's id to pull the seat chart. But my requirement is that this seat chart for each theatre should be visible on the admin side so that I can perform further operations on it as a superuser before making it publicly visible. I understand that perhaps I'll need to add a page to admin side but I'd like to know if this is the right way or what other proper way can be to accomplish the given requirement. Thank you all.
  23. India on 5th position? It's good to know that indians are also using it but I see a very few(almost none) of them here. Anyways, considering the quality of indian market, they sure do need a better system like ProcessWire to build better websites. *sigh*
  24. Ah, so we're discussing music, that's cool. Following is my list of programming music: Led Zeppelin (All of their songs, nothing gets better than Zeppelins) AC/DC, Queen Some Classic Blues rock from 50s & 60s Some songs from The Eagles, Pink Floyd, Jose Feliciano, Bill Withers, The Cranberries, Louis Armstrong, Hall and Oates, Lionel Richie, The Mamas & The Papas, etc. The Beatles (occasionally) The Smiths Adele (late nights sometimes) Avril Lavigne (occasionally)
×
×
  • Create New...