Jump to content

bernhard

Members
  • Posts

    6,221
  • Joined

  • Last visited

  • Days Won

    308

Everything posted by bernhard

  1. soma, that was stated in older versions but not in the new ones... PW 2.5.21 If you want to find selectable pages using a PHP code snippet rather than selecting a parent page or template (above) then enter the code to find the selectable pages. This statement has access to the $page and $pages API variables, where $page refers to the page being edited. The snippet should return either a PageArray or NULL. Using this is optional, and if used, it overrides the parent/template/selector fields above. NOTE: Not compatible with PageListSelect or Autocomplete input field types. PW 2.6.0 If you want to find selectable pages using a PHP code snippet rather than selecting a parent page or template (above) then enter the code to find the selectable pages. This statement has access to the $page and $pages API variables, where $page refers to the page being edited. The snippet should return either a PageArray, Page or NULL. If it returns a Page, children of that Page are used as selectable pages. Using this is optional, and if used, it overrides the parent/template/selector fields above. While this overrides parent and template selections above, those selections are still used for validation (de-select them if you do not want that behavior). NOTE: Not compatible with PageListSelect or Autocomplete input field types.
  2. of course it states it explicitly and i don't expect it to work in every situation, but when i know why it does not work in which situation it could fit for my needs even if it states id does not work. that was the reason for my question. you are right about the sitemap - its a custom sitemap page, not hidden. thanks for that input though. would be great for me if they worked with single pages! i did try it with and without selected template above
  3. just tried the comments fieldtype for the first time and it's great so far. but there's one thing: the link leads to "admin/page/edit/?id=1413" without the host. didn't find a configuration for that so i think the problem is somewhere else?
  4. of course i have! don't know when... i'll try to be patient
  5. hi apeisa, any news on padloper? i have at least 2 bigger projects where this would be great to have! is there a vague release date?
  6. hi, i have a page field with the following setup: the description says it is not compatible with autocomplete. i tried it anyway and it did almost work. with the $page->rootParent selector it let me select all pages under my rootparent (/section1) with template basic-page. i added one testpage with template "sitemap" and this one does not show up in the autocomplete list. with pagelistselectmultiple it works as expected! can anybody elaborate why this strange behaviour occurs or if there is a chance to get this work in any future releases?
  7. hey soma, i did some testing the last hours and found out, that example.com/admin does NOT work while example.com/admin/ (with trailing slash) does. not really a big problem, but maybe there is a quick and easy fix for that? thanks again for your support - everything else working like a charm so far!
  8. maybe you could try paintings.mydomain.com => site-paintings if that's convenient
  9. very simple module to turn this: into this: <?php /** * ProcessWire Yumpu Replace Textformatter * * @copyright Copyright (c) 2015, Bernhard Baumrock, dimacon.at */ class TextformatterYumpu extends Textformatter { public static function getModuleInfo() { return array( 'title' => 'Yumpu replace', 'version' => 1, 'summary' => 'Replaces Yumpu Links with responsive Iframes', 'author' => 'Bernhard Baumrock, dimacon.at', ); } /** * Format the input string * * @param string $str The block of text to parse * * The incoming string is replaced with the formatted version of itself. **/ public function format(&$str) { // convert yumpu links to iframes $str = preg_replace("/https:\/\/www.yumpu.com\/(..\/)?embed\/view\/\w*/", '<div class="TextformatterVideoEmbed" style="position:relative;padding:30px 0 56.25% 0;height:0;overflow:hidden;"><iframe style="position:absolute;top:0;left:0;width:100%;height:100%;" width="640" height="360" src="\0" frameborder="0" allowfullscreen></iframe></div>', $str); } } I think there are also other solutions but maybe this one fits better for someone...
  10. thank you soma, that solved it! for all the others: soma has already updated the module on github
  11. hey! i have it now on my live server: same problem! http://wemacon.eu http://site1.wemacon.eu http://site2.wemacon.eu if anyone finds the time i can share admin password via PM to have a look...
  12. hi guys! unfortunately i can't get soma's version of the module to work. i have a vagrantbox and configured my hosts file to serve the following domains: config.hostsupdater.aliases = ["web.dev", "multi1.web.dev", "multi2.web.dev", "web1.dev", "web2.dev", "www.web1.dev", "www.web2.dev"] i can reach a clean 2.6 installation via all domains i installed somas module i created 2 new pages: /home/www.web1.dev and /home/www.web2.dev when i visit www.web1.dev -> still the frontpage of the installation (default intermediate profile); same for www.web2.dev i can visit those pages via www.web1.dev/www.web1.dev/ and same for web2 i tried apeisa's version and it worked - unfortunately i did not make it to get subdomains working (site1.web.dev, site2.web.dev). but anyway i would prefer to use somas module do you think that could be related to vagrant? unfortunately i have no live server where i can try it out at the moment... help would be very, very appreciated! ps: module configuration: www.web1.dev www.web2.dev tried everything with and without www
  13. Tried it on 2.6 and can't find the "show edit links?" option looked for it at page body field edit screen in "global" and in "template specific" mode...
  14. hi blackeye, tested with 2.6.0 and works! don't think it will be different in 2.5.29
  15. the best blog-post i found so far: https://megalytic.com/blog/how-to-filter-out-fake-referrals-and-other-google-analytics-spam i found out that segments are REALLY helpful! you can define filters and apply them also to your historical data. it's also very few clicking if you use REGEX like this (taken from https://github.com/piwik/referrer-spam-blacklist/blob/master/spammers.txt): 4webmasters.org|7makemoneyonline.com|acads.net|anal-acrobats.hol.es|anticrawler.org|best-seo-offer.com|best-seo-solution.com|bestwebsitesawards.com|blackhatworth.com|brakehawk.com|buttons-for-website.com|buttons-for-your-website.com|buy-cheap-online.info|darodar.com|econom.co|forum69.info|forum20.smailik.org|free-share-buttons.com|get-free-traffic-now.com|googlsucks.com|hulfingtonpost.com|humanorightswatch.org|ilovevitaly.com|iminent.com|kabbalah-red-bracelets.com|kambasoft.com|makemoneyonline.com|masterseek.com|o-o-6-o-o.com|ok.ru|priceg.com|ranksonic.info|ranksonic.org|savetubevideo.com|semalt.com|sexyteens.hol.es|social-buttons.com|theguardlan.com|webmaster-traffic.com you can then analyze what all the spam-bots are doing on your site: and you can easily switch your filter to EXCLUDE all spam-bots and compare your data: i've not found out how to deal with segments via ga-api. maybe some day i find the time. as a note for myself: https://developers.google.com/analytics/solutions/articles/hello-analytics-api i'll give a more detailed insight on my blog, when it is finished EDIT: it get's even better!! you can share segments and have it available in ALL your properties for ALL your data (also historical)! here is my segment: https://www.google.com/analytics/web/template?uid=ns25vIZpSj2NpRFk371g3Q just visit the link and enjoy spam-free analytics does it work for you?
  16. me too! i did some testing on blueimp back in my joomla days and liked it. unfortunately the budget for this job was too small so i didn't realise it and have no "real world experience". it is also capable of uploading very large files in smaller chunks (eg videos). would really be great to have a client side resize in PW 2.7
  17. Pete, you are right. That's why I'm using the PW trend only as a very first WOW catcher. of course i'm honest to my clients and show them the comparison to wordpress. and i explain them why wordpress is so famous and why i trust in processwire for this special project. this does not mean that tv is far better then smartphones maybe this comparison does not match 100% to pw<->wp, but at least i experienced that the WOW-chart made my clients feel more confident to "try" something new and made them hear my explanations with other ears then before. and at least it may kick out 50% of his competitors that are offering them a drupal-based solution
  18. hy DaveP, thanks. you are / he is right, but that's not what i want:
  19. there are always countless arguments for/against any product. i often hear from clients: "one says this, the other one says that" then i show them what google says and they get big eyes: I've also a setup of a simple former joomla site converted to PW and show them the difference in direct comparison. that's the arguments they will understand - at least in my experience. most of them don't understand what we are talking about when we go in detail, so the trust a name they know, because they are afraid of making a mistake. that's psychology use this thinking for your (and PW's) benefit! make them aware that they can make a mistake by backing the wrong horse: good luck! PS: also make them aware that they don't only have to trust the product but also YOU as a developer/agency! the product is only one part - the other part is your work and what you make of it.
  20. hi mattcohen, welcome to the forum! your code looks like you have not yet fully understood what processwire is and can do for you to make your life easy the key to success is structuring your content, then you can easily access all your data by simple foreach ($page->children() as $review) { echo $review->title ... $review->body ... $review->rating ... and so on } maybe this is a good read for you: https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ did you go through the hello world tutorial? https://processwire.com/docs/tutorials/hello-worlds/
  21. hi fliwatuet, welcome to the forum! 1) you can get really far with processwire and IF, FOR and ECHO 2) you do not need to know a lot about modules. you can handle almost everything in your template files. that's easier in the beginning, where of course later on modules can have advantages over writing all your logic into your templates. 3) as all the others have already said: you don't need them. but personally i also have never regret buying one! have fun with PW and PHP! if you need help, the community here is really helpful and fast. i'm the 5th reply to your post within a day and it's almost always like this. I'm very happy that gebeer showed me PW one year ago, thank you once again! ps: i would recommend you to start with the hello world planets tutorial (do not only read it. install pw and do it!): https://processwire.com/docs/tutorials/hello-worlds/ or with comments here: https://processwire.com/talk/topic/693-small-project-walkthrough-planets/ on page 4 of the first link you will see how far you can get with ECHO - imagine you also know IF and FOR
  22. hey grumpy, it seems you are using the default intermediate profile? you are mixing code in your map template php file and your _main.php file! thats some very basic PW stuff and not related to mapmarker, so i think it would be a good idea to start a new "general support" thread and stop messing this specific thread up (sorry) as long as there is no extra thread, i'll try to help you here once more. have a look at this posting, thats the intermediate profile workflow: https://processwire.com/talk/topic/9690-sub-templates/?p=93247 so everything you echo in your map template will be placed BEFORE all the code in _main.php to get something into the body of your _main.php you have 2 options: 1) create a whole new map template (i think you named it postcard.php) like this: <!DOCTYPE html> <html> <head> <title></title> ## your javascript here ## </head> <body> <?php ### render map here ### ?> </body> </html> but that would remove all the other site elements that you already have on your website (menu, sidebar, search etc) 2) populate the $content variable with your map markup postcard.php $map = $modules->get('MarkupGoogleMap'); $content = $map->render($page, ## your div id here ##); note its not echo ... but $content = ... _main.php should look somehow like this <!DOCTYPE html> <html> <head> <title></title> ## your javascript here ## </head> <body> <h1><?php echo $title ?></h1> <div> <?php echo $content; ?> </div> </body> </html> so in the second case your map will be placed wherever you put your $content variable in your _main.php file. please take your time and read this thread carefully: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ thats a lot of useful information and explanation of what's going on behind the scenes when you are using one file to handle all the markup. especially this thread of ryan should help you: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/?p=6174 good luck
  23. that's what diogo said - totally agree! but as you can see i have LOTS of spam traffic on my sites and definitely switched ON googles "remove known bots and spiders" option. what's your experience about spam referrals on analytics. do you have any? what do you do against it?
  24. offtopic: if anyone else also wonders what OP stands for: http://netforbeginners.about.com/od/internetlanguage/f/What-Is-OP.htm OP = original poster
×
×
  • Create New...