Jump to content

heldercervantes

Members
  • Posts

    396
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by heldercervantes

  1. Amazing work my friend. Looks like my help isn't needed. I agree with percentages. Evaluating the site I'm working on I figured I'd have to compare each dot's coordinates with the image size to make everything scalable and responsive, so I think it's better to have it standard as percentage and convert to px on the frontend if needed. If you can make this available this week, I'll be setting up the CMS on my site starting monday. It would be a good testing ground. (Still stoked by the support this community offers, btw)
  2. Want to have a go at it? I can handle all the jquery and css stuff.
  3. Makes sense to me. Single inputfield, and in the environments example, your approach would mean one less page per dot. AND you'd get to see and adjust all dots in the same place, which is great. The interface for editing on the admin would need to be a bit more complex. You'd need: Button for adding dots; A list of the current dots with the page selector and a delete button; Clicking/dragging a dot would hilight that dot on the list; Clicking an entry on the list would hilight the dot on the image and pull the z-index to top (so you can handle overlapped dots).
  4. Don't know if I understood correctly. The first option seems the correct one, but you mention users and that makes me think you're getting the wrong idea. Creating or editing the map or locations isn't something to make available to the site's users. I'm talking about tools to edit in PW's admin. That said, it's a one-to-many solution. A map with multiple locations, a product photo with multiple features, or an environment photo pointing out multiple products.
  5. @kongondo: It's just a matter of flexibility. In the Jacinto example, each dot only has a few infos that can be solved using that approach, but you may need a textarea, an extra photo (or a gallery), referencing other pages, etc. Here's another example: http://www.aldeco.pt/p50-environments-en Each photo in this gallery references products. So each dot would need a page selector, so the end user can jump to the product page. Another: http://www2.inapalmetal.pt/en/products When the page loads, you'll see a wireframe of a car, click it and wait for the animation to end to see the dots. Each dot has an image + title. Last one: http://extranet.frontend.pt/alfandegaporto2015/pt/espacos/sala-do-arquivo In this one there's a main photo of the room, and each dot has an image + description.
  6. 1. Multiple dots per image. In the Jacinto website, the map is fixed and the admin can't change it anywhere. Think of the map as a setting in the field itself, and each location is a page. Imagining a product with several dots for pointing out features, there would have to be a parent page where you upload the image, and subpages for each dot. Each dot page would grab the background image from the parent product page. 2. I agree. Save button. Less requests and more fool proof. That's when we save it on our cms. 3. Single. Looking at the first example, we're in the "international" page, and there are subpages for each location. -- Maybe the best way to make this flexible enough for whatever use is a combination of two specific input fields. The first, let's call it ImageMarkerBackground, would be placed in the parent and allow 1 image to be uploaded. Then there would be ImageMarker, used on the child page, referencing the parent's ImageMarkerBackground to show the correct image, where the user places the dot. Result: Admin ads a "world" page and uploads the map, then creates as many "location" subpages as needed. Same for a product photo and features or whatever else.
  7. In this case it's a bit hardcoded on the CMS itself. What we have there is just a DIV with the image and a draggable dot (using jQuery UI). Whenever the dot is moved, the X and Y coordinates are stored in hidden input fields. I made a quick usable sketch here: http://heldercervantes.com/experiments/ifim/ In cases where the image isn't fixed, there's a separate field for uploading it that needs to be in a parent page. I wouldn't know where to begin making a new fieldtype, but it anyone wants to have a go at it, I'd gladly help out.
  8. The frontend part is relatively simple. I built the example on my initial post. This is how each spot is edited on our proprietary CMS: So basically in the CMS we have the image and a draggable marker. In this case the mother image is fixed, but in other projects the image was uploaded by the user and then multiple markers could be added, with similar results to cstevensjr's example. We need this kind of inputfield on PW, but building such a module would be beyond my capabilities, I'm afraid.
  9. This looks cool, but seems to specific towards maps. I'm looking for something generic. For example using a photo of a product and pointing out various features. Say a car, with a hotspot on the door, another on a wheel, etc.
  10. Take this page as an example: http://www.jacinto-lda.com/en/internacional There's a background image and several "pages" with X Y coordinates over said image. I'm stuck on how to get something like this manageable on PW admin. A couple of fields for inputting coordinates would solve it, but there's no usability in that. In our proprietary CMS we'd have a positioning system much like InputfieldMapMarker where you see the background image and drag the marker to wherever you want it to appear. Any ideas on how to get something like this working on PW? In this case the image is static, but I have another site where I need to upload the background image and then add several markers over it. thanks, HC
  11. Brilliant. I've just setup a cms for a client using Reno for the first time. So clean and tidy. I'd vote for making this one the standard theme for PW. And, drifting a little from the subject, you know it's a great platform when you just send the url, login info and "call me when you get this", the client calls and first thing he says is "hey I had a look around in processwire, already made a few changes to content, I think I got this".
  12. Doesn't work. label, label2 or description, they're all converting tags to plain text. Maybe I can handle this with InputfieldMarkup. I'll give it a try.
  13. I'm surprised I can't find anyone asking this before. Maybe I'm missing something obvious. All I'm trying to do is add a terms of use checkbox at the end of a registration form, like so: $field = $modules->get("InputfieldCheckbox"); $field->label = "Terms of use"; $field->attr('id+name','terms'); $field->checkedValue = "I accept this site's <a href='/terms/'>terms of use</a>."; $field->required = 1; $form->append($field); Simple enough, and it works, but the link gets converted to plain text when the page is rendered. Is there a clean way to get around this? Or do I need to use something other than InputfieldCheckbox? Thanks HC
  14. Results are in. Used mockaroo to generate a bunch of entries, pumped pages up to over 1100, ran a search... 3.9 seconds! Then I scrapped all the fields I'm searching, left only one, and got 1.9 seconds. Still way too much. With limit=100 on the first block gathering and still keeping the whole process I got it down to 0.35 seconds. That's much more like it. Now I have to figure out how to narrow down results on the first find. Good luck to me
  15. That's just the thing. I have 15 fields to search on and must do it progressively. 4 of those fields are considered primary, and a keyword that's found in one of those sets a narrowing point. From there on, search focuses on these pages and that keyword is excluded from search in other fields. So you search "Cola", and if the engine finds entries with that on the brand name, it will ignore others that have that word on the description. Also, this allows the engine to give alternatives if it can't find all the words. You search "Awesome Nike", it will discover pages with "nike" but none that also have "awesome" in it, and so returns something like "Sorry, no results for the complete query. Showing results for "Awesome Nike". This will be a b**ch to optimise. I'll have a look at https://www.mockaroo.com tonight, to generate my bogus entries.
  16. Hi guys. I'm adding a search engine to my project and I'm worried about performance. The search is complex and there will be thousands of pages to go through once it's up and running. Right now I have little over 10. So for a quick test, I was trying something like this: $bulk_matches = $pages->find($selector); // that selector would pretty much get every searchable page for ($i=0; $i<100; $i++) { foreach ($bulk_matches as $bm) { $bulk_matches->add($bm); } } // and then do the crazy weird search on supersized $bulk_matches } Of course this would be a crappy test even if it did work, but it would give me some initial insight without having to populate my DB with 1000 bogus entries, which would be a pain. Is there a quick and dirty way to trick a pageArray into duplicating its content? Thanks, HC
  17. This feels like a bad idea, but I can't figure out why. Fiddling around I found that... $config->httpHosts = '*'; ...works. It allows my addon domains through. Is this a bad idea? Why? Another way around it, although not all that neat, would be to edit an external CSV hosts file. Then... $config->httpHosts = explode(',', file_get_contents("hosts.txt")); ...would read it in the config. You'd have to build your own way of updating that file which in my case wouldn't be a problem because I'm building a kind of second custom CMS for my site's users. Still don't know how I'm going about this. I don't want to skip on good practices.
  18. I'm amazed with how simple and awesome segments are. As with everything else in PW, the solution is cleverly simple. BUT I've detected a somewhat weird little issue. With that option set to 1 in config.php, I get a 404 when I try to access error logs on the cms. No biggie though, I set it to 2 max segments and the logs are back.
  19. Thanks Can, that's it. I'm making good progress with that module.
  20. Well I got it working, thanks to VeenarM's post. I needed to add the second domain to config->httpHosts. How can I set this up via API? I mean my site lets users register and gives them a private page. I want to automatically set thing up so they can just point their domain to my server and get a webstie.
  21. This isn't working for me. I have added the domain to the module and the page on the site root with exactly the same domain. Testing always leads to the main homepage. Accessing firstsite.com/secondsite.com is leading to the root as it's supposed to. With the module uninstalled, firstsite.com and firstsite.com/secondsite.com turn out different pages as expected. But with the module installed, they all deliver the homepage. I'm running PW 2.6.8
  22. Hi guys. I'm wondering how to use an addon domain to target a specific page on my site. This isn't really a multisite scenario, but it's close. The main site accepts user registration and generates a page dedicated to each client. I want to allow my clients to configure their domain towards my site, taking users straight to their page, making it look like a standalone site. mainsite.com > main site mainsite.com/people/johndoe > user "home page", has subpages that the user creates johndoe.com as addon domain, is the same as mainsite.com/people/johndoe, but I don't want a basic redirect. I need users to see everything as johndoe.com, even as they navigate the site. Any ideas on how to achieve this? thanks, HC
  23. Hi. I'm getting the same issue here, but in my case I could really use PHPs in the templates folder. Is there any way to do that? It's a kind of custom personal area thing. Registered users get their own page, select the desired template and choose things like the main color, that I need to feed into the css file. So to keep things organised, I'm creating a folder for each template, including PHP, JS, and dynamic CSS files. If I have to put the dynamic CSS file in the site folder, I'll make a mess as I add more templates. The PHPs are working fine with a simple include, the CSS is stonewalled.
  24. Thanks LostKobrakai. That did the trick. It had to be something this stupid. MySQL access denied Changed it directly on config.php and there it was.
  25. Thanks Teppo. I haven't thought of trying a clean install. Maybe I can even overwrite the database afterwards. XAMPP's control panel offers 4 different logs: Apache's access.log and error.log, PHP's error log and MySQL's error log. Nothing in those except the entry on access.log. And since I can't fire up Processwire, I can't check that log. But I'll do that clean install and check out the new Reno theme along the way.
×
×
  • Create New...