Jump to content

kasperwf

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by kasperwf

  1. Hi gurkendoctor Any plans on an update for your module? I've installed it a bit back, but I have issues with saving pages.. Maybe it's just me that setup Nginx wrong, but your module fails to purge the cache whenever I save a page, so I was looking to see if the module were updated, but it hasn't changed for a while.
  2. My localhost: PHP version: 5.4.22 MySQL version: 5.6.10 Apache: Apache/2.2.26 (Unix) The information for the hosts that doesn't work is the one I wrote earlier. Seems like they both use the exact same setup (as the other, not like mine, the working server). :-I The info for my VPS that also work is: PHP: 5.5.9-1ubuntu4 MySQL: I really don't know, because I obviously secured it too well, and I can't even mysql -v it. But it was last month, and it was the newest version, so, yeah. Apache: Apache/2.4.7 (Ubuntu)
  3. Yeah it's still a problem. :-( And now I've tried it on another host with same result. The only two places I've succesfully gotten the Hanna Code module to work were on localhost (yay) and on my Digital Ocean Droplet... I guess I'll let the owner of the site know, that he can't get that module on the two host masters he wished for.
  4. Hi all I hope there's someone here that can help me.. I've set up this site (www.sejero-festival.dk) on my localhost and Hanna Code works excellent. However, and I've tried two different hosts now, when I deploy the site, the Hanna Code module fails miserably when I try to go to the setup part : One of the hosts has the following specs: PHP: 5.3.28 MySQL: 5.5.37 Does anyone have a clue what might cause this error?
  5. Hmm.. in the PhpMyAdmin panel it says: Database serverServer: 10.246.16.42 via TCP/IP Software: MySQL Software version: 5.1.73-1 - (Debian) Protocol version: 10 User: xxxxx@xxxxx Server charset: UTF-8 Unicode (utf8) Any clues??
  6. Hi Willy PW is 2.4 MySQL is: MySQL version = 5.5.37-MariaDB-1~wheezy MySQL driver version: mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $ max_user_connections = 24 max_allowed_packet = 16 MB
  7. Hi all! I've just deployed my site - which worked perfectly (AWESOMELY I might add) on localhost, and everything seems to work just fine. However, on the live domain (www.sejero-festival.dk) when I go to Setup -> Hanna Code, I get the following error(s): Warning: mysqli::set_charset(): Couldn't fetch Database in /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Database.php on line 71 Warning: Database::query(): Couldn't fetch Database in /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Database.php on line 114 TemplateFile: SELECT id, name, type, modified, accessed, code FROM hanna_code ORDER BY name<pre>#0 [internal function]: Database->query('SELECT id, name...') #1 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/DatabaseMysqli.php(35): call_user_func_array(Array, Array) #2 /customers/9/8/c/sejero-festival.dk/httpd.www/site/modules/TextformatterHannaCode/ProcessHannaCode.module(97): DatabaseMysqli->__call('query', Array) #3 /customers/9/8/c/sejero-festival.dk/httpd.www/site/modules/TextformatterHannaCode/ProcessHannaCode.module(97): DatabaseMysqli->query('SELECT id, name...') #4 [internal function]: ProcessHannaCode->___execute() #5 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(359): call_user_func_array(Array, Array) #6 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(317): Wire->runHooks('execute', Array) #7 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/ProcessController.php(196): Wire->__call('execute', Array) #8 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/ProcessController.php(196): ProcessHannaCode->execute() #9 [internal function]: ProcessController->___execute() #10 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(359): call_user_func_array(Array, Array) #11 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(317): Wire->runHooks('execute', Array) #12 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/admin.php(64): Wire->__call('execute', Array) #13 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/admin.php(64): ProcessController->execute() #14 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/modules/AdminTheme/AdminThemeDefault/controller.php(13): require('/customers/9/8/...') #15 /customers/9/8/c/sejero-festival.dk/httpd.www/site/templates/admin.php(15): require('/customers/9/8/...') #16 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/TemplateFile.php(140): require('/customers/9/8/...') #17 [internal function]: TemplateFile->___render() #18 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(359): call_user_func_array(Array, Array) #19 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(317): Wire->runHooks('render', Array) #20 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/modules/PageRender.module(337): Wire->__call('render', Array) #21 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/modules/PageRender.module(337): TemplateFile->render() #22 [internal function]: PageRender->___renderPage(Object(HookEvent)) #23 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(359): call_user_func_array(Array, Array) #24 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(317): Wire->runHooks('renderPage', Array) #25 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(381): Wire->__call('renderPage', Array) #26 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(381): PageRender->renderPage(Object(HookEvent)) #27 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(317): Wire->runHooks('render', Array) #28 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/modules/Process/ProcessPageView.module(152): Wire->__call('render', Array) #29 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/modules/Process/ProcessPageView.module(152): Page->render() #30 [internal function]: ProcessPageView->___execute() #31 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(359): call_user_func_array(Array, Array) #32 /customers/9/8/c/sejero-festival.dk/httpd.www/wire/core/Wire.php(317): Wire->runHooks('execute', Array) #33 /customers/9/8/c/sejero-festival.dk/httpd.www/index.php(194): Wire->__call('execute', Array) #34 /customers/9/8/c/sejero-festival.dk/httpd.www/index.php(194): ProcessPageView->execute() #35 {main}</pre> Does anyone knows what could be causing this and how I might fix it? I've tried to uninstall Hanna Code and delete the module folder from the server, and then reinstall it through the admin interface, but with same results, so I'm thinking the MySQL server on the host is different somehow from the one on my computer. :-/
  8. Thanks for the fast answer diogo! I really like the simplicity of your suggestion.. a lot! Do you have a suggestion how I go about creating a shared genre-list, file type-list, etc for all these pages?
  9. Hi all I don't know how to go about making this very specific thing in PW, so I'm hoping for some good pointers and/or ideas how to go about it. On this website I'm building for a music festival, there's a page called "archive". This page should list lots and lots of media clips from the past years from the festival. A media clip can be either a video (vimeo), music (soundcloud) or a picture (upload through admin). I have all the API access to the third parties figured out, but the one thing I can't figure out is how to design the media "resource" in PW. I've read that repeaters are bad for performance if you need a lot, so that leaves a repeater solution out of the question. Another solution I thought about were a page template with all the necessary fields for all of the different media types, but I'm thinking it'll create a unnecessary and unpleasantly long list of children in the admin interface. Also, each media clip doesn't need their own url, since all of them should be viewed/embedded in a Lightbox overlay. So what do I do? Should I create a custom module to store all the clips in and have an area in the admin to manage the clips separately and then just retrieve them in the archive page, or do you have any good ideas for me? Also, if the module method is the way forward, does anyone knows a good resource for me to start with? It could be a module like the one I need, a tutorial or anything that'll get me on my way. I hope for some deep PW knowledge getting dropped in the answers, like I'm used to in here. EDIT: Also, each media clip/item should have some common fields defined: Type of content (Art, architecture, music, etc) (selected from a predefined list of genres, which also should be administrated somewhere) Year Genre (selected from a predefined list of genres, which also should be administrated somewhere) Artist Location File type (video, sound, picture) (selected from a predefined list of genres, which also should be administrated somewhere)
  10. You're a genius. Thank you so much Adrian, it works perfectly.
  11. And back I am! WITH lots of praise! :-D You're excellent Adrian! And here's another question for you: Can I add a description to the image? I tried $socialphoto->image->add('http://localhost/pw/site/apitest/test.jpg'); $socialphoto->image->description = 'Oh haaay'; but that didn't work
  12. Thanks Adrian! I'll give it a shot tonight and return with lots of praise when I nail it
  13. Hmm.. but that looks like an example of how to create a repeater? My repeater already exists in the admin -> fields -> socialphoto, so all I want to do is to add a new repeater to the page (a page which also has the repeater field assigned to the template) for each image in a folder (In my example above, I'm just trying to add the repeater to the page and populate it with data. It's the populating with data part that I can't get right).
  14. Loving ProcessWire

  15. Hi all Well, I feel kind of stupid here, since the documentation is so perfect and there's lots of answers on this exact topic to be found out there, but somehow I just can't seem to get this thing to work. I have a repeater field called socialphoto with three fields in it: * image * date * pinned (checkbox) So what I would like to do through the API, is to loop through a local folder in the site and add a repeater item for each image found. (this is the simplified explanation). Nevermind the folder structure, my test with just one test image doesn't work, so I'm actually at square one here. This is my code: $page = $wire->pages->get("/"); $socialphoto = $page->socialphoto->getNew(); $page->save(); $socialphoto->date = '27/10/2014'; $socialphoto->image->add('http://localhost/pw/site/apitest/test.jpg'); $socialphoto->pinned = 1; $page->save(); So what happens is, the home page actually gets a repeater added... so yaay, so far so good.. however... "date", "image" and "pinned" does not resemble my API code at all. The date is just today's date, and no image nor a checked checkbox. Can anyone please help me? By the way, I haven't been playing around with PW for about two years or so before today, and let me just say I'm amazed at what have happened while I have been away. SO freaking awesome! Excellent job Ryan (and contributors of course!)
  16. Yeah I know the settings of the "wideslide", so I could just as we'll type it into the CSS, but I would like to retrieve the width and height from the setting automatically front end, so I won't have to change the CSS file if I choose to change the dimensions of the "wideslide" thumbnail setting. ;-)
  17. And of course I already have an additional question So, I could just CSS my way out of this one, but I just wanted to try something to see if I could get it to work with what I had in mind instead, and now, 2 hours later, here I am, looking for help again. Check this out: (I haven't integrated your solutions yet, Wanze, one step at a time ) if(count($page->slides)) echo "<div id='slideshow'><ul>"; foreach($page->slides as $slide) { $slide->prefix = "wideslide_"; echo $slide->render(); } if(count($page->slides)) echo "</ul></div>"; The container div will always be a fixed width and height - for each site I create (maybe vary in height from front to sub pages) - so as I said, I could just create a CSS definition width the dimensions of the container div in it, and then change it when I wanted to, but for me - and my projects, it would be ideal if the code above could take the dimensions of the wideslide setting from the image-crop module, and inline CSS it into the div tag. That way, I can also just change it back end without having to mess around the CSS files. I've looked at the $image->width properties in the cheat sheet, and I've also tried the getThumb('wideslide') function for the Thumbnails module pack, but it seems like it doesn't quite work (or rather, I can't seem to get it to work) with Repeatables - it returns an empty string or fails with a big red "admin only" message, when I try to get too creative. Actually, above problem is why I also - as you can see in my code above - have created a "prefix" variable for the template that renders the li's, which just then throws the prefix into the image URL. Please tell me if there's a smarter and better way to do this, I really want to learn how to do this the most correct way. My template file: echo "<li>"; echo " <h2>{$page->slide_title}</h2>"; echo " <p>{$page->slide_description}</p>"; if($page->slide_url != "" && $page->slide_button_text != "") echo " <a href='{$page->slide_url}' class='btn'>{$page->slide_button_text}</a>"; echo" <img src='{$page->slide_image->url}{$page->prefix}{$page->slide_image}' alt='{$page->slide_title}' />"; echo "</li>";
  18. Thanks again I really enjoy working with PW compared to a lot of the other framework-kind-of thingies that are out there. So easy to understand and get started with.
  19. Hi Wanze! Thanks for your fast reply, I'll try it out ASAP :-D I failed to mention I also have added an URL field as well as a text field (for the link button), to create a button on each slide, which is why I didn't use the standard page images.
  20. So, I've just started fiddling around with PW and so far I love it! I'm rather new to the PW way of thinking, code wise, so I hope you can help me with this thing I'm trying to do. And by all means, tell me if its a completely foolish method I'm trying. (I would then prefer to be guided in the right direction then ;-)) I've created a repeatable for the basic-page template, which consists of an image and a text field and, and what I want to do is create a jQuery slideshow with ul's and li's, where each slide has an image with a text description. So a rather simple slideshow actually. I've created a template for the repeatable loop and I also use the "Thumbnails" module for cropping the images back end. All that works perfectly. Now, my question is: Is it possible to create a "global" slideshow which is included in the top of all pages, instead of creating and uploading a repeatable with image for every single menu item? And if yes, could I make the "default" slideshow only appear if the current page doesn't have a custom slideshow repeatable defined? Meaning that the default slideshow would appear on all pages where no other slideshow is created. I hope you can help Kasper
  21. Hi there! I've just installed my first ProcessWire and I already have a question I couldn't seem to find an answer to here on the forums. I hope you can help me. When I change the name/url of a page in the "Settings" tab, the old one just throws a 404 message, but I had kind of hoped that PW would save the previous name in a "url_history" table or something like that, to look up in before throwing 404's. Is this function available or is there a way to achieve this functionality? Some times one would change the url, both for SEO purposes, but also if the type of content changes radically, and it would be a shame to lose the SE position/index. I'm already really excited about PW and I'm looking forward to getting it to know better. ;D Regards Kasper
×
×
  • Create New...