-
Posts
217 -
Joined
-
Last visited
Everything posted by Vineet Sawant
-
@Macrura Thanks for your reply. Yeah that's a nice idea, I hadn't thought about putting it in iPad till now.
- 24 replies
-
- processwire book
- ebook
-
(and 1 more)
Tagged with:
-
Hello all, I just spent 3 days without internet and I couldn't do much work on my ProcessWire project because I couldn't use the cheatsheet. I realized that there's a need to have PW's documentation in an ebook format including cheatsheet. So I've copy-pasted cheatsheet in a doc file & created a cheatsheet ebook for offline use. I'm posting it here so that others can also use it. Please let me know if doing this is wrong in anyway, I'll delete the files. Also note that there was no intention to make any kind of profit by using cheatsheet to make an ebook out of it. I hope this will help people like me when they're unable to access cheatsheet for any reason. Enjoy. EDIT: Attached file has been updated, as it wasn't readable on Mac and also wasn't very good looking. So I've updated it for better readability but I'm not sure if it still works on Mac, so someone needs to check it for me. Cheatsheet_1.1_v0.2.pdf
- 24 replies
-
- 9
-
- processwire book
- ebook
-
(and 1 more)
Tagged with:
-
@horst You are correct, if I had to multiple types of users, then it'd have needed more than just the role filter but for now (fortunately) my requirement is only for a certain type of user. So your suggestion solves my problem. Thanks.
- 7 replies
-
- comments by users
- permissions
-
(and 1 more)
Tagged with:
-
Thank you guys, my problem is solved. All I did was created a new permission called as "add-review" and added it to the user role called "registered". Using code given below, I checked if the current user has the permission to add review. For future reference of anyone like me, following is the code I used, pretty simple: echo "<div id='reviews'><h3>Viewer Reviews</h3>"; echo "<div class='CommentList'>"; foreach($page->drama_reviews as $comment) { if($comment->status < 1) continue; // skip unapproved or spam comments $cite = htmlentities($comment->cite); // make sure output is entity encoded $text = htmlentities($comment->text); $date = date('m/d/y g:ia', $comment->created); // format the date echo "<div class='CommentListItem'><p><strong>Posted by $cite on $date</strong><br />$text</p></div>"; } echo "</div>"; $perm_to = $permissions->get("name=add-reviews"); if($user->hasPermission($perm_to)){ echo $page->drama_reviews->renderForm(); }else{ echo "<h4 class='center-text'>You need to be logged in to write a review. Please <a href='{$config->urls->root}profile/login/'>Log In</a>.</h4>"; } echo "</div><!--#reviews-->"; Thanks to horst & andrian for help.
- 7 replies
-
- 3
-
- comments by users
- permissions
-
(and 1 more)
Tagged with:
-
@horst, thanks for your reply. I always have Cheatsheet open, it's like an ultimate map of processwire's world. This gives me a clue. May be I can add a new permission as "add-review" and link it to a role called "registered" and just check it with users. That should work, isn't it? That's what you are suggesting right? Will give it a try and let you know. Thanks again
- 7 replies
-
- comments by users
- permissions
-
(and 1 more)
Tagged with:
-
@Adrian Cool, that's a very simple & straightforward solution. I think it get's the job done, I'll implement that. Thanks a lot. Now I feel dumb, why I didn't think about that. But now that we're anyways talking about adding permissions to roles, I'd like to know how it can be done. Let's keep hunting for it.
- 7 replies
-
- 1
-
- comments by users
- permissions
-
(and 1 more)
Tagged with:
-
Hello All, This question is a part of my series of questions that I'm coming up with while building a drama ticket booking/selling website. So for today my question is, I want that only registered users should be able to review(comment) any drama. Others who wish to comment/review the drama should first signup and then add the comment. I've figured this is possible if I add a new permission such as add-review and link to a role (eg, in my case registered is a role). But, how exactly will the system know that add-review refers to adding comments? Which step am I missing here? Or is this not the way to do it? Please, I need some help here. Thank you all in advance.
- 7 replies
-
- comments by users
- permissions
-
(and 1 more)
Tagged with:
-
Storing User Purchase history using PW
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
@arjen, Thanks for your reply, really appreciate your help. Your advice seems like a good solution. Will try it and let you know. Thanks again- 3 replies
-
- user history
- purchase
-
(and 1 more)
Tagged with:
-
Hello All, I'm working on a Drama Ticket Booking website which I'm making using ProcessWire. The experience has been great. I'm almost done with the overall development of drama, theatre & shows management part, now moving on to users management. Users will need to login in order to place an order & buy tickets online. For this, I've used Front-end User Profiles. It's working well, getting the work done. Now that users can register & login, I want to store their purchase history which users can see whenever they want. I want that there should be someway users can see all the tickets they've purchased, and if the ticket is still valid, he/she can cancel the tickets as well. Since I'm not a php ninja, I'll need your help. Thanks in advance.
- 3 replies
-
- user history
- purchase
-
(and 1 more)
Tagged with:
-
Register users and add page same as username
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
@3finger, @onjegolders, Thanks both of you, I'll try reading the topics & using the given codes. Will keep you posted, I'm pretty sure I'm gonna have lots of questions. Thanks again, kind people like you guys make this community so great.- 30 replies
-
- 1
-
- login
- create page
-
(and 1 more)
Tagged with:
-
Hello all, I'm putting first bricks of the social network that I've decided to make using ProcessWire. But before I start I wish to (again) make it clear that I'm not a programmer, I'm more of a designer. I wanted to create this social network for over a year but the developers kept messing it up or charging too much so I decided to make it myself. So, I've decided to go step by step with this. It'll be like mini facebook. Every user will have his profile page as a unique page. Eg. http://example.com/vineet.sawant He/she would have several things to do like posting a 140 chars long status, posting a long post, share images & links etc. For that I've thought of PW's page structure as follows: Home - - Users(hidden page) - - vineet.sawant - - - - bio-page - - - - status - - - - posts - - - - images But for the first step, all I want to do is sign up user & dynamically create a page for him/her same as his/her username. I've already tried FrontendUserProfilesPW module but it gives some error. I wish to do this using default users api. Can anyone guide me on how can I do this? Also most importantly, how do I create page dynamically and add specific template to it? Thanks.
- 30 replies
-
- 1
-
- login
- create page
-
(and 1 more)
Tagged with:
-
[SOLVED] Field Data not updating after changes
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
Hello All, Thanks for your replies. I fixed the bug, it was causing due to wrong a mistake in code logic, I've fixed it now. Will write in detail what mistake I was doing and how I fixed it so that everyone can know. For now, the topic has been solved. Thanks again to all of you for your time. -
Hello All, I'm working on a website of online ticket booking system. There's a field called as show_start_time linked to show page. It's then connected to drama & theatre pages via page fields which use show page for displaying show details such as theatre name, show's time etc. But when I update the the show's start time, it doesn't update the data being displayed on the drama and theatre page. For example, There 3 pages: Drama Theatre Show Drama page has several fields including a page field called "drama_shows". It uses the Shows page as pagelist to select a show from the list. Same goes for Theatre page where "theatre_shows" field uses shows page as pagelist for displaying shows available in the theatre. Show page has a datetime field called as "show_start_time" & it has two page fields called as "show_drama" & "show_theatre" using dramas list page and theatres list page respectively. Now when I update a morning show connected to Show #1 playing Theatre ABC, it updates the start time on shows page but not on other pages. Can anyone tell me what's the problem? Thanks everyone in advance. P.S. The updated start time is visible on show page.
-
Hello, I'm making a simple drama ticket booking system. I need to add drama page where it'll display the name of the theatre(s) where the drama is going to be playing. The requirement is to allow user to book tickets of the show till last 3hrs for the show, after that tickets will only be available at the window. Tickets will be available for 7 days before the show's playing date-time. Dramas can have multiple shows in same city/same theatre but will be playing on a single location at a time. For example, if Macbeth is going to play at Broadway theatre on 1st May & Imperial theatre on 2nd May, the drama page should show both the shows & allow ticket booking for both. But once the 1st May has passed, it should be automatically removed from the list. All I want to know is, while adding the field for theatre name, there should be some way I can add "post expiry date-time" & connect it with theatre's name(page list). Theatre's page should also automatically create schedule based on all the shows added in the system. Thanks for your time. This is a designer trying his hands & some poor programming skills in PW, so please be kind.
-
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
Haha, yeah, that was my initial plan and for that I needed to know how to get city name when theatre is connected to the show So this completes the thought cycle I guess. For future reference for all the non-programmer guys like me, I'll keep this thread updated with my learnings. -
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
@Soma, Thanks for the correction. -
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
Yes, the shows will be playing in multiple cities. That's exactly what I'm thinking about right now. But as you said, spending some time with skyscrapers demo will give me some better ideas. I guess my mistake was to make a wrong structure but now when I think, I want users to look for dramas based on their location, i.e. the city. They should just select their city & currently nearby available dramas should display. For this I need to have updatable city & theatre fields for drama. I think Ryan's blog example will be more suitable. -
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
@adrian Thanks for the link. I think the structure you suggested is something I should be implementing. Right now I'm studying the skyscrapper right now, looks like I've got my solution. Thanks a lot both of you, Adrian & Wanze for your time & helping me. -
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
I've understood what I really need. Ryan's example PW blog makes this easy to understand. I've cities, theatres & shows. Roughly speaking cities can be pages, theatres can be categories & shows can be articles. Just as Ryan's example blog creates & connected categories & tags with articles, same system can work for my site as well. All I need is, if user selects New York city, he/she should be able to see all the currently available shows & all the theatres in NY. If he/she then clicks a theatre, eg. the Broadway theatre, then he/she should be able to see all the shows according to time of the show. This is all I need. To save the data entry time, I want that admin should only need to post article(add show) & cities & theatres should display the newly added show. Right now, I've to manually update cities & theatres which is wrong. Can you guys please help me with this? -
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
@adrian Thanks a lot, it works, but now another problem is, since both theatres are in the same city, the same city name is coming twice, can we fix this? -
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
Its set to AsmSelect* -
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
echo $t->theatre_city->title; it's not working still, no output. -
How do I get connected page's custom field value?
Vineet Sawant replied to Vineet Sawant's topic in Getting Started
For following code: echo "Cities: "; $theatresIds = $page->drama_theatres; // Get the theatre pages $theatres = $pages->find("template=theatres, id={$theatresIds}"); if (count($theatres)) { foreach ($theatres as $t) { echo $t->theatre_city."<br/>"; } } else { echo "No theatres found"; } I get output as: Cities: 1018 1018 Where, 1018 is a city named "Thane".