Jump to content

Wanze

PW-Moderators
  • Posts

    1,116
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Wanze

  1. Here's mine: site/assets/cache site/assets/sessions site/assets/logs site/assets/files site/config-dev.php
  2. Oh I like your module and it's very nice to have an alternative way of going with multi language
  3. Nice work That's not entirely correct. If you don't check the "active" checkbox under Settings when editing a page, the page is not listed for users with this language, e.g. excluded from $pages->find calls. I'm not sure what the default behaviour is when you visit the page directly in a language which is not active. Maybe you'll see the content in the default language. In this case, I'm sure you could also hook into somehwere and throw a 404 or do the prefered action.
  4. https://github.com/ryancramerdesign/ProcessWire/issues/1174
  5. What errors you get? I'd suggest to generate a .zip file of the whole installation. Download it, reupload and unzip it on the new server. Then you need to modify the database credentials in the config.
  6. @Webrocker Glad it works for you! I don't see a problem here if your include does not do some heavy stuff, in this case you should cache the results. But I think there's no easy alternative... ProcessWire does the same for you in the background when you're using the prependTemplate file option, it is just included "automaticaly" in every ProcessWire template. I could check if this setting is enabled and include the prepended file in the background, but this might not be desired in another situation
  7. You're welcome. I often use the cheatsheet to lookup stuff: http://cheatsheet.processwire.com/ Maybe the following works: $children = $page->parent->children(); $total = $children->count(); $pagePos = $children->getItemKey($page) + 1; // Assume the keys are zero based
  8. Hi Richard, Try $page->sort if they are manually sorted. Otherwise you'd need to find the position of the current page inside the $page->parent->children() array.
  9. Hi Tom, Thanks. Simplest solution would be to include the file inside your PDF templates, like this: // We are in a template file under /site/templates/pages2pdf/, include /site/templates/_init.php include('../_init.php'); Cheers
  10. Technically yes, an interface forces you to implement the public methods in your class. It's like a "contract" that describes the public API of all classes implementing it. However, I just noticed that all the methods in the module interface are commented out. So you're not required to implement the init() method, if you don't need it. Cheers
  11. Good to know, thanks guys. But I'm not sure it'll work for Comment objects that are not pages... please report back @Orlando
  12. @matijazp Does quiet work to modify the created date? 'quiet' => boolean - When true, modified date and modified_users_id won't be updated (default=false) Also comments are not pages, so I guess it will not work.
  13. Doesn't this module provide the functionality you need? http://modules.processwire.com/modules/login-persist/
  14. Hi icetea, $panel->f_columns is again a PageArray, you need to loop over it with a second foreach loop and output the columns. However, nesting multiple repeaters is not the best idea and even though it seems to work technically, you get yourself in troubles when your data is growing. A better approach might be to use "regular" pages which then can be linked via page fields. Cheers
  15. Hi Orlando, If I remember correctly it's not possible to modify the created timestamp with the ProcessWire API. What works is to fire an SQL query for this job, something like this: UPDATE field_<comment_field_name> SET created=<timestamp> WHERE pages_id = <page_id> Edit: Welcome to ProcessWire
  16. You're welcome. Do you have access to the server via terminal? If so, cd into /site/assets/ and run the command "ls -al". This will show you what user/group the folders belong to along with the permissions. If you don't have terminal access, maybe you can see the permissions and the owner of this folder with your FTP programm. How did you change the permissions?
  17. Hi JoshoB, Do you have enough disk space? Does the user running the PHP script have execute permission on the parent folders up to /files/ ? Also setting permissions to 777 can lead to problems with certain security modules. Just make sure that the user of your webserver has write access. Edit: Where are you putting your test.php file? You could compare the permissions on this folder with the permissions of /site/assets/files Cheers
  18. $page refers to the actual page being viewed, title is the field "title" belonging to this page. I guess you don't want to set a new title on the page. It works like this: <?=wireRenderFile("components/teaser-event", array('title' => 'New event title', 'another_var' => 'Blub'))?> // In the template file teaser-event.php <?= $title ?> <?= $another_var ?>
  19. Take a look at CommentNotifications::sendAdminNotificationEmail(). This method is hookable. But from my understandings it is already using WireMail which should use wireMailSmtp internally. I've never used a custom email module thought, so I could be wrong.
  20. Looks great Reno, thank you for the hard work you put into this
  21. I'm not that experienced in optimizing PHP/Apache/MySQL. You could try to use APC or xCache for PHP. But I think, based on your description, the problem is your amount of fields. Loading that much templates/fields can slow down the admin part. Why do you need so many fields and how much fields you have? You can share fields between templates. Also take a look at the ProFields modules, especially Textareas could be interesting to reduce the amount of fields.
  22. You have the full ProcessWire API available in your Pages2Pdf templates. Did you output the children also in the template inside "site/templates/pages2pdf"? If so, they should appear in the PDF files. Only problem I can think of is that the PDF enginge can't handle your markup, you might need to simplify the HTML. But for testing purposes, you can also just list the prices-pages in a simple list. If it does still not work, please post the content of your pages2pdf "pricelist" template. Cheers
  23. What part of your website is slow? You'd need to specify more details about the problem and your structure/templates/fields involved. 2000 pages is not that much, I'm running a site with > 1 million pages and everything runs smooth and fast. Most likely, you'd need to optimize on the programming part.
  24. Does your news template have a datetime field called "date" assigned? Maybe you named it differently?
×
×
  • Create New...