-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
WEll it was when I coudn't help to make page sunpublished already on running site that needed approval before going live. Could have done it differently but I just tried intuitively and it just worked... with a little smile.
-
It just works and I used it a lot.
-
Apeisa is right. But if you really can't help it and it is a must you can do this: $pages->get("/path/, include=all");
-
This could also work $pages->find("parent=/galleries/,categories_selected=$category, private=0"); parent= will look for direct children of /galleries/ only And to make it complete this if searching for nested children $pages->find("has_parent=galleriesID, categories_selected=$category, private=0");
-
What search? Code?
-
That's true, although I also got problems sometimes on my androrids. I dislike the CODE tag. I alway use the clean button after copy paste. The snappy bug when resizing the wysiwyg in chrome is pretty annoying too btw. I'm not saying we should switch to the old I jsut prefered it simple style and it worked. I appreciate the work put into the new forum, I know how hard it is to find a good forum software and I also used quite some forums over the years so there's much worse. Edit: And sometimes new replies post don't show up or I don't get notified by mail on some. Strange.
-
Yeah that's what I meant. Though never came across having to structurally change a website drastically like this anyway. Not very good regarding SEO and searchengines, so a structure defined will stay the way it is anyway.
-
I'm very annoyed and loved the previous forum software much more. Now since a couple days when editing a post all the indentation of code gets lost.
-
Ah thanks for your response. That's where I often use the $page->rootParent->title for sections and alike, given the structure. Doesn't work of course if a section is nested.
-
The PW version is always present in the footer. It's by intention there's no such info screen, and will hopefully stay like this. Anyway there's always the possibility to create your own very easily. Also if you like dashboards this might come soon
-
Quick look at intall.php it turns out it parses the phpinfo() table and search for json support. It may fail because the phpinfo returned is different in php5.4. Are you still able to install it anyway?
-
$category in this code is a Page object (of Page class) so you can add and populate a property on the fly to the objects and use that on runtime. Like a virtual field that isn't saved to page.
-
$found = $page->parents->find("template=basic-page")->reverse()->first(); This would be the equivalent of closest return only 1 page, and performance-wise also fast as it won't need to query for 1000s pages anyway. Would be nice addition to have a shorter version if needed anyway. Just got me curious. For what task are you using closest method so often?
-
I want a $page->nextUntil(); and $page->prevUntil(); ...and if possible a $page->parentsUntil();
-
Couldn't the $page->parents() be used to do this? $found = $page->parents->find("template=overview"); $theone = $page->parents->find("template=overview")->first();
-
Cool site! Thanks for posting. Not sure about something I glimpsed at the code. I don't think you need to include 3 times the jQuery core script <script src="http://amberanderson.co.uk/js/jquery-1.7.2.min.js"></script> <script src="http://amberanderson.co.uk/js/jquery-ui-1.8.18.custom.min.js"></script> <script type="text/javascript" src="/site/templates/scripts/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/site/templates/scripts/main.js"></script> <script type="text/javascript" src="/site/templates/scripts/jquery-1.7.2.min.js"></script>
-
Actually this doesn't have to do anything with the blank fields in the translation. If Ryan adds new modules, they first would have to be added to the de translation so it generates its own json file. It doesn't do that automaticly.
-
Only way: API, or module using API
-
I also thought about this in particular when creating an online gallery, it's not as easy but possible. I'm not sure about sizes and page loads as I think google indexes without loading images, I think that's was their image search does. Only limit I know is for tablets and phone that will crash on about 500kb, images are different. The concept would be simple but will require some work and figuring out. You generate a gallery 1 page a image that works with normal urls and segments, then progressively enhance it using ajax to create the page (image page) loading and replacing of the content. In the templates you create a image view with caption that is returned if loaded via ajax. If not requested via ajax you add header and footer from the rest of the site. You can test this with the $config object. A view might look like this (pseudo code): if(!$config->isAjax) { include("./header.inc"); } // get what image should be displayed from ajax request (post) if($config->ajax) { $imgcat = $input->post->category; $imgname = $input->post->imgname; $img = ... // do some magic to get image and output it. } else { // alternatively get the image from urlSegments $imgcat = $sanitize->name($input->urlSegment1); $imgname = $sanitize->name($input->urlSegment2); $img = ... } echo "<figure>"; echo "<img src='{$img->url}' alt='{$img->alt}'/>"; echo "<figcaption>{$img->description}</figcaption>"; echo "</figure>"; if(!$config->isAjax) { include("./footer.inc"); } If a visitor comes through google with the urls segment url, you can do some jquery/js magic to check the url and if usr has js he will get redirected to a url that can fully use your ajax gallery. So if google comes it will browse a regular "static" version, if a visitor comes with js he will get enhanced features. You could also go as far to implement some plugin that allows for history either using hashs or push state. I don't know if there a jquery gallery that would help on this, or if you would have to code it yourself.
-
Reading and displaying data from a custom table
Soma replied to einsteinsboi's topic in General Support
If it's a table in PW DB you can do SQL queries like this: $result = $this->db->query("SELECT id, name, title, url FROM yourtablename WHERE id=$id"); Some modules use this , if you look at ProcessRedirects for example https://github.com/apeisa/ProcessRedirects -
Reading and displaying data from a custom table
Soma replied to einsteinsboi's topic in General Support
Maybe this is of interest. -
..and the first like! Welcome.
-
This should be possible to add to the module. Though don't know how. ProcessPageList can't be used, but Page::viewable I remember using but doesn't work. Page::viewable does hook, but then setting $event->return = false to hide certain pages doesn't do anything.
-
yeah it's "==" not "=". if you use "value == field" it won't happen as it will throw an error.