Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About salles

  • Rank
    Jr. Member

Recent Profile Visitors

2,073 profile views
  1. @Soma it works perfectly now Soma, thank you! I'm using a text field for the "domain", but could I use a page field? So domains can be saved as childrens of "Domains" page in the tree. -edit nevermind, it doesn't work. i'll stick with the text field and then make the search via the field.
  2. @Soma hi Soma, I made the changes you suggested, but I'm getting this error now: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'SaveShortUrl' for key 'class'
  3. i erased everything to try again and i'm still getting that error when i try to install the module here's the full code of saveShortUrl.module that i'm using: <?php class saveShortUrl extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Rewrite field after save', 'version' => 1, 'summary' => 'An example module used for demonstration purposes. See the /site/modules/Helloworld.module file for details.', 'href' => 'http://www.processwire.com', 'singular' => true, 'autoload' => true, 'icon' => 'smile-o', ); } pub
  4. @adrian i'm getting this error when i try to install the module: Error: Call to undefined method stdClass::of() (line 29 of /Users/SF/Sites/pw/site/modules/saveShortUrl.module) line 29 is this: $page->of(false);
  5. @Philip The message "save the domain..." appears, but it doesn't save anywhere... Here's what I'm trying: $pages->get("sources")->find("domain") = parse_url($page->link_to_img, PHP_URL_HOST); I'm trying to get the page "Sources" and their children field "domain", so each page under "Sources" is a saved domain. But it doesn't work either...
  6. I even tried to write a module, but i just can't get my head around it programming - it's ok the php template part, but when it comes to writing modules i feel stupid would anybody be willing to make this code for me? i'll pay...
  7. But is it possible to automatically save it to pages?
  8. Hi guys I'm building a repository for inspirational images found through the web, so I have something like this: Images - Image 1 - Image 2 - Image 3 ..... Sources - Source 1 - Source 2 - Source 3 ... Each image template has the following fields: - URL fieldtype for the Source Link (for example, http://abduzeedo.com/daily-inspiration-1940) - Page fieldtype for the Source Site (where it connects to the Sources page all the image sources) So I was wondering if it's possible to automatically get the base domain from the Source Link and save to the Sources page. For example
  9. Ah, gotcha I wonder if this can be changed in some PW core file?!
  10. Ah, nevermind. Didn't realize this Just a note: I see the module supports capital letters in random strings but for some reason it only generates numbers and small letters...?
  11. @Soma - That's so awesome, thank you very much for writing this module! I can't wait to get home and try it! As for the copyrights, I was planning to add the images sources via a page fieldtype, manually. For example, if the image it's from Flickr, I'd manually add "flickr.com". But come to think of it, is there a way to automatically save/pull the main url in some page fieldtype? So for example if the image url is "http://flickr.com/some-image-etc.jpg", it would automatically save/store "flickr.com" in some page fieldtype. Too tricky? -Edit Just tried it, works like a charm! Sma
  12. Hello! I have a cool upcoming project which its content will heavily depend on external images. Although I'd like to get rid of WordPress for this project and would love to use ProcessWire, WP has a great plugin called Grab & Save, that allows you to grab and save images from remote urls into your own WP media library. I was wondering if ProcessWire has a similar plugin or functionality, which it would be a huge time saver for these kind of projects!
  13. Hi adrian, does the module work if adding images via FTP?
  14. Hello guys Can anyone explain me how to add multiple images to PW via API? Many thanks, S
  15. yep exactly what was going on. all good now
  • Create New...