Jump to content

horst

PW-Moderators
  • Posts

    4,077
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. Hi, look here: http://processwire.com/talk/topic/3244-image-orientation-on-upload/#entry32333 and above
  2. Hi and welcome to the forum, I don't really know, but you can check what charsets you are using with MySQL-DB and PHP and HTML-output. You may try to put this code in top of your index.php: ini_set('default_charset','utf-8'); if( ! strtolower(trim(ini_get('default_charset')))=='utf-8' ) { echo 'WRONG CHARACTERSET IN PHP: '. ini_get('default_charset') ; exit(88); } and test if it behave the same. Once I have had some issues with that php-ini setting of default_charset. (by default it is set to ISO-8859-1 or that like)
  3. Hi totoff, it looks very good. Why do you haven't done it last month? Now I had to build my new site on a basic html5 boilerplate. (und durchwandere im Moment ein Tal der Tränen beim Versuch all die hinzugefügten jQuery slider-, slideshow-, und 'was nich alles' -styles miteinander zu vereinen) When starting with it, it should be IE7+ compatible, but if it is so, after I'm done? Who knows.
  4. Hi Ovi, when looking at your code and your statement of what you can do in PHP, I think you just should start here. And yes, you also should use the "Hello World Module" as a skeleton too. For example, if you want to do something that isn't implemented in PW core, you can [write | implement] your somehow into templates, or you can create a module. As it should not be a big problem for you to write your working code, you may find it not an easy task to get the right Hook. (for me it is exactly that)And at the beginning you can do it like we all do (we, who are not belong to the pro's, - we, who are not be able to cite the core code when waken up in middle of the night, - we, who we need to learn and have fun with it): we drop a post here and describe what we want to do and then get perfect answers on what Hook would be best to use for it! --- Basically a module hooks into PW somewhere and somehow. You just need to kow where to hook in and when, (before or after). And you need to know how to access objects & values and how to return your result. That's all covered in the new great API-Documentation of Hooks! Read it and just go on
  5. Here is another one, more CSS oriented! Demo: http://leaverou.github.io/CSSS/#intro Download: https://github.com/LeaVerou/csss Website: http://lea.verou.me/2010/10/my-ft2010-slides-and-csss-my-presentation-framework/
  6. Maybe you can let the visitor tracking php script do its work after you have already flushed the page content?
  7. Hi Marty, very good design! Good job! I wish I could do something beautiful like that for my site. (I'm currently working on a renew). --- When viewing the code my browsers inspector says that there is an unclosed a-tag (contact-email) in line 77 of startpage. Also there are a huge amount of resize calls from the video-window (at Line 111). (more than 100 / second) Fortunately for you , I come across that (last point of post) for my site a few days ago, so I think you could change it like: // On resize show/hide navigation // http://stackoverflow.com/questions/8943816/changing-a-class-name-with-jquery-given-a-specific-width-range-media-query // enhanced with a Timeout var resizeTimer; function changeClassNameOnResize() { $(".off").hide(); console.log('resize called'); // should be removed in production site ? var width = $(window).width(); if(width <= 767){ $('.nav').removeClass('on').addClass('off'); } else{ $(".on").show(); $('.nav').removeClass('off').addClass('on'); } } $(window).resize(function() { window.clearTimeout(resizeTimer); resizeTimer = window.setTimeout('changeClassNameOnResize()', 250); }).resize(); //trigger the resize event on page load.
  8. Hi, I have read in a thread that one can access other language versions from a LanguageTextfield with $myField->->getLanguageValue($language->id); Unfortunately it doesn't work when the LanguageField is within a Repeater. Is this, because the class that serves the getLanguageValue function is LanguagesPageFieldValue , and within a Repeater a Textfield isn't a PageField? And is there a alternative solution ?
  9. Oh. - thanks Ryan. I have checked at php.net and it is noted in Changelog since PHP 5.0.0
  10. as addition to Diogo: the new API docs about Hooks
  11. ActiveState Komodo-Edit is free version and the follower of last Personal-Edition (non-commercial, Version 3.5 in 2006). It gets updated regularly but it has no Debugger like the V3.5 has had. I have used Komodo since version 1.x and until 3.5. 3.5 supports PHP max Version 5.2. Then I have used Komodo-Edit and v3.5 paralell. The only one thing that I was missing with Komodo-Edit was the Debugger. But proffessionell Versions are to expensive for a hobbycoder like me. Now I have owned a Personal Version of Nusphere PhpEd, and after tweaking the shortKeys and the highlightColors its like Komodo 3.5 but with much more features
  12. alternative solution: if(empty($child)) { or if( ! empty($child)) { EDIT: (after Ryans post below) oh, f**k, it is wrong. (I have to check my code)
  13. Why not use on every overview-page: $session->set('lastOverviewPage', $page->url); and on every gallery page: echo '<a href="' . $session->get('lastOverviewPage') . '">go back to overview</a>'; ?
  14. what is pageNum ? If you mean the count of subpages a page has, it is: $page->parent->numChildren
  15. thanks Soma, I have had this already in my BookmarkList from another Post where you have pointed to it! But with this site I want to restrict direct access to images under site/assets/.. to only allow thumbnails (via .htaccess) and therefor I have to write some extra code and I choosed this method because I allready know it. (lazy me) Oh, thats fine to hear. Makes things easy! Hhm, I have read some notices from when I have created the old site with prototype and scriptaculous. There was some weird things with doctype-interpretion by some MS-IE (7 or maybe 8, what was the brand-new one;-) Also if I have had some kind of valid XHTML it wasn't right interpreted by IE and it results in choosing the Quirksmode, what wasn't supported by prototype when trying to get width and height of viewport. That was a lot of headache and I haven't really understood that, only knowing it was some kind of IE-bug because the doctype starts with <?xml <?xml version="1.0" encoding="windows-1252"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> And to use crossbrowser check if a resize event is available for window or for document was to support old browsers. So, with my new site I only support IE8 or newer browser and doctype is HTML5 And therefor I can use jQuery syntax: var resizeTimer; function sendViewportDimensions() { // test console.log($(window).width() + ' x ' + $(window).height()); } $(document).ready(function() { sendViewportDimensions(); $(window).resize(function() { window.clearTimeout(resizeTimer); resizeTimer = window.setTimeout('sendViewportDimensions()', 250); }); }); Also have learned something new here: When hooking into window.resize event, it could be better to use a small timeout before sending ajax-request. Without it I have had 10 requests when only do one manual window resize.
  16. maybe, just not much more than a 'snip' ?
  17. my MP3-SiteProfile: http://processwire.com/talk/topic/3604-release-localaudiofiles-mp3-db/
  18. Hi, today I came across a site with a really good presentation tool in HTML5: pik7. English Livepresentation is here: http://pik.peterkroener.de/ The blogpost and video screencast is in german only, but the tool (code) itself is in english. Its' hosted on Github and is GPLv2.
  19. Hhm, what's exactly the problem? Have you tried the suggestions? What is the exact URL of your targetpage? --- Do you know the exact URL? [ ] YES [ ] NO If you have answered the above question with yes, your solution is as follows: - please type the known URL followed by a # and the anchorname exactly into the href of your link
  20. You may also try to set_time_limit(30) in your foreach-loop. foreach ($page->images as $image) { set_time_limit(30); $output .= '<a href="' . $image->width(1000)->url . '" title="' . $image->description . '"> ... </a>'; } If your site are not running in safe_mode and your hostservice hasn't set this function on a blacklist, every image has a max of 30 seconds to get processed. BUT BETTER: the client resizes images before upload, as Diogo said!
  21. So, you should already know the targetfile, because you write the link ?? ok ?? (something like $targetpage->url) Now you only have to append your anchorname: <?php echo "<a href='{$targetpage->url}#anchorname'>MyLink</a>";
  22. Also as a beginner and I'm not sure if I understand Wanze right, but maybe he means that it should be different handling for $page->next and $page->next() $page->next() handles as it does actually but $page->next should be optimized for the cases with mass siblings. so, conclusion: next == next() ?? right ?? or not ??
  23. I cannot understand the problem too. Also I cannot understand why he don't shed some light onto his problem, will mean: give some more information. Would be helpful because my crystall ball is actually unusable.
  24. Hhm, I think there is already the solution within the Basic Profile as you shown above. But you should not prepend the $homepage. This will output : Home Page 2 Page 3 etc is this what it should be?
×
×
  • Create New...