Jump to content

montero4

Members
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

4 Neutral

About montero4

  • Rank
    Jr. Member

Contact Methods

  • Website URL
    https://amillionsuns.com

Profile Information

  • Gender
    Male
  • Location
    Baltimore
  • Interests
    Accountant turned Artist. Photography, Piano, and now Processwire. Hey, that's three Ps!

Recent Profile Visitors

688 profile views
  1. Thank you for this module. It works great. I ran my webpage through W3C validation and it gave me these errors. Any suggestions on how to fix it? (Procache strips the quotes, but it's in the code). Thank you. Error: Bad value optin for attribute type on element script: Subtype missing. From line 1, column 30; to line 1, column 174 l lang=en><script type=optin data-type=text/javascript data-category=statistics async data-src="https://www.googletagmanager.com/gtag/js?id=Ufkjdkfj"></scri Error: Element script must not have attribute async unless attribute src is also specified or unless attribute type is specified with value module. From line 1, column 30; to line 1, column 174 l lang=en><script type=optin data-type=text/javascript data-category=statistics async data-src="https://www.googletagmanager.com/gtag/js?id=dfdfdfdf"></scri
  2. Hello, I'm interested in this module, and I'm trying to get it working. I've installed it and selected the template and the date field. Can someone give me a clue what to do next. Do I modify the template or modify some php file? I've read all the questions on this thread and I can't figure out what to do next. Thank you. Regards, Update: spoke too soon, I didn't realize it would add fields to the template...It worked. Thanks.
  3. Hi all, Ryan suggested I post this in the public forum and I think this is the most appropriate area. If not, please let me know, and I will remove it.I'm writing for some preliminary advice/views if you care to comment and have the time. If you would like to reply, please send me a private message in the forum (per the pinned post guideline). I'm looking for this type of advice:a) Could this be done in PW? If not, what software platform(s) should I look at?b) I'm looking for comments along the lines of "Yes you can do this in PW, you can do the feature you described a, b, c, d, e using this module, this module, and that module...You would also have to think about x, y, z...good luck!" I haven't checked the PW rules for the use of existing modules in a commercial product for copyright etc, so I will do that before I incorporate anything.c) Ideally, I would like to code this myself as I'm thinking I will be maintaining this over time, so I might as well code it. However, I'm open to working with a developer in the following ways: Developer acts as a consultant. I would code it and the developer reviews the code and recommends corrections/changes. I'm unfamiliar what the industry best practices are so maybe this first option is a recipe for disaster and not recommended. Developer will code the whole thing. I would of course design how the whole thing will look/function/behave. The idea is essentially a timesheet app. The front end will be a dashboard showing a visualization of a world map and multiple graphs summarizing time data. I know there are many time tracking programs already, but I'm looking at this idea as an art project so it has a different focus.When a user starts something she wants to track (her "work"), she can click on a button to turn on the timer, and a pixel on the world map (the city where she's located) will start to flash. When she is done her work, she clicks "off" and the pixel stops flashing.A user can have as many work sessions as needed throughout the day. She has a choice to input text into a tag for each work session. There could also be another text field for comments. At the end of every week, a summary is emailed to the user in terms of total work hours etc.I'm envisioning the data requirements are pretty simple up to this point (or maybe not). The backend will only have fields for email, user_id, name, password, date, start_time, end_time, tag, comments, and city. I'm thinking repeater fields or maybe protable, LoginRegisterPro, and ProMail would figure into the solution.Suppose there are 20 people using this app. In the world map, each person will have his own flashing light and the flashing lights of all the other people (assuming they are active at the same time). The person's light could be one color and the light of the other people will be another color.The app does not have to be location aware since the user inputs the city he is located in. If the user moves for a day to a new city, then when he initiates the timesheet, he can override his default city and that new city setting will be active for that day. It will then reset itself to his default city the following day. If the move is for a longer time period, he could always change his default city in his settings.I haven’t decided whether the world map has zooming-in capability. Because of privacy issues, I don't want the pixel to be mapped to the person's actual location. I'm thinking that the dot will map to the city center. So the app will have to look up some mapping reference available on the internet? I don't know. Also, I will have to think about how to visualize users in the same city. I'll also have to think about how to avoid the pixels piling on top of each other. Note that privacy is very important so I will have to think through all the scenarios to make sure it's maintained.The user could also simply input time manually. The fields for day, start_time, end_time, tag, and comment will remain open and editable for one week and then it gets locked. I figure this is just a form that has a time limit?The app accumulates the work time and shows the total work hours by day, week, month, year by tag, by user. However, if a group of users agrees on a common tag(with a prefix of #), say #eventName, then the aggregations of work hours would be shown by user and also by #eventName. I guess the app will check to see if an #eventName is already created and warn the user that it's not unique, but that's the only notification they will get. A groupevent will have the same flashing color on the world map.There could be a "play" button that would show the work hour evolution over time (speeded up). This feature would be interactive on the webpage where a user can choose the start- and end- dates. Or they could replay it for entire year (speeded up).The user should able to embed the world map visualization into their own website using their unique user_id (which would still be hidden so it should not show up in the html source code). In a way, the user himself will be breaking his confidentiality/privacy (i.e. he is tracking and showing his timesheet to everyone on his website, but I think this is ok). When they embed the timesheet, they will be able to show their time data, aggregated data, etc along with all the other user data (all anonymous of course - the user only gets the aggregated anonymized data for everybody else as a comparable). At any time, the user can download their time data and quit/erase their data in the app (which I think is supported in LoginRegisterpro). If a departing user happens to have time data that was part of a common #tag, then the time data for that user will be recategorized to "inactive user" and will no longer be associated with a person's email (which would be erased anyway once the person leaves).The app will have an accompanying iphone and applewatch app (especially the on/off/tag/comment field so that they don't have to be tied to the computer). It would be nice to have the visualization on the iPhone too. So I would assume that I would need to learn to program for the iPhone too? Would a responsive website be enough? I'm not sure how that works.The website application will really only have one page (the dashboard). There will be external pages of about, user manual, support -- but those are easy to create. There will be user-accessible pages for input/setting modifications, but I think those are all doable in PW. However, I'm having trouble thinking about how to generate the interactive dashboard. I'm an accountant so I've used dashboard software like Tableau -- that would be ideal as the front end as I know how to program that, but I can't obviously use that as the front-end in this instance as it's not "real-time." I believe it connects to mySQL but not in real-time. You would have to refresh it and that takes time. What technology would power the interactive visualizations like that?I will maintain this website and each user will just pay a subscription fee (which is supported in ProFields, so I'm sure I can figure that part out).If you've read this far, thank you. If you would like to reply, please send me a private message in the forum (per the pinned post guideline). Thank you in advance for your help.
  4. Hi @Bacelo, I'm an artist who just coded his own website with PW. I basically learned enough PW and php to code it in the past 1.5 months. This is before I started learning about SEO...so I've been thinking about the right site construction. I might have to amend my menu links etc. I've been testing an SEO program and they linked to a number of publicly available articles. This one I think is the best. https://moz.com/blog/site-architecture-for-seo. The main takeaway from this article is that the site architecture should be as flat as possible. So keeping in mind that I'm a beginner in php and pw and all things programming: I may be misunderstanding your description, but why is a painting in two categories? Would there be an issue of duplicate content? Maybe you can solve this with the canonical link then? I like that a painting=page. That's the way I did mine as well (I'm a photographer). Image = page. I don't use the multi image field anywhere in the site (e.g. in a blog post). In learning about SEO, text is very important, will there be blog posts? In the previous website incarnations, my site had images with only title and caption, which google considered to be thin content. How is the client going to solve that? I'm still trying to solve this for myself. For now, what I've done is that when I talk about a certain image in a blog post, I will purposefully link to the image page from the blog_body. In the image page, i have Related Writing code that automatically picks up any page that links to it using pagelinks(). I think over time this will work well if I want to stay with image=page. I'm going through my past blog posts to link them over time. An alternative I've considered is not to have individual image pages (to avoid the thin content). Instead I would only have a gallery page with say all the images lazy loaded as you describe. If a user wants to see a larger version, then they click on it, and a larger version pops up (I forget the module that does this, but there's several). I ended up not doing this because I want each image to have more information displayed over time like edition, exhibition history, buy button, etc, and based on my reading of the module, you can't fit that into a pop-up (whatever you call those things). As stated the main takeaway I think is to have a flat structure for search engines while making it as pleasant for user experience. Regards,
  5. Hi @nbcommunication Thank you for your reply. That's a neat solution. I didn't realize that if you resized or manipulated an image, it's -that- variation image that gets used as the src in the <img> tag. That actually makes sense. However, in my case, that approach wouldn't work because I'm disallowing access to the original jpeg images through an htaccess lockout method posted by horst in this forum. The way that method works is that it disallows all access to .jpeg files unless it has a certain suffix (like -piacontain, -pim2-full,-blogthumb, etc.). I want the jpegs to therefore have the "-srcset" suffix so that it is accessible. Here's the solution I came up with for future reference as the approach might help other people. //assemble img markup $image = $page->image; $string = $image->srcset("1200"); //create srcset of image 1200px wide $address = explode(" ", $string); $address = $address[0]; //create srcset using pageimagesrcset module default settings $srcset = $image->srcset; echo "<img src=\"$address\" alt=\"$alt_text\" srcset=\"$srcset\">"; The result of above code: <img src="/pw/site/assets/files/1070/test.1200x619-srcset.jpg" alt="alt_test" srcset="/pw/site/assets/files/1070/test.320x165-srcset.jpg 320w, /pw/site/assets/files/1070/test.640x330-srcset.jpg 640w, /pw/site/assets/files/1070/test.768x480-srcset.jpg 960w, /pw/site/assets/files/1070/test.1200x619-srcset.jpg 1200w"> This approach works and the htaccess gatekeeper lets the image request go through, but if a user attempts to access test.jpg directly, then it will not pass through. Thank you for module. As mentioned, I'm using it to serve all the images on my website. Regards,
  6. Hi @teppo Yes, that's what I'm using. Thanks.
  7. Hello, I'm using the blog template by @kongondo (thank you!) and I've been going through and creating my website. I've been trying to work this issue out for a day and I haven't gotten far. I can't figure out how I can sort the months in descending order as these are not pw pages. The years and the posts are shown in descending order, and I want to have the months in descending order too (June, May, April, etc) . How do I do that? I looked at the function for renderarchives and it's unfortunately beyond me at the moment. Thanks for any help on this! Regards, Jonah Archives 2019 April Post #4 Post #3 Post #2 Post #1 May Post #4 Post #3 Post #2 Post #1 June Post #4 Post #3 Post #2 Post #1
  8. Hello, I got this code working where I'm printing out the other pages linking to the current page: $items = $page->links(); if (count($items)) { echo ("some title"); foreach ($items as $item) { $out=""; if ($item->blog_tags) { foreach ($item->blog_tags as $tag) { $out .=$tag->title.", "; } } $out = rtrim($out, ", "); echo "<p><a href='{$item->url}'>{$item->title}</a> (".$out.")<br>{$item->blog_summary}</a></p>"; } } 1) What I'm trying to understand is why $items=$page->links(); works but if I try to limit it to only looking at the blog_body field it doesn't work, i.e. $page->links($field='blog_body'); 2) Also, is there a way to sort the $items result in descending order? Something like sort=-blog_date so that the blog_posts are shown in descending order? How would I do that? Thank you in advance for any help. Regards, Jonah
  9. I thought based on the module overview that you had that "It does not handle images rendered in CKEditor or similar fields." So with your question above, does it work on the textarea? I'm completely new to PW and php/html/css so maybe I'm misunderstanding your question. If yes, please ignore and no need to reply :-) I'm using hannacode in the ckeditor textarea to generate the srcset and it's working fine for me. My size settings are still not final, but it's so easy to change later so I'm not worried. I could also delete all the past srcset images using your module (that's why I love your module and I'm using it to generate all the image markup on the website). If I need a different srcset configuration set, I could always create a different hannacode, so I think it's going to be fine. I haven't read enough on the portrait mode to know if I'm going to use this feature. Regards,
  10. Hello @nbcommunication, Here is a sample output being rendered on the page <img src="/site/assets/files/1633/ve08195.jpg" alt="Beach Resort" srcset="/site/assets/files/1633/ve08195.480x181-srcset.jpg 480w, /site/assets/files/1633/ve08195.1240x468-srcset.jpg 1240w" sizes="(orientation: portrait) and (max-width: 768px) 50vw"> I wonder if instead of using "/site/assets/files/1633/ve08195.jpg" as the src, there could be a user selectable option to use the max size for the src, as in "/site/assets/files/1633/ve08195.1240x468-srcset.jpg" instead? It might also make sense for user to maybe select the smallest size if that works with some lazy loading scripts that does progressive loading(?). Currently in my setup, the original image cannot be accessed if the user attempts to paste the actual address on the browser. I wonder what the SEO impact is of doing this, so I'm not completely happy with this current setup... However...last night, I actually figured out a way to assemble the markup for <img> using some string manipulations on the output of the your module (although I haven't implemented it yet), so maybe my original request is no longer necessary? It would be easier though if the module had this option out of the box. Thank you and regards,
  11. Hello @nbcommunication, Thank you for this module. I'm using it to generate all the images on my website I'm building. Using hannacode, I'm even using it to generate the img markup from a textarea (like the blog_body) which is pretty neat! I'm wondering if you could consider incorporating an option where instead of pointing the src to the original jpeg file, the module would instead use one of the srcset images that it generated (maybe the largest setting or the user selectable size)? The reason why I'm interested in this option is that my original images are very large and I've currently disallowed access to the original jpeg (using htaccess lockout that I found in this forum). I plan to have a download original image later on for customers so that why I need the original image on the website. Is this doable? Thank you for reading. Regards, montero4
  12. Hello everyone, I'm testing out PW and I think it is fantastic because you can create any type of field in one's pages. I have read most of the documents in the "Docs" menu link. It helps a lot but I really have rudimentary PHP/html knowledge and so everything is confusing. I have very basic questions that I haven't been able to solve. Can someone help? 1. What is the proper syntax for an if-then statement. <?php if ($page->title="home") echo '<img src="http://website.com/logo.jpg" width="350" height="190" alt="site title here" class="custom_logo">'; else echo '<img src="http://website.com/logo_c.jpg" width="350" height="190" alt="site title here" class="custom_logo">'; ?> This code doesn't throw an error, but it doesn't work. If the page title is "home", then give me this logo, but if it's not, then give me another logo. I'm also very confused by the single quotes/double quotes. If I use double quotes for the echo "....."; portion, it gives an error. When do you use single vs double quotes? 2. I have set up a header.inc that is prepended before the pagebody. This approach works fine (I added header.inc in config.php). I created a new page template named image-page and added the following code: <?php if($page->image) echo "<img src='{$page->image->first()->url}'>"; echo $page->title; foreach($page->image_details as $name => $value) { $label = $page->image_details->label($name); echo "<h4>$label</h4>" . $value; } The problem is in the red portion of the code above. I used the same code to echo the title in the header.inc file (<title><?php echo $page->title ?></title>) and the title shows correctly (it shows the correct title - "Shelter" - for example). But the same echo statement in the image-age template (the red portion above), gives me "home". What is causing that behavior? My website hierarchy is home ---projects ------Project 1 ---------- Shelter So the title "home" only shows up in the top page. So why is it printing "home" when it should be printing "Shelter"? 3. I'm getting confused as to what I have to learn in terms of syntax when creating a PW website. I know there is no "template" language in PW, but where do I actually learn the syntax? For example, in this code, what part is PHP and what part is PW-specific? foreach($page->image_details as $name => $value) { $label = $page->image_details->label($name); echo "<h4>$label</h4>" . $value; } Thank you in advance for any help/insights anyone can provide. Regards, Jonah
×
×
  • Create New...