Jump to content

bombemedia

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by bombemedia

  1. Bump, worked around it but still have the same issue today. Version 3.0.62
  2. I had the same problem. Open your translation file in /site/assets/files/**ID of the language** My file link was { "file": "site\\templates\\home.php", "textdomain": "site--templates--home-php", ... and I deleted the entry in database, changed file name so it created a new one and it corrected to : { "file": "site\/templates\/home.php", "textdomain": "site--templates--home-php", ... You can edit your translation files manually. Now I can edit the translations :)
  3. Hi there ! I added fields with translatable content in my template and they don't update in the language translator ! The first time I translated my template file all my fields like these : <?php echo __("Translatable text") ?> Appeared in the language translator. But now they don't show up if I add some more :| Any idea how to refresh this? Thank you as always !
  4. Would Caddy be safe for production environment ? I really like having automatic SSL. I have 2 low traffic websites that currently run on Digital Ocean, with a simple Apache2/Mysql setup. I want to host both websites on the same droplet and will need SSL for simple forms.
  5. Oh my.... Installed 4 seconds ago Thank you very much.
  6. Yes it's installed : Title Markup RSS Feed Class MarkupRSS File /wire /modules /Markup /MarkupRSS.module ID 171 Version 1.0.2 Installed 1 hour ago Summary Renders an RSS feed. Given a PageArray, renders an RSS feed of them.
  7. I just downloaded MarkupLoadRSS module from M.Cramer's Github repo. Here is the demo code I used for test purpose in my template : $rss = $modules->get("MarkupLoadRSS"); $rss->load("http://rss.cbc.ca/lineup/canada.xml"); foreach($rss as $item) { echo "<p>"; echo "<a href='{$item->url}'>{$item->title}</a> "; echo $item->date . "<br /> "; echo $item->description; echo "</p>"; } All I get is this error : Error: Call to a member function load() on a non-object (line 65 of C:\wamp\www\mysite\site\templates\home.php) As if the module wants an object, like a $page or $config or something... I looked up the code and the function is load($url). Would it be conflicting with something ? I'm running v2.7.2
  8. On version 2.6.X leaving the string didn't work (still said that 127.0.0.1 wasn't recognized) but now this time it works and I forgot to try it !! Problem solved, thank you very much !!
  9. Hi guys, I worked on a local install of PW version 2.6.x on Wamp for quite some time. I got the error Please update your $config->httpHosts setting in /site/config.php even if my config file was good and working. After messing with a lot of settings (Allowoverrides, creating a vhost etc.) I reinstalled PW version 2.7.2 and the problem dissapeared. I migrated my data and it still worked, hurray... Now this morning I'm starting to work on my project again, the error reappeared. I tried deleting sessions in the folder, without success. You guys have any other ideas ?
  10. Hi, ran in from a Google search and this solved my problem ! I had to setup a VPS on Digital Ocean because my shared host is... a shared host hehe. Now it's running perfectly, thank you very much !
  11. Dude, your avatar is pretty accurate, I did the same face when it worked !!!!! Thank you very much gents, I love you all, I love ProcessWire and I will come back and try to help if I can. Very nice I'm really happy !!
  12. I think I found the problem. If I use a normal $.ajax function, I get the error : Error: SyntaxError: Unexpected token < So that means it's trying to parse my whole page instead of staying inside of my if($config->ajax){} . I edited it to : if(!$config->ajax) {} And it parses all the characters of my template file in console.log()... I think I'm lost because I read the explanations here in the forums and my code should work... but instead it jumps out of if($config->ajax){} and crashes. Should I create an ELSE for the rest of the page ? EDIT : Even in an else, it parses the whole template file.
  13. Ultra quick reply, I thank you very much !! I saw config-ajax in another post on stackoverflow but ignored it. Whoops ! Edit I read documentation and came back with something that looks like code that should work... I replaced my code with this : At the top of my template file called map.php (which is included in my home page) if($config->ajax) { $sel_id = 'id=' . (string)$_POST['id']; $json = array( 'title' => $page->child($sel_id)->title, 'desc' => $page->child($sel_id)->branch_desc ); echo json_encode($json); } //continue with page rendering and in my main.js file : var url = 'http://127.0.0.1:8888/site/templates/map.php'; function fetchOfficeData(){ $.post(url, {id:1013}, function(data) { console.log('post ran!'); $.each(data, function(key, value) { console.log("Keys : " + key + " " + value); }); }, "json"); } Take note that I coded the variables manually to debug and it will be dynamic... But nothing outputs !! I don't even get the message that console.log('post ran!'); should give. Any ideas ?
  14. Hi guys ! First real project with ProcessWire, and I can say I adopted the platform. It's incredibly fun to work with ! I'm currently making a Google Maps interface, in which I can add branch offices in the backend as pages. Each pages have data : title, latitude longitude etc. and compare it with the user geoloc or a geocoded address. At first, I fetch the childrens ID, latitude and longitude, json_encode them in an array. Then, I find the 3 nearest offices and play with data until I need to get the rest of the data matching the IDs, so I can show detailed profiles of the 3 nearest offices. I'm currently debugging with static data, and I get a 500 internal server error on MAMP... but I don't know, it seems my setup is not showing PHP errors properly. Here is my Javascript function (executed on dom ready elsewhere) : File main.js : function fetchOfficeData() { $.ajax({ url: 'http://127.0.0.1:8888/site/ajax/fetchoffice.php', type: "POST", dataType:'json', data: ({id: 1013}), success: function(data){ console.log(data); } }); } File fetchoffice.php : //Format to fetch the office with the ID $sel_id = 'id=' . (string)$_POST[id]; $result = $page->child($sel_id)->title; echo json_encode($result); But I get an error and I suspect it's because I cannot use selectors in my AJAX page because it's not in my template. I'm able to output $sel_id, or anything else for that matter, but using $page->child... doesn't work. Is it possible to put this code inside my template so the selectors work ? Another solution could be to fetch all the data of all the offices and put them in the json_encode array at the beginning... there will be 30 offices max... but I don't feel like it's the right thing to do. Thank you very much in advance
×
×
  • Create New...