Jump to content

Sanyaissues

Members
  • Posts

    121
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Sanyaissues

  1. New Facebook Login Module by @ryan: http://processwire.com/blog/posts/pw-login-for-facebook/
  2. All the ingredients are pages and they are linked to the recipes with repeaters. Each repeater has an ingredient and a description: Butter / 1 cup butter. Did you try another approach?
  3. Website: https://gatorade.com.do/5v5/ Modules: Form Builder, Lister Pro, Profiler pro, Tracy debugger, Procache (still not installed) It's a simple landing designed to handle registrations to a Gatorade Tournament, but it's kind of cool to see a big brand like Gatorade running Processwire.
  4. @Adrian shame on me... is the first time i see the Clear Compiled Files button. The login template it's working. Thanks for your help.
  5. @adrian thanks, i did't notice the custom message on the home page, my bad. The login template option isn't working on 3.0.4 Notice: Undefined variable: loginForm
  6. The settings seems to be ok. I check it on incognito to avoid caching, but the default message persists. I'll try reinstalling the module,
  7. Soma, i never thank you for your accurate reply. The SQL query makes a perfect job. Thanks!
  8. Hi @adrian thanks for your response. As you say, i get the undefined variable error. About the custom protected message isn't working. I save a new one but isn't rendering on the front-end. This is what i get: <form class='PageProtectorForm' action='./' method='post'> <legend></legend> <input type='text' name='username' placeholder='Username'> <input type='password' name='pass' placeholder='Password'> <p><button type='submit' name='login'>Login</button></p> </form>
  9. Hi Adrian, the login template isn't working for me. I setup a custom template (login.php) and select it on the module settings, but the login form doesn't show. I'm using ProcessWire 3.0.3 devns. login.php: <?php include("./head.inc"); ?> <div> <?php echo $loginForm; ?> </div> <?php include("./foot.inc"); ?> Edit: When i disable the login template, the custom protected message isn't displaying either. The default "This page is protected. You must log in to view it." message is shown.
  10. Phillipp, the website has around 10,000 sessions per month, 5 pages per visitor and 4 minutes / average session duration. By the way, minimize.pw is very simple and really helpful. I'm proud of the speed of the website thanks to minimize, proCache and AIOM. Take a look of the minimize stats: Images sent 500 Traffic In 225 MB Traffic Out 53.8 MB Saved 171 MB Compression 76.1%
  11. This website was made for a local supermarket on Dominican Republic. The recipes and the pictures were custom made.
  12. Recipes website: http://superpola.com Modules Used: ProCache ProcessImageMinimize / minimize.pw Batcher AIOM
  13. I was playing with the module but it doesn't creates new users. For example, If i'm logged with my processwire "admin" user and enter to myurl/facebook-login/, it adds the "facebook-login" role to the admin user (but the Facebook ID field remains empty). But if i'm not logged in and enter like a guest, it adds the role to the guest user. I was expecting that a new processwire user was created. Am i right?
  14. Hi @horst, thanks for your detailed answer. You were right, @slkwrm really gave me the answer but i was too blind to understand. @kongondo thanks for the "hidden pages" tip and the links. I made a simple loop and everything works. My first approach seems a little dirty but at least its working: CVS file: Title, Category, Brand page, Brand description, (...) Brand page, Brand description -------- product1,/cat/one/,/brand/01/,"foo",/brand/02/,"bar" product2,/cat/one/,/brand/01/,"foo",/brand/02/,"bar",/brand/03/,"foo",/brand/04/,"bar" product3,/cat/two/,/brand/04/,"foo",/brand/05/,"bar",/brand/06/,"foo", Script: $c = count($data); //Counts the parameters per line $productPage->title = $data[0]; //Title $productPage->category = $data[1]; //Category for ($i=2; $i < $c; $i++) { // Stars on 2 because the first parameters are Title and Category $repeater = $productPage->items->getNew(); // Creates a new item on the repeater $repeater->brand = $data[$i]; // Assigns the Brand page $i++; // Increase i to jump to the next parameter $repeater->description = $data[$i]; // Assigns the Brand description $productPage->save(); // Saves the page }
  15. Thanks @slkwrm . I really have a script who loops through the lines of the csv and creates and save new pages. The problem is that i'm only able to add one brand per product (every product is a page with a repeater which contains a brand and a custom brand description). The question is: how to import multiple brands for every single product (the brand field is a repeater). I want to import something like this: Product Name, Category, Brand1, Brand1Description, Brand2, Brand2Description, etc... - - - - - - - - - Product one, /category/xxx/, /brands/zz1/, "This is the brand one", /brands/zz3/, "Description 3" Product two, /category/yyy/, /brands/zz2/, "This is the brand two", /brands/zz4/, "Description 4", /brands/zz5/, "Description 5" Product three, /category/nnn/, /brands/zz7/, "Custom description 7" - - - - - - - - -
  16. Hi, I have a template with three fields: - title - category (page FieldType) - items (repeater FieldType) The items repeater has two fields: - brand (page FieldType) - description (text field) Then i have a csv file (Product Name, Category, Brand, Description): - - - - - - - - - Product one, /category/xxx/, /brands/zz1/, "This is the brand one" Product two, /category/yyy/, /brands/zz2/, "This is the brand two" - - - - - - - - - And finally my import script goes like: list($title, $categoryName, $brandName, $description) = $data; $productPage->title = $title; $productPage->category = $categoryName; $repeater = $productPage->items->getNew(); $repeater->brand = $brandName; $repeater->description = $description; This works like a charm. The problem is that only allow me to import one item on the repeater field. How to import multiple items to the repeater? I want my final imported pages to have multiple brands with customs descriptions. Product one - Category: xxx - Brands -- zz1 | This is the brand one -- zz2 | This is another cool brand -- zz3 | This is the best brand Product two - Category: yyy - Brands -- zz1 | This brand is cheap -- zz2 | This one is expensive -- zz3 | Another brand Hope somebody can help me. Thanks.
  17. Hi, i'm working on a website with some articles and categories. The structure is something like this: Home +Articles --First Article --Second Article +Categories --Category1 --Category2 I'm using the categories page as a field to categorize the articles and create the sections of the general navigation (home / category1 / category2). Currently the URL for a section looks like example.com/categories/category1/ and i want something like: example.com/category1/ Any Ideas? Thanks!
  18. Hi! I'm working on my first processwire project and everything is working ok, but i have a question stuck in mi head: which is the "best" way to organize functions and stuff on php/processwire (is my first php project too). I have something like this: -- functions.inc -- home.php -- foo.php -- bar.php functions.inc have all the "get" functions that pull out content of the database, like: function getHomeNews($posts){ $out = array; foreach($posts as $post){ $out["name"] = $post->title; } return $out; } then in my home.php template i put a "render" function and do the echo thing to show the html on the front end: function renderHomeNews($posts){ foreach($posts as $post){ $name = $post{name}; $out = "<h1>{$name}</h1>" } } $news = $pages->find("template=news"); echo renderHomeNews($news); Suddenly a question comes to my mind, what if i put all the "render functions" of the project on renders.inc and all the "getter functions" on getters.inc, so the code on the template could be smaller and all the functions will be on just two files. That makes sense? is the same stupid thing? How do you organize your projects? Thanks!
  19. Thanks arjen. Now i understand how to get pages between two dates, but I could not figure out how to delimit a range of days (01 of november to 30 of november) regardless of the year. My current solution is to get all the people and then evaluate the month using a conditional: $items = $pages->find("template=people, sort=birthday"); $currentmonth = date("m"); foreach($items as $people){ $birth = $people->birthday; $birthmonth = strftime("%m", strtotime($birth)); if($birthmonth == $currentmonth){ echo "{$people->title}"; //Gets the name of the person } }
  20. Hi all, I have some pages with a custom datefield who stores the birth of the person. I want to show a list with the birthdays of the current month but i don't now how to get all the pages that match the condition. I know that this doesn't work but it reflex what i'm trying to achieve: $today = getdate(); $currentmonth = $today[month]; //november $people = $pages->get("/people/")->find("birthday~=$currentmonth"); //voila i get all the people who born on november! birthday is an custom datefield... Anybody could spare me a tip? Thanks!
×
×
  • Create New...