Jump to content

heldercervantes

Members
  • Posts

    389
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by heldercervantes

  1. 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.
  2. 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.
  3. 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
  4. 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".
  5. 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.
  6. 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
  7. 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
  8. 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.
  9. 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
  10. 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.
  11. 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.
  12. Thanks Can, that's it. I'm making good progress with that module.
  13. 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.
  14. 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
  15. 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
  16. 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.
  17. 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.
  18. 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.
  19. Hi, I had to format my pc and reinstall everything from scratch. Now I'm having trouble getting a couple of sites working again on XAMPP. Here's what I did: Copied my entire htdocs folder to my backup drive, containing among other things my two websites; Exported both site's databases from phpMyAdmin. Did two versions of each, one with "Enclose export in a transaction" and "Disable foreign key checks" checked, and another with these unchecked; Formatted, reinstalled everything, smiled at my PC's recovered agility; Copied htdocs back to the PC; Created both databases on phpMyAdmin; Imported the sql files again. Launching the sites I get an internal server error. Can't see anything on Apache's logs. I tried importing both versions of the databases to the same result. Checked DB collation setting on my web server's version of one of the sites to be latin1_swedish_ci, so I replicated that setting on my local database, and still got nothing. Any ideas on what I can do next to get this working?
  20. Wow, that's ambitious. It's great to see something this advanced being built with PW. Best of luck to you Luis.
  21. Thanks guys. Never crossed my mind that, already being logged in, I could fire $session->login again and check the result. Newbie mistake
  22. Hi. I'm working on a private area for a site and reached the change password feature. In the form I want to ask the user for the current password and the new one. Can't figure out how to check if the current password entered is the correct one. Since the stored password is hashed, I can't simply make a comparison. How can this be done? thanks, HC
  23. Soma, my friend, once again you save my butt. Thanks! To anyone who's interested, the only thing I had to do after Soma's suggestion was tweak the way I set the variable: $page->mapmarker->address = $input->post->map;
  24. Following Soma's Create simple forms using API thread I setup a user registration form on a site I'm working on. Everything worked great until I tried adding an InputfieldMapMarker at the end. So I'm using this to get the field in place: $field = $modules->get("InputfieldMapMarker"); $field->label = "Localização"; $field->attr('id+name','map'); $field->attr('address','38.694147, -9.205794'); $field->required = 0; $form->append($field); The field shows up as expected and I even got my JS to change the address value and update the map according to what users put into the contacts fields before they reach the map. The problem is when the form is submitted. Error: Call to a member function set() on null (line 177 of C:\xampp\htdocs\cars\site\modules\FieldtypeMapMarker\InputfieldMapMarker.module) MapMarker's documentation doesn't say much about using the inputfield, and I'm lost. Help a brother out?
×
×
  • Create New...