Jump to content

Goca

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Goca's Achievements

Jr. Member

Jr. Member (3/6)

15

Reputation

  1. This is good to know! I'm going to contact our host and see if this could be the issue, or perhaps even something else on the server that could be making fingerprint settings and session expiration settings ineffective. Will update once I find out more.
  2. Good suggestion, but unfortunately it doesn't seem to have fixed the issue. Still trying to find a solution, but haven't had any luck yet.
  3. @Jan Romero We're still heavy in the development stage of the site, so I actually haven't even tested on mobile yet. Right now I'm working on a desktop with Google Chrome version 97.x Also I should clarify that this happens when I refresh the page after about an hour of inactivity, not when closing the browser. I'll try that line of code in config.php just in case though, any chance of fixing it would be great, haha. Interesting... I've had this happen on both a desktop and a laptop that run separate antivirus softwares, so I don't think this is the problem in my case, but I'll add this to the list of things to test to try and fix the issue, lol. Nope. We're still very early in the stages of development, mostly vanilla ProcessWire other than a few custom modules to start organizing helpful functions, and creating data structures with page templates.
  4. Hi there, I am using ProcessWire version 3.0.165, and I keep getting randomly logged out within an hour (sometimes less than an hour) of inactivity. I've tried the recommendations in this forum post (including fully disabling fingerprinting with a value of 0 and false), to no avail: I am using CloudFlare on the site, and I have disabled fingerprinting to see if that was the issue, but unfortunately it hasn't helped. These are my current session config settings in site/config.php: $config->sessionName = 'custom'; $config->sessionFingerprint = 0; $config->sessionForceIP = $_SERVER['HTTP_X_FORWARDED_FOR']; $config->sessionExpireSeconds = 86400; I've also checked the "session" logs on the backend, and don't see any entries other than my logins. We're building a quizzing system for students and really don't want them to be automatically logged out so often, so any help would be appreciated! Thanks!
  5. Wow, that was way easier than I expected. I must have been typing the wrong search terms in, and still new to ProcessWire so reading through documentation as I go along, but wasn't sure how to find this in particular. Thank you for the help! 🙂
  6. Hi there, I am creating a blog system, and I currently have a setup where I have blog-home, blog-year, blog-section, and blog-post as templates. I have created a blog-drafts template, which is where blog-post templates will be created, and then I have the following hook that has some basic logic to check for an appropriate blog-year and blog-section page group to set as the post parent (such as 2021/12): // Blog Post handler to place blog post into appropriate blog section based on date $this->addHookBefore('Pages::published(template=blog-post)', function(HookEvent $event) { $pages = $event->object; $page = $event->arguments(0); $bh = wire('modules')->getModule('BlogHelper'); $bh->postByDate($page); }); All of this is working perfectly, however there's 1 step that's lacking to really streamline the whole process, and that's the first "Add Page" step that simply requires "Title" and "Name." Starting from creating a new page via the "Add New" dropdown using a Bookmark: Then being presented with the following screen: And finally editing additional page fields after initial page creation: Is there any way to cut out the second step and just set all page details right away? I would love to be able to streamline this for our blog editor so that he can just click "Add New -> Blog Post ..." and then set all details for the post from there. Thanks!
  7. Thank you @Robin S ! That worked perfectly. I completely forgot about Output Formatting. Still getting the hang of the ropes in ProcessWire. 🙂
  8. Hi there, I am creating a system where there is a sort of "template" page that contains details about a particular quiz, and then a user account gets a record page created and associated with their account that contains specific details about their particular progress for that quiz, their status for that quiz, etc. I have the following code in a module to create this copy page: $quizPage = $this->pages->get("template=quiz, id=$quizID"); $record = new Page(); $record->template = $this->templates->get('quiz-record'); $record->parent = $parentPage; $record->title = $quizPage->title; $record->name = $quizPage->name; $record->linked_quiz = $quizPage->id; $record->owner = $userid; $record->save(); (Omitted unnecessary quiz details for this issue) Where $quizPage is the template page containing quiz details (questions, etc.), and $parentPage is the container page to hold all of a particular user's records. When I try to set the title of the new page using $quizPage->title as the value, if the source page has a single quote in it, for instance... if the title was People's Choice, the new page has the HTML Entity entered as the page title, so the title becomes People's Choice for the new page. I've tried outputting the raw title to see if it's stored as an HTML entity, and even checked the database value directly, but it definitely is just a single quote. Is there any way to get the new page's title to contain a Single Quote rather than the entity value? Thanks!
  9. Thank you both for the replies! Little by little I'm learning which areas of ProcessWire are okay to customize, and figured it was best to check. 🙂
  10. Hi there! I tried to look through the forums, but couldn't find what I was looking for, and just had a quick question. I'm building a site that tracks a user's progress through material, as well as attaching different meta data to a user. Is it safe to add fields to the User system template, such as first-name, last-name, current-module, etc.? I wouldn't remove any of the standard fields that are a part of the User template. I guess it's also worth asking, would the LoginRegisterPro module be best to use for something like this? Thanks!
  11. Thank you all for the insight! This has been super helpful. This community continues to impress me with how helpful and kind everyone is. The more I learn about ProcessWire the more I like what I see! This gives me the direction I need to continue development. I appreciate it!
  12. Hi all! I'm currently building a school quiz system in our site, and with back and forth interlinking, I'm finding that the Title field is not necessarily needed for some pages. The short of the design is... The school is split into 5 modules Each module has X number of quizzes Each quiz has X number of questions The only way I've thought to do this, with what little I know about ProcessWire so far, is entirely through the use of pages. So here is my current page structure: Home -- School -- Module 1 -- Quiz 1 -- Question 1 -- Question 2 -- Quiz X... -- Question X... -- Module X... And so on. The thing is, for questions, all I need is the Question Content, and some other minor metadata. There's no real "Title" to the question, as the question content itself is kinda both the content and title. Technically if the question is short enough, I could use the Title field for this joint purpose, but I can't guarantee the question won't exceed the 255 character format, plus the Title field feels like the wrong place for this data. There's a more pertinent area where I don't need the title though, and that's in the other area of the site for Student Records: Home -- School ... -- Student Records -- John Doe -- Module Record 1 (Relevant data being stored for a particular module as a whole) -- Quiz Response 1 (This record contains the student's answers for a particular quiz) -- Answer 1 (This record is a simple back and forth conversation between students and teachers) -- Response 1 (Response from a teacher if answer is incorrect) -- Answer 2 -- Response 2 -- Etc... -- Quiz Response X... -- Module Record X... -- Jane Doe ... The main area of design that I'm not entirely sure of yet (because I'm still learning ProcessWire) is if I would be better off just using a repeater field for the Answer / Response records, and just making that a field for a Quiz Response instead of sub-pages, but I'm not certain how searchable Repeater data is, and the ability for teachers to very granularly search student / quiz data is important. The basic linking of data is: Modules are are defined within the "School" section of the site, Quizzes are assigned to a module as sub-pages, and Questions are assigned to a quiz as sub-pages. Student Records are created for each student upon sign up with relevant data attached as fields (Name, Age, Email, other metadata, because I couldn't find a way to link fields to users instead of pages). Module records are assigned as sub-pages and contain data such as Module Progress, Current Quiz, etc. so teachers can track that data. Quiz Responses are assigned as sub-pages of Module Records, and linked to the relevant quiz by a Page Reference (mainly so that we can also view all answers for a particular quiz regardless of specified student). The answers / responses are then entered either as sub-pages, or repeater fields. A lot of these pages do not particularly need their own titles because they can inherit titles from their linked pages with their Page Reference fields, however, I don't know how ProcessWire wants to handle all of this. Maybe the title is always required and should never be removed, and is okay to duplicate between pages even if it is always going to be the same (as in the instance of a Quiz, and a Quiz Response), but then I would also need to write routines so that if a Quiz title is ever updated, every Quiz Response title is also updated to match, which seems tedious when I can just link the 2 together and grab the Quiz title. Or perhaps I'm going about this the wrong way, and I'd be better off using custom database tables? From everything I'm seeing, it seems like Pages can entirely be used for this purpose, even if 80% of them don't have template files because I will be aggregating and displaying the data via "Search" and "Dashboard" pages. So I guess the overall question that I have is, if I disable the checkbox requiring Title on all pages, so that I can create some pages that don't have titles, is that dangerous? Looking forward to any insight you all may have! 🙂
  13. Thank you all for your answers and insight! The more I look at ProcessWire the more I like what I see, and I appreciate you all clearing up my question for me. I'm looking forward to continue experimenting with this system, but honestly one of the biggest things I love about this so far is the community. Good documentation and ability to get questions answered is a big deal for me. So far I love how extensive ProcessWire's documentation is, and I thank you all for the warm welcomes!
  14. Hi there! I'm very new to ProcessWire, just found the system about a month ago and have been toying around with it a bit, and I'm loving everything I'm seeing! I'm coming over from the Concrete5 CMS, which I've been working with for 10 years, and one of the primary things that's so alluring to me about this CMS / Framework is that it doesn't try to get in your way. It seems like it's very much built with the mentality of providing the tools to build what you need, rather than forcing you to work around systems built for a specific purpose, and along with that, it seems like the community is incredibly helpful and friendly, which is always a big plus! One of the concepts that I'm used to from Concrete5 is the concept of Single Pages - one-off pages that are made for a specific purpose, and all of its code is self-contained, rather than part of a reusable templates. I am currently building a system that somewhat resembles an LMS - essentially needing Students, Student Records, quizzes / tests, and answers to them for each student record. The perfect example for my case is a user dashboard, to be able to view current tasks, know where to go next, etc. which won't be re-used anywhere else except on one page. From what I'm seeing with ProcessWire, it seems the base concept is that if you want a page to display on the front end of the site, it needs a .php template in the /site/templates/ directory, and even if the template is used in multiple pages, or only one, it makes no difference, and this is where it would / should go. Am I correct in this thinking? I want to make sure that as I learn ProcessWire, I get used to the standards and best practices that people have come up with, and I'm sure there's an answer to this somewhere already that I possibly overlooked, but I wasn't able to find it. Any insight on this would be much appreciated! Thanks!
×
×
  • Create New...