-
Posts
7,480 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
@Soma, I am taking back my like in that case
-
How can I show the title of a Page Field in admin Page List?
kongondo replied to doolak's topic in General Support
Maybe it's just me but I don't understand your question Page Field: What page field is this? Are you referring to an actual Field of the type Page? Instead of the number: What number is this? Is this an ID? A count? admin Page List: Are you talking about the Page Tree that in the admin that shows a list of your site's pages? Or are you talking about a list of pages selected in a Page Field that is visible when you editing a page using a template that has that Page Field? A screenshot would help -
Fatal error: Allowed memory size exhausted
kongondo replied to verdeandrea's topic in General Support
Speaking of teachers...https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ -
Fatal error: Allowed memory size exhausted
kongondo replied to verdeandrea's topic in General Support
Did you my edit in the post above yours about using PageTable with existing pages? -
Fatal error: Allowed memory size exhausted
kongondo replied to verdeandrea's topic in General Support
Would this help? https://processwire.com/talk/topic/8177-page-table-howto/?p=81311 Meanwhile, you could try increasing the memory as well -
Fatal error: Allowed memory size exhausted
kongondo replied to verdeandrea's topic in General Support
You might want to consider using PageTable.. https://processwire.com/talk/topic/6417-processwire-profields-table/?p=63119 -
Here's one way to do it.. Create a folder 'tmp' in you /site/ directory. Copy your images in there. Careful if your images are huge in size! You might run out of memory... Run the following code in one of your template files...(this code could be further optimised..but you get the idea...) $p = $pages->get(1419);//page where we want to save our images //absolute path to a directory called 'tmp' within the site folder where we have our images $dir = $config->paths->site . 'tmp'; //if we found the directory (here we use Standard PHP Library (SPL)) if (is_dir($dir)) { $directory = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS); //iterate through each file in this directory foreach ($directory as $path ) { set_time_limit(30);//we try to avoid timing out //Remove and delete invalid file types $validImagesExts = array('jpg', 'png', 'gif', 'jpeg'); if($path->isFile() && !in_array($path->getExtension(), $validImagesExts)) { unlink($path);//we delete the invalid file continue; } //if valid image file we save it to the page if($path->isFile()) { $p->of(false);//output formatting off $p->images_field->add($dir . '/' . $path->getFilename()); $p->save(); } }//end foreach $p->of(true);//output formatting on }//end if (is_dir($dir))) else echo 'No Such Directory Found!';
-
Opencart 2.0.0 with Dutch language 2.0.X: cannot get rid of empty field values
kongondo replied to motionmindz's topic in Pub
Off to the pub we go for now... -
This folder is full of examples /wire/modules/Fieldtype/
-
Changwuf31, welcome to PW and the forums. PW does not output any markup. If you know your CSS and HTML, you can easily create a responsive, etc site. PW does not get in your way. To get most of the system, I suggest you start with these tutorials: http://processwire.com/docs/tutorials/simple-website-tutorials/
-
@Peter Btw, if all you are using the field 'Content_Type' for is to differentiate those Blog Posts from other Posts, remember you can also use a checkbox. A checked checkbox could denote 'special' posts. Alternatively, if you still want to use the page field 'Content_Type', unless there are other special tags, there is no need for that field to be a Multiple Page field. There are a number of options. One that would work right across the board (but may not be easy/possible for your editors?) is, instead of adding the extra 'Content_Type' field, just set the page status of your 'special' Posts to 'hidden'. They won't show up in Posts, Tags, Categories, Archives and Authors pages. For Comments and Recent Comments and also to show them in your stand-alone section of the site you would need to do something like below... Show only special posts in stand-alone section //find only hidden posts //$posts = $pages->find("template=blog-post, status>1024");//similar to below but less readable $posts = $pages->find("template=blog-post, status>".Page::statusHidden); echo $modules->get('MarkupBlog')->renderPosts($posts); Remove hidden (special) posts from the output from the demo blog-comments.php, i.e. /blog/comments/ //modified code excerpt. See the file blog-comments.php $comments = $blog->findRecentComments($limit, $start); foreach($comments as $comment) { //remove comments from blog posts with hidden status if($comment->page->isHidden()) $comments->remove($comment); } $content .= $page->blog_body . $blog->renderComments($comments, $limit); Remove special posts from the Recent Comments in the right sidebar of the demo blog (blog-side-bar.inc) //excerpted and modified from blog-side-bar.inc foreach($comments as $comment) { if($comment->page->isHidden()) continue;//ignore comments from hidden posts $cite = htmlentities($comment->cite, ENT_QUOTES, "UTF-8"); $date = $blog->formatDate($comment->created); $out .= "<li><span class='date'>$date</span><br />" . "<a href='{$comment->page->url}#comment{$comment->id}'>$cite » {$comment->page->title}</a>" . "</li>"; }
-
Related issues: https://processwire.com/talk/topic/4222-custom-field-to-select-unpublished-pages-selectable-but-doesnt-save-selection/ https://processwire.com/talk/topic/5083-possible-bug-page-fieldtype-with-custom-selector-to-find-selectable-pages-returns-error-while-saving-page/ From that last link, it says that you would have to use ID instead...('template=user, roles=1234')...See Ryan's explanation...
-
Have you seen this?: https://processwire.com/talk/topic/4131-difference-between-add-and-append/ - with the exact same topic title as yours... I also recall you've asked a similar question today here? https://processwire.com/talk/topic/6662-markup-cache-and-pw-performance/?p=81253 No need to double post..
-
Nice one Adrian! Minor suggestion, maybe add a note/description to the setting 'Protect children' that the protection cascades to grandchildren, etc.
-
503 Error on Page Save - memory usage overloading server
kongondo replied to Anton Martin's topic in General Support
Since you've isolated the problem to pages that contain repeater fields, that's where I'd focus (having ruled out the other usual suspects). Have you tested your site on a local/dev server? Do you get the same problems? Maybe its some field within the repeater? You could remove them one by one from the repeater and see if that changes things? Using massive images in the single image field? Just a couple of things to check out... Are there any errors recorded in your PW logs btw? -
OK. If you have any issues with the Blog Module please post them in its support forum, thanks.
- 75 replies
-
Hi @Sephiroth, Welcome to PW and the forums. I am sure Joss is writing a long post right now to answer your questions ...(edit: he just did) About this: Can you confirm if you are really talking about the Blog (Site) Profile rather than the Blog Module? if the latter, what errors did you get? The Blog Module works fine for me even in 2.5.9. PHP Unit Testing: There was something in the works but I don't know the current status - https://processwire.com/talk/topic/2609-tests-for-processwire-core/ Menu Management: There is nothing out-of-the-box that the client themselves can (should?) use. A while back I did a proof-of-concept Menu Builder but never got it finished. However, there are other ways to achieve this. One way is to set up (yes, you guessed it), a 'page' field that you can attach to some template where a client can select pages that he/she wants to appear in a menu. A second similar option is to set up a 'checkbox field' that you attach to the template of pages that can potentially appear in a menu. Every time the client edits such pages they can tick the checkbox to enable (or disable depending on how you code it in your template file) that page to appear (or not appear) in a menu. Custom Post: Don't use WP so I don't know what this is. Maybe explain a bit more? Edit: OK, just read this: Given Joss' explanation above about pages, I think that answers your question. Really, in PW everything is custom. PW doesn't care what you call them . You will probably get a better explanation...
- 75 replies
-
- 3
-
@toothpaste, until I update the Blog docs, it's all here in post #207. What you want is to pass 'post_categories_text' as part of an array (e.g. $options) as the third argument in renderPosts(). Here's a quick one line example - you would probably do it differently depending on your needs, e.g. create the array with all your options first then pass it to renderPosts(). We replace 'Categories: ' with 'Groups: ' echo $modules->get('MarkupBlog')->renderPosts($pages->get('/blog/posts/material-design/'), '', array('post_categories_text'=>'Groups: '));
-
Sorry for wasting your time!!! Triple facepalm!!!! Agghhhhhhhhhhhh!!!! Bitten once again!!!! I am going to hide under a rock and will not come out soon. ABP - guilty again! Your module works a treat! See example below, working together with Blog Module. Will post example code later in Blog thread...Thanks!
-
I am testing on a template with hardly any CSS at all. For good measure, I even deleted the CSS with the same results. Below is my output. See the greyed out output for the Social Shares below after email. Yes, email has no 'popup' class.
-
Thanks for this Soma. For some reason apart from the 'email', all the other social shares are hidden. The <ul><li> is output but the inner <a> and <i> are hidden, e.g. <i class="icon-twitter">twitter</i> is hidden (CSS). 'Twitter', 'facebook', etc are not shown. Same thing happens if I use icons. The <svg> are hidden. What am I missing?
-
Is the service down? My installs are stuck at 'Deploying Your Site'. Nothing happens, no process bar, nothing. This has been happening for 3 days now.
-
Not sure you have seen this in Hanna Code's PHP usage notes? Hence $page->template refers to your blog post template whereas wire('page')->template refers to your summary page template.
-
In that case, there seem to be a number of other options. In PW 2.5.? (can't remember version) you can export and import fields. https://processwire.com/blog/posts/august-2014-core-updates-1/ Maybe even Adrian's migrator can help here? Not sure, would need to confirm