Jump to content

horst

PW-Moderators
  • Posts

    4,085
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. Hi Ryan, Using the default AdminTheme with english language displays an ErrorMessage at the Top of the page: Duplicate entry '1002' for key 'data' Using the default AdminTheme with the german language pack do display nothing! Using the Metro AdminTheme with the german language pack do display nothing!Using the Metro AdminTheme with english language do display nothing, too!Other Warnings/Errors, like 'Missing required value ...', 'Value is out of bounds ...' are always displayed as expected. There are no entries in the Error-Logfile with this.
  2. Hi, I have the need to set a field to unique as described here (point 2.) It is a integer input within a repeater. I have set that field to match a minimum and maximum value and also input is required! When trying to save the page with an already used value the page doesn't save that field and do not output any error or warning. It silently lost the data, even with debugging enabled in config.php. What can I do to avoid this?
  3. see this post and the following 5-6 for some pros and cons you shouldn't hesitate, have a look to some of the old foxes and younger (but also well known) foxes around here.
  4. Hi Radek, cool. Edit: It would be really good to have the description-field for images also in multilingual version. Oh, I haven't got it right. It is localization support, - what I have thought of is multilingual inputfields like 'TextLanguage, TextareaLanguage and PageTitleLanguage'. An Image-description-field for that would be really cool.
  5. When using $ as a char within doublequotes in PHP, (and not to indicating a Variable), it should be escaped with a \ (backslash). When using a $ as char within singlequotes, escaping is not necessary. That is because PHP treats strings in singlequotes 'as is' (no further processing is done on it), whereas strings in doublequotes will be parsed and every found variable get replaced by it's value. So, the above example will work in PHP, but will not provide correct code to work with the javascript in your page! The problem with Diogos example is that it breaks the onClick value. To avoid this you have to use escaped doublequotes for the onclick value and within that value singlequotes (for the string that get passed to the javascript function): echo "<li><a href='#{$child->name}' onClick=\"$.scrollTo( '#{$child->name}', 800 );\">{$child->title}</a></li>";
  6. Hi Diogo, I don't have Chrome installed With Firefox I have tested it on the site http://pasteboard.co/ There it works. Would be cool if other Browsers could be supported too.
  7. Hi MarcC, <irony>does you receive the plain-text or the HTML-formatted ?</irony> He has 'overworked' and renewed the design just some years ago (3-4 ?). Do you know the previous one, too?
  8. Hi LeiHa, thanks for sharing this. Also if you say this is your planning code it looks to me to be a real good starting point and I have bookmarked this Post!
  9. There maybe something interesting in it for the PHP-Pros around here: 26 Ways to Show that PHP Can Be Better Than PHP Features that PHP does not have yet: 1. Aspect Oriented Programming 2. Annotations 3. Extended class meta-data beyond reflection 4. Prototype variables like in JavaScript 5. Dynamically extend class with plugins 6. Friend or package access classes 7. Class generics (templates) 8. Turn errors into exceptions 9. Introspection of private functions and variables 10. Alternative auto-loading of classes 11. Running multiple scripts in parallel 12. Named parameters 13. Running unaudited PHP code in a sandbox 14. Class composition 15. Deferred execution of long tasks 16. Satisfy needless dependencies with dummy interfaces 17. Comparable interface 18. Iterable interface Features that PHP already has: 19. Executing code automatically when exiting a function 20. Class destructors 21. Namespaces 22. Overloading 23. Closures 24. Function parameter type checking 25. Mixing the functionality of different classes 26. Serializing objects that reference each other
  10. I have added the sharpening and quality-select to Thumbnails-Module
  11. @Ryan: will you add getters to the class? Have downloaded last dev-branch, but haven't seen it. Meanwhile I've done some Sharpening Tests with GD: Looks very promising!
  12. Hi, just a pw-beginners-question: is it possible to convert an existing site (eg 'Basic Example Site') to a Multilanguage site? I have tried an installed core language modules, have setup languages and everything works fine. But when trying to change Fields to LanguageFields in Templates I get an error and afterwards DB is damaged: Error: Exception: Unknown column 'field_title.data1022' in 'field list'
  13. Hi Totoff, HeidiSQL for Windows is a nice tool which can do manually Backups from Databases. Not only dump into files, also transfer from one DB to an other, and some more. But DB's must be accessible from outside, not only from localhost.
  14. Hi Ryan, only need read-access to: $filename $extension $imageType $image $modified
  15. ok, - fine. My skills with PHP5 are not that great. Don't know really what I've thought when viewing ImageSizer-Class?! Maybe something like: when hooking into it I can use it like the original I use PHP4 for about 10 years with CLI-scripts, but PHP5 is new to me. So, have set it from protected to public and now I can read them. Thanks!
  16. Oh, Joss - sorry, I have not read it first. Xenu is a crawler which checks for broken links. I think there is no need for maps. Just let Xenu start at your root and wait until it emails you the result.
  17. If you want to use Pro Cache Module for that and want to play save - I recommend a run with Xenu's Link Sleuth Also, like Teppo mentioned, HTTrack is a good solution for creating offline-version of sites
  18. Hi, - yes it should! But it doesn't! I went a bit mad about that. So, as I have no idea of what is special with PW or how it works, it maybe not very helpful when I try to debug it, but I have done it. Hopefully you (or Ryan!!) may understand a bit of what I try to tell: when try to assign: $this->img = $event->object; (I step into here with debugger and list next steps with data now): WireData __get($key) $key is 'object' of type string WireData get($key) " after that $this->img holds reference to ImageSizer == correct now try to assign: $filename = $this->img->filename; : Wire __get($name) $name is filename of type string ... if($this->useFuel($useFuel) is null ?? is this right here ?? however: it returns TRUE next step is: Fuel __get($key) $key is "filename" of type string and the function trys to return $this->data[$key] or NULL whereas $this->data is array with 20 keys like: config, wire, notices, sanitizer, db, modules, fieldtypes, etc etc but no 'filename' so, finally i get NULL returned This seems not to be correct at this point. attached is a screenshot of Call-Stack
  19. it is class 'ImageSizer'!
  20. Hi, have started to create the module, but don't get it right. To start, I use: $this->addHookBefore('ImageSizer::resize', $this, 'read_metadata'); $this->addHookAfter('ImageSizer::resize', $this, 'write_metadata'); With first tests I upload images, the hooks get called. With read_metadata I want to check if the current image is a jpeg. I try to read from $event->object->imageType like this: public function read_metadata( HookEvent $event ) { $this->img = $event->object; $this->isOurJob = $this->img->imageType == IMAGETYPE_JPEG ? true : false; if( ! $this->isOurJob ) { return; } $filename = $event->object->filename; // test to assign string to my var // ... $this->logActivity('have read metadata from ' . $this->img->filename ); } I have also tried others like $event->data['object']->imageType etc. but I'm always get empty results. Same behave with $event->object->filename: in my Editor I can see that there is the filename but it did not get assigned to my vars. So, what I'm missing?
  21. I have only used a phpclass that rely on the php-zip-extension. This work on Linux and Windows. With this it is very simple and robust usage: $unzip = new unzip2($ZIPFILE); $unzip->debug = 1; // 0 = off $list = $unzip->getList(); foreach($list as $fileName=>$zippedFile) { if( ! in_array($zippedFile['type'], array('jpg','png','gif') ) { continue; } $res = $unzip->unzip($fileName, $dest_path); } Pete uses the php-zip-function with his Module ScheduleBackups. I have tested it on windows and the created archives provided much information of compressed files, more than some other solutions.
  22. Hi, ok,- you want to install a language pack what is a zip-archive. I'm new to PW and don't get touched with language-packs til now, but have read before a minute the Instructions: So, I cannot see really a problem with it!
  23. Hi, when you are on your own local machine and want to 'upload' a file and wants to get it unzipped, you should provide the path to an unzip-app and all needed params / flags for it. (A commandline app!) If you don't have one, you may go and fetch 7z. It comes with an additional commandline prog called '7za.exe' Put it somewhere into your systempath, open a shell command (cmd.exe) and type in 7za -h or 7za --help to get a list of available commands and switches. If you have figured out the needed command and switch/es, write this into your PW-site config.php, instead of the unix there. I use 7za.exe sometimes with PHP-CLI on my local machine, - but only to zip archives. I never have used it to unzip via cli.
  24. if you have used utf8 on local side I tend to nearly 100% to say: yes! have a look here maybe you should check: DB-charset, PHP-charset, HTML-charset
×
×
  • Create New...