Jump to content

gebeer

Members
  • Posts

    1,393
  • Joined

  • Last visited

  • Days Won

    39

Everything posted by gebeer

  1. Yeah, would be great if we could decide on a template basis whether to use sessions or not.
  2. Thanks for the answer. I see that there is a config setting "$config->sessionExpireSeconds" which defaults to 86400 seconds. Would it make any difference to the server load to reduce the session time? Or does nayone have an idea how to deal with the situation?
  3. Hello all, I am using part of a PW install as a backend for a RESTful API. Everytime a client consumes the API, a session is started. The RESTful approach is sessionless per definition and I would like to avoid sessions, if possible, for performance reasons. When I look at the open sessions while only one client is getting or putting data through my REST API, I can see that there are quite a few (over 50) sessions open from that client. The project is at a testing stage right now and I'm afraid that once 50 or 100 clients are connected, the sessions will put a big load on the server. Is it advisable at all to try and avoid sessions? How would I go about killing sessions or, even better, connect to my API endpoints without starting a session in the first place?
  4. Hello everyone, for a project that is utilizing ProcessWire as a web frontend and REST API backend, we are looking for a hybrid app developer. ATM our client has native Android and iOS apps that exchange data trough a REST API with the ProcessWire web app and then display that data on the mobile clients. We are looking into possibilities of dropping the native apps and working with a hybrid app instead. The project is long term. The web frontend and REST API is already up and running, though at an early stage. I can't get further into details here. Please PM me if you are interested and I will share more details. Thank you.
  5. @TLT happy to here that you like my profile I tried to keep everything as minimal as possible. That is why the collapse plugin is not included in plugin.js by default. But, thinking about it, it makes sense to include it by default. I will amend and update the profile on github. EDIT: profile is now updated on github
  6. First off, thank you for this great module. I have installed the latest version (0.8.2) and assigned one template (workshop) I'm doing import of pages from a Joomla site and want to set values for SEO fields through the API. But I get this message when trying to save data to SEO fields: "Notice: Indirect modification of overloaded property Page::$seo has no effect in /var/www/qgtpw/site/templates/convert.php on line 225". My code $data = csv_to_array('inc/joomla_workshops.csv'); foreach($data as $csv) { $jid = $csv['id']; $title = $csv["title"]; $description = $csv["metadesc"]; $keywords = $csv["metakey"]; $workshop = $pages->get("template=workshop, jid={$jid}, include=all"); if ($workshop->id) { $workshop->of(false); var_dump($workshop->seo); if ($title != "") $workshop->seo->title = $title; if ($description != "") $workshop->seo->description = $description; if ($keywords != "") $workshop->seo->keywords = $keywords; $workshop->save(); $wokshop->of(true); echo "$jid<br>"; } } The var_dump gives "null"; How would I go about saving data to the SEO fields via the API?
  7. If you are working with sublime text I can definitely recommend SFTP package for sublime which integrates very nicely. Main advantage is that you don't need to switch between code editor and ftp program. Everything file transfer related happens from within the code editor, which, in my opinion, greatly enhances the workflow. You can even sync folders bidirectionally or diff local to remote files etc.
  8. I am currently working on a project where Android apps connect to a PW DB to put and get data. For data exchange I decided to create a REStful service with PW. There is a REST helper class for PW from clsource which is working great. The Android apps also display HTML that is rendered by PW and sent as JSON to the Android app. I am not in charge of the JAVA part so I can't tell you what is needed on the Android side to render that JSON. There is the Ionic framework that helps in developing android apps based on web technologies without using JAVA.
  9. Thanks for the hint. I don't really need a list of files. Just the uploading part. So I will have a look at the InputFieldFile module and see if I can deactivate the listing of files.
  10. So the bottleneck would be the thumbnail-display. Couldn't we just switch that off through a hook or take the image input field module as a template and remove the part for thumbnail display? I just realised that I can use the file field for handling the uploading of images (in the end they're files). I will try this with a large amount of images and report back.
  11. Hello everybody, I'd like to use the images field as an upload UI. One image field would hold 1000+ images and I am wondering how this would perform in the backend. I would only need the upload functionality. No need for thumbnail display, ordering etc. Has anyone experience in using an image or file field with very large quantities of images? Or is there an alternative upload UI for PW that stores all images to a single folder? EDIT: I don't need to upload 1000+ images in one go.
  12. the html img tag does not have a closing tag, so your code should read if ($page->pictures) { $content.='<figure><img class="artikelbild" src="'.$page->pictures->url.'" alt="" /></figure>'; } Give this a try and report back. Is your $page->pictures field for single or for multiple images? If it is for multiple images, if($page->pictures) will always return true. Then you should do if(count($page->pictures)). Also, if your image field is set to multiple images (which is default) $page->pictures->url will not work. You'd need to do $page->pictures->first()->url to get the first image. Have a look here to learn more about images in PW. EDIT Just a quick tip to make writing code easier: If you use double quotes, you can write your variables directly inside the quotes like $content.="<figure><img class='artikelbild' src='{$page->pictures->first()->url}' alt='' /></figure>"; More about single and double quotes here
  13. Hi Phil, can't see anything wrong here. Except for <a class="nav-btn" id="nav-open-btn" href="<?php $homepage->url ?>">Menü</a> is missing the echo statement. So it should read <?php echo $homepage->url ?>. But this shouldn't be the cause of your problem. You are saying that this happens on all pages but the home page. So it might be related to something that is wrong with your other templates, e.g. basic-page.php. You might want to compare them thoroughly to home.php and maybe you can spot the difference. If not, post one of the templates that cause this behaviour. I don't think that it is related to the "Content Type" at the "Files"-Tab. If you leave these all at defaullt you should be fine.
  14. For me the biggest benefit is that Leaflet is based on OpenStreetMap data and there are no usage limits that I'm aware of. Also with leaflet providers you get a wide variety of different map tile providers to choose from. Here is a good read comparing GM and Leaflet and OpenLayers.
  15. @Mats your module is really awesome. Thanks again! I forked it and added support for leaflet providers. Still beta but I couldn't find issues so far.
  16. Looks like a .htaccess RewriteBase issue to me. Try to play with the settings in .htaccess around line 115 - 125.
  17. Hi Phil and welcome to the forum! I remember that I had a similar problem one time at the beginning with PW. It most likely is caused by some missing closing tag or other html syntax error. Hard to tell without seeing code. If you can supply your main.php, we can have a look.
  18. I am working on a similar scenario where mobile clients are sending and getting data to/from PW. My approach was to implement a RESTful service. I am using clsource's REST helper class and it is working fine. But it is not really a simple solution. There also is Ryan's Pages Web Service module. But I'm not sure if you can use it to push data from the client to the server.
  19. Came across this thread through the latest PW newsletter issue. Currently I'm working on 5 different projects with PW. Most is rather simple stuff regarding complexity of site structure. One site is for the Universal Healing Tao Foundation of Grandmaster Mantak Chia and shows the organizational structure of the world wide foundation. To visualize the structure I am making my first steps with D3 JS which is a lot of fun. I created an SVG world map with data for all countries and continents and connect that map to data of people that are active in the foundation and hold various positions in their country. The site is based on my Bootstrap/Fontawesome SASS site profile. The current dev status can be seen here. One of the more complex sites has an extensive frontend user area where users can manage their sound servers and publish advertisements to their servers which will later be displayed on mobile devices that are connected to the servers. Quite complex forms with PDF to image conversion on upload etc. that I am building with the PW form API. This site is also dealing with data exchange between PW and mobile devices where the mobile devices connect to PW through a RESTful API to send and get data. Doing this the first time and, honestly, I don't know if I would have had the confidence to take on the project without having PW as the perfect tool at my hands
  20. Did you already try to change your hook event from 'save' to 'saveReady' ?
  21. @LostKobrakai Thank you for clarifying and giving insight on the inner workings of images/file fields.
  22. Have you tried $page->article_visual_snippet->add("path or URL to image") instead of $page->article_visual_snippet = URL. Not sure if it will make a difference, but maybe worth a try. And you can try to hook on saveReady instead of save. Is article_visual_snippet a single image field or should it hold multiple images. If only 1 image, you could set Maximum files allowed to 1 and Formatted value to 'Single Item (null if empty) and do if($page->article_visual_snippet){... instead of if($page->article_visual_snippet->count() < 1)
  23. As of 2.6.5dev there are these neat extra action buttons 'unpub', 'hide' etc in the page tree. In ListerPro we can define our own actions as modules that extend the new PageAction class. Ryan mentions in the ListerPro forum that the page actions are a new feature of PW and that they are independent from ListerPro. It would be great if we could define our own page actions and attach them to the page tree or to lister results. Looking at the code I am not quite sure how we can achieve that through a hook or the like. So for all not so code savvy PW "hookers" (pun intended) it would be great to get some documentation on this new feature.
×
×
  • Create New...