Search the Community

Showing results for tags 'pw3'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • ProDrafts
  • ListerPro
  • ProFields
  • ProCache
  • Form Builder
  • Likes
  • ProDevTools
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 21 results

  1. ridgedale

    Reference: PW 3.0.62 and uikit3 based site using the Regular-Master profile. I have a table that needs some of its content to be hidden. I've tried applying the following classes and styles to <tr>, <td> and <a> elements all without success: class="hidden" class="uk-hidden" class="uk-invisible" style="display:none" style="visibility:none" style="visibility:collapse" <-- only applicable to rows in this case Is there any way to allow a user to hide content? Any assistance would be appreciated.
  2. Reference: PW 3.0.62 and uikit3 based site using the Regular-Master profile. The issue is that blog posts for the particular site in question are automatically formatted as /blog/<blog-post-title>. It is evident the path format should have been configured as /blog/<year>/<month>/<blog-post-title>. Please could someone advise whether or not it is possible to change the path format for the blog posts of an existing active site that uses the regular profile? Any assitance would be greatly appreciated.
  3. Reference: PW 3.0.62 and uikit3 based site using the Regular-Master profile. I've setup a hidden page and template (sitePreferences - with no associated template file) containing site-wide preferences/settings, however I can't get the field content to display. I've tried the following which either display nothing or break the site: <?php echo $item->siteChairperson; ?> <-- nothing gets displayed <?php echo $field->siteChairperson; ?> <-- nothing gets displayed <?php =page()->siteChairperson ?> <-- breaks site <?php echo $field = $fields->get('siteChairperson'); ?> <-- displays the text siteChairperson instead of the name. <?php =sitePreferences()->siteChairperson?> <-- breaks site <?php echo $field->get($siteChairperson); ?> <-- breaks site Any assistance would be greatly appreciated.
  4. Reference: PW 3.0.62 and uikit3 based site using the Regular-Master profile. I wonder if anyone has come across the problem of displaying images within the <figure> element before. When editing a page: If an image is added inside <p></p> tags without any align assigned, it displays normally at the size the user has specified. See screen grab example 1. If an image is placed inside the <figure> element and left or right alignment applied, the size the image is displayed as in the editing view is significantly reduced. See screen grab example 2. If an image is placed inside the <figure> element and center alignment applied, the size the image completely disappears in the editing view with only the caption text showing. See screen grab example 3. The code used to display an image in <p></p> tags without aligment assigned is standard: <p><img alt="" src="/<path-to-image>/image.jpg" width="128" /></p> Examples of the code automatically being generated by PW3/UiKit3 from within the image editing interface are: <figure class="align_left"><img alt="" src="/<path-to-image>/image.jpg>" width="128" /> <figcaption>Caption text</figcaption> </figure> <figure class="align_right"><img alt="" src="/<path-to-image>/image.jpg>" width="128" /> <figcaption>Caption text</figcaption> </figure> <figure class="align_center"><img alt="" src="/<path-to-image>/image.jpg>" width="128" /> <figcaption>Caption text</figcaption> </figure> Important Note: The images and and captions actually do display correctly when the website is browsed, but from the editing perspective it is not practical. Any thoughts or advice would be appreciated.
  5. Has anyone come across this issue where Amazon Cloudfront seems to refuse to cache a certain small number of static objects? I've tried invaliding the cache (root path) several times to no avail. I had a look at the file permissions of the objects in question, and they seemed all ok. I've also gone into the Amazon Console and there are no errors logged. You can see more details of this here : http://www.webpagetest.org/performance_optimization.php?test=171106_A4_be80c122489ae6fabf5e2caadcac8123&run=1#use_of_cdn I recently upgraded this test site to PW 3.062 from PW 2.8.x and noticed this was happening. I'm also running the latest version of Procache on this site.
  6. Sorry folks if this is obvious to most and I missed something in the docs or here in the forum, but, I have cheerfully used code such as: if($user->isLoggedin()) { echo " loggedIn"; } else { echo " notLoggedIn"; } in PW 2.x sites. Now on a v3 site I am finding even the most basic test to see if the viewer is logged in or `isSuperuser()` is not giving an error but simply doing nothing - not evaluating. For example, the top of a typical template reads: <?php namespace ProcessWire; if($user->isLoggedin()) { echo " loggedIn"; } else { echo " notLoggedIn"; } I have `debug` turned on. Is there something obvious I have missed, perhaps a step required for v3 that's not required for v2 to allow access to $user data? Thanks for any pointers.
  7. ridgedale

    I've been trying to work out how I can provide a frontend file upload (whatever file format the user chooses to upload - albeit not executables!) for registered users to be able to create pages/posts and upload any file they wish so they can create a link to the file so it can either be downloaded or displayed. Everything I've read so far appears to relate to just images and uploading and adding images is already covered using the images field. Any thoughts/guidance would be a appreciated.
  8. Reference: PW 3.0.62 and uikit3 based site using the Reglar-Master profile. I'm trying to add a count of the number of category posts to display beside each of the category titles listed in the sidebar on the blog page. The following code displays the total number posts on each category page: <span class='uk-text-muted'>Total <?php echo page()->title; ?> posts: <?php echo count(pages()->get('/blog/')->children("categories=$page")); ?></span> The following default code displays the heading and a list of the categories: <?php $categories = pages()->get('/categories/'); echo ukNav($categories->children, [ 'header' => $categories->title ]); ?> but I want to add the respective number of posts on the same line as each category title listed. When I try replacing the default code with the following: <?php $categories = pages()->get('/categories/'); $catposts = count($categories->children("categories=$page")); echo ukNav($categories->children . ' ' . $catposts, [ 'header' => $categories->title ]); ?> I get the following error: which refers to the following code in the _uikit.php file: $page = $items->wire('page'); // current page and when I try: <?php $categories = pages()->get('/categories/'); $catposts = count($categories->children("categories=$page")); echo ukNav($categories->title); foreach ($categories as $category) { echo $category->children . ' ' . $catposts; } ?> or: <?php $categories = pages()->get('/categories/'); $catposts = count(pages()->get('/blog/')->children("categories=$page")); echo ukNav($categories->title); foreach ($categories as $category) { echo $category->children . ' ' . $catposts; } ?> I get the same error. If I change to I get the following error messages: Any advice on where I am going wrong would be very much appreciated.
  9. I'm in the process of finalising a pw 3.0.62 and uikit3 based site which using the Reglar-Master profile and I've noticed pagination is missing despite the Allow Page Numbers? setting being enabled under the blog template URLs tab. The default blog.php template is as below: <div id='content'> <?php echo ukHeading1(page()->title, 'divider'); $posts = page()->children('limit=10'); echo ukBlogPosts($posts); ?> </div> Reducing the limit as follows does not result in any pagination being displayed despite there being 10 news posts. ... $posts = page()->children('limit=6'); ... If I have understood correctly, it should not be necessary to add the MarkupPagerNav module to this profile as the capability should already be already built-in. If that is the case, then I can only think that some additional code is required. Any help would be greatly appreciated.
  10. Hi everyone! this is my first topic and I need to say thanks to @ryan and all the other contributors for this incredible framework that changed my life as a web dev! But now I go to the point. I developed a project with pw 2.7 and it worked like a charm. Today i'm trying to update the project to pw3 on a local environment, to test that everything will continue working after the upgrade, and that's not the case. The major bug I'm encountering is that repeater field doesn't work properly. Existing Repeater field This is what I see when I try to edit a page that already has a repeater field (Brand concepts) with some elements: If I click on one of the "... blocks" nothing appens. New repeater field If I create a new repeater field and assing it to a template, when I open a page with that template I see the new repeater field, but the "Add new" link, to add a new element, doesn't work. I click it and nothing appens. I never had this kind of strange behaviours in PW, and this is one of the reasons why I consider it the best cms/framework I've ever used. I hope you can help me. Thank you!
  11. ridgedale

    Hi, I'm trying to append a contact form to the existing contact page content. The existing content for the _main.php page is as follows: <div id='content-body'> <?=page()->body?> </div> I've created a contact.php page and have included the following code but the form is not being rendered: <?php namespace ProcessWire; // This is the form for the /contact/ page. ?> <div pw-append="content-body"> <div id="contact-form"> // ... contact form details here </div> <p>&nbsp;</p> </div> The following is returned in debugging mode which doesn't appear to be of much help: Any thoughts on what I am doing wrong? Any help appreciated.
  12. I'm using Processwire 3.0.61 with the site-regular profile and am in the process of browser/device testing for the template I'm working on. I've managed to get a consistent displaying of the site across Firefox, Google Chrome, Internet Explorer, Opera, Safari (both Windows and Mac checked but not Linux, yet) and Android (portrait orientation on SIII Mini). When I initially switch to landscape orientation on the SIII Mini the layout is consistently retained. I'm assuming that is because the device initially zooms the page rather than redraws the screen. However, as soon as I click on the menu icon the screen is redrawn in such a manner that the body of the template is offset by what looks like +10px or so (right and down) pushing the whole of the content off the screen to the right as well as down. Interestingly the shadow on the banner background image (set to fill width of screen using the cover attribute) remains in place where it should be. But there is also the wierd artifact that any horizontal rules appear twice (once where they should be and once offset again by what looks like the same amount as mentioned above). Nothing I've tried in terms of CSS3 has any effect so far. I'm wondering if anyone else has come across this issue. If so, could it be related to the UiKit3 css/js code? Any help would be appreciated.
  13. I was wondering if anyone has successfully integrated Securimage with Processwire 3. I've tried the suggested fixes posted here, but I haven't managed to get the captcha image to display. This might be because the instructions relate to Processwire version 2.x where I am working with version 3. Any ideas/steps what to do would be appreciated.
  14. Hi, I've separated the header and footer information from the _main.php (_header.php and _footer.php). This works fine with any top level page but any page children are rendered without the header and footer information. When I add includes to the blog-post.php, for example, and try refreshing the page the following error is returned: The line of code being referred to is: echo ukBlogPost(page()); Could this error be being generated because I am working locally using MAMP? Any assistance would be greatly appreciated.
  15. Jonathan Claeys

    I just noticed when I try to do this in the ready.php that it can not retrieve the page. This works perfectly in the init. But since I need my languages I'm forced placing it in the ready. I'm just trying to get the child from a page. $pages->get("name=settings")->child(); Var_dumping that gives me a Nullpage. (and yes the name is correct since it does work in init.php but doesn't in ready.php) So I have no idea what I'm doing wrong, I was guessing maybe it's a bug?
  16. Hi fellows I have a problem with one of my hooks in processwire 3. It's a hook which manipulates the processpagelist to only show the pages which are not editable and not addable. This works fine in 2.7.3 but in pw 3 it doesn't work 100%. When the first time the ProcessPageList is rendered the hook works. Now when I open a branch and reload then it shows all pages. but when i close the branch before reload it works again and only shows the pages which are editable or addable. How it should look like: How it looks when i let the branch open and reload: PHP-Code $this->addHookAfter('ProcessPageList::execute', $this, 'hidePages'); public function hidePages(HookEvent $event){ $excludePages = new PageArray(); $the_pages = wire('pages')->find("template=newsletter-clinic|sender_2016|sender_2016_collab|inside-news-folder|event-clinic"); foreach ($the_pages as $the_page) { if(!$the_page->editable() && !$the_page->addable()) { $excludePages->add($the_page); } } $hidden = explode('|', $excludePages); if($this->config->ajax){ // manipulate the json returned and remove any pages found from array $json = json_decode($event->return, true); foreach($json['children'] as $key => $child){ if(in_array($child['id'],$hidden)) unset($json['children'][$key]); } $json['children'] = array_values($json['children']); $event->return = json_encode($json); } } Do you perhaps know what causes this and how to fix this?
  17. Hello everyone. I have strange things happening when I want to edit Site translation files. When I try to edit files I got error: " Session: File does not exist: /site\templates\include\footer.inc (translation file not needed? textdomain: site--templates--include--footer-inc) " Here I noticed strange division on left. Somehow it is change direction. Can anyone explain to me why this is happening, and can cause this error?
  18. Hi there, I just tried to implement a process module for a PW3 (3.0.32 devns) installation with a custom namespace and found that there's an issue with assigning the new Process to the newly created admin page. ( ! ) Warning: class_parents(): Class ProcessWire\ProcessNamespaceTest does not exist and could not be loaded in /var/www/public/pw3/wire/core/Functions.php on line 721 It looks like the custom namespace is ignored... The demo module looks like this: <?php namespace ACME; use ProcessWire\Process; /** * ProcessNamespaceTest/ProcessNamespaceTest.module */ class ProcessNamespaceTest extends Process { ... I also added the appropriate settings for autoloading in the composer.json file and did a composer dump-autoload: "autoload": { "files": [ "wire/core/ProcessWire.php" ], "psr-4": { "ACME\\": [ "site/modules/ProcessNamespaceTest" ] } } Does anyone have an idea if I missed something? Thanks Alex
  19. Hello, the frontend edit mode in pw3 is allready great. But I'n looking for a solution where I can have the create/update form on a edite page. (url/urlsegmaent=edit). With all the released code here I was able to put together some code that does that. So far it works to fill the page for the first time, but unfortunaly it dosen't work so great on updating the page. When I try to update, the page disappears from the frontend. Its still visible in the backend but seems to be corrupt. Here is the code I used: <?php namespace ProcessWire; ?> <?php $content =''; ?> <?php $content = ''; $out = ''; if ($input->urlSegment(1 ) =='edit'): if(!isPageOwner()) throw new Wire404Exception(); // Edit Form // get a page $editpage = $page->setOutputFormatting(false); $ignorefields = array("isOld","user_activation","language_published","roles","admin_theme"); $form = $modules->get("InputfieldForm"); $form->method = 'post'; $form->action = './'; // get the collection of inputs that can populate this page's fields $inputfields = $editpage->getInputfields(); // make all the fields required and add them to the form foreach($inputfields as $inputfield) { if(in_array($inputfield->name, $ignorefields)) continue; $form->add($inputfield); } // the inputfields don't already have a submit button, so we'll add one. $submit = $modules->get("InputfieldSubmit"); $submit->name = "submit"; $submit->value = 'Submit'; // add the submit button the the form $form->add($submit); // process the form var_dump($editpage->snippet_repeaterblock->first()); echo '<hr>'; var_dump($editpage->snippet_repeaterblock); echo '<hr>'; $rpf_count = $editpage->snippet_repeaterblock->count(); echo $rpf_count; if($this->input->post->submit) { echo $firstRepeaterId; $n = 1; $codesnippet = "snippet_code_repeater$n"; $codelanguage = "snippet_select_codelanguage_repeater$n"; $snippet_repeaterblocks = $editpage->snippet_repeaterblock; // the repeaters foreach ($snippet_repeaterblocks as $item){ # $item = $pages->get("id=$snippet_repeaterblock->id"); // the repeater page we want to update $item->of(false); // update repeater fields $item->snippet_code_repeater = $input->post->$codesnippet; $item->snippet_select_codelanguage_repeater = $input->post->$codelanguage; // save the repeater page $item->save(); // update counter etc $n++; $codesnippet = "snippet_code_repeater$n"; $codelanguage = "snippet_select_codelanguage_repeater$n"; } # New Code End // now we assume the form has been submitted. // tell the form to process input from the post vars. $form->processInput($this->input->post); // see if any errors occurred if( count( $form->getErrors() )) { // re-render the form, it will include the error messages $out .= $form->render(); } else { // successful form submission, so populate the page with the new values. foreach($form as $field) { $donotpopulate = array("snippet_repeaterblock"); if(in_array($field->name, $donotpopulate)) continue; $editpage->set($field->name, $field->value); echo $field->name; echo ':'; echo $field->value; echo '<hr />'; } // save it $editpage->of(false); $editpage->save(); $out .= "Page saved."; $out .= $form->render(); $content .= $out; } } else { $out .= $form->render(); $content .= $out; } else: ?> <?php /* -------------------- UserProfile */ ?> <?php $cuser = $page->createdUser->id; ?> <?php $cusername = $users->get($cuser)->name; ?> <?php $cusermail = $users->get($cuser)->email; ?> <?php # print_r($page->createdUser); ?> <?php /* -------------------- TAGS*/ ?> <?php $snippet_tag_count = count($page->get("snippet_tag")); $allsnippettags = $page->get("snippet_tag"); if ($snippet_tag_count > 0 ): $tagcontent ='<ul class="snippet_tags">'; $tagcontent =''; $tagcontent .='<ul class="all-tags">'; foreach ($allsnippettags as $allsnippettag) : $alltagtitle = $allsnippettag['title']; $alltagid = $allsnippettag['id']; $alltagpath = $allsnippettag['path']; $alltagurl = $baseurl.$alltagpath; $tagcontent .='<li class="all-snippet_tag">Tag: <a href="'.$alltagurl.'">'.$alltagtitle.'</a>'; # print_r($allsnippettag); ?> <?php $tag = $allsnippettag['name']; $matches = $pages->find("snippet_tag=$tag"); $matchescount = count($matches); $tagcontent .='<ul class="tags">'; foreach ($matches as $match) : $tagtitle = $match['title']; $tagid = $match['id']; $tagpath = $match['path']; $tagurl = $baseurl.$tagpath; $tagcontent .='<li class="snippet_tag "><a href="'.$tagurl.'">'.$tagtitle.'</a></li>'; endforeach; $tagcontent .='</ul>'; $tagcontent .='</li>'; endforeach; $tagcontent .='</ul>'; endif; ?> <?php $content .= "<div id='snippet' edit='snippet_repeaterblock,snippet_tag'>"; $content .= "<p>Create Snippet</p>"; foreach ($page->snippet_repeaterblock as $repeater_item) { if ($repeater_item->get("cb_desc_code")): $content .= "<div class='snippet_description'>" . $repeater_item->get("snippet_description") . "</div>"; else : $content .= "<pre><code>" . $repeater_item->get("snippet_code") . "</code></pre>"; endif; } $content .= '</div>'; $content .= $tagcontent; $content .= '<div class="CreatedUser"><a href="'.$baseurl.'snippets/'.$page->createdUser.'" >'.$cusername.'</a></div>'; If someone has some ideas that would be great. Best Nico
  20. Hello, guys! I'm trying to display the list of notices, but unfortunately there are more informations that I would like to show: The class of the notice seems to be always 'Session'. But sometimes also 'FileCompiler'.. Here is the code: <?php if(count(ProcessWire\wire('notices'))): ?> <div id="messages"> <?php foreach (ProcessWire\wire('notices') as $notice): ?> <?php if($notice->class != 'Session') { continue; } if ($notice instanceof NoticeError) { $class = "error"; } else { $class = "information"; } ?> <div class="<?php echo $class; ?> <?php echo $notice->class; ?>"><?php echo $notice->text; ?></div> <?php endforeach; ?> </div> <?php ProcessWire\wire('session')->removeNotices(); ?> <?php endif; ?>
  21. Hello, Looking to start making modules (and then writing about the adventure) but I just wanted to check whether there were many differences between PW2 and PW3 module creation and whether I'll have to pick a camp to start with? Thanks