holmescreek

Members
  • Content count

    38
  • Joined

  • Last visited

Community Reputation

8 Neutral

About holmescreek

  • Rank
    Jr. Member
  • Birthday June 30

Profile Information

  • Gender
    Not Telling
  • Location
    Florida, USA
  1. I just posted a question about moving PW from a resting domain to a production domain, after consideration I figure I would create a new post for a second question I have. I noticed the coming feature of client size image resizing. This will be really helpful, as I have some clients on a Satellite connection. I'm telling you, them trying to upload 15MB images, or them getting them straight on batch resizers (or Photoshop) to resize before upload is a real chore. Needless to say, Ryan has been doing an excellent job addressing this. My question, is that I have several clients on PW 2.x thru 3.x. Is there a really good guide on steps that I need to take to update the core to take advantage of the features of new releases? Are their perils to look out for? Yeah, after developing several sites, I feel a bit silly about asking this one, but, the docs doesn't seem to be clear in a "general" sense of upgrading the core across all versions. Thanks everyone for your time and assistance.
  2. Summary: If I have a site sitting on a server called testing.com, then on the server change it to mycompany.com, do I have to modify any settings in ProcessWire? After building several processwire for clients, the one question that I haven't had is about moving a processwire site from an old (temporary) domain to a new domain. For instance, I typically setup development sites for clients and register a temporary domain (and lock with a password). For instance, thee client can go test.com and get all their content finalized, change wording, add news, swap out photos -- everything to make the site production read. Next, on my hosting account I can have testing.com renamed to theircompany.com - and change the nameservers. A simple question here. If I have a hosting company rename the account from testing.com to theircompany.com, change my nameservers whereas going to theircompany.com loads the production site, Is there anything I need to change in the processwire configuration or in the PW database? In the past, I've just manually copied the site, and fresh-installed PW, and imported the data. Seems like a lot of hassle. I have a second part question about updating the PW core, however, after consideration I'll post it as a new topic.
  3. Also check the permissions on your /site/assets/files folder. Should be 755.
  4. I ran into an issue a Wednesday, where a client on satellite getting logged out every few seconds. The above fixed it, however, I had to change the config.php file in the /wire/ directory. I didn't see the setting in the /site/config.php, so I assume that it's due to changes in PW since this post was originally written. Thanks for the tip @adrian
  5. Thanks, that fixed it. There was a space between mystyles: and /site/modules/ ... the the correct syntax mystyles:/site/... and not mystyles :/site/... A note for other readers, the Styles drop-down wasn't displaying anything after the change quoted above. However changing the style name in the mystyles.js file from: CKEDITOR.stylesSet.add( 'default', [ to: CKEDITOR.stylesSet.add( 'mystyles', [ fixed the issue of the styles list being empty. @Macrura - thanks!
  6. Thanks adrian & Robin S for the additional information.
  7. This question has probably been beaten to death - think I'm approaching this wrong. Anyway, I've got a textarea input field that uses ckeditor. Under the fields Input section I managed to add my custom style sheet in the 'Custom Editor CSS File (regular mode) section for instance: /site/templates/css/ckeditor.css This seems to work fine. What I'm trying to do now is add a custom style to the ckeditor styles menu, for instance, called .green_button (p.s. in the ckeditor styles.js I added this to the inline section : { name: 'Green Button', element: 'a', attributes: { 'class': 'button' } }, Ok, onto the problem... I notice that PW, by default, is using /wire/modules/inputfield/inputfieldCKEditor/ckeditor-4.5.10/styles.js So, I copied this into /site/templates/js/mystyles.js Next, I added the above to the 'Custom Editor JS Styles Set' field, however, it doesn't seem to load myckeditorstyles.js -- rather continues to load the one from the /wire/modules... folder. I cleared all history and caching in Safari (also tried Chrome, etc). I'm wondering if there is something else I need to do to have PW load my /site/templates/js/myckeditorstyles.js instead of the one in /wire/modules.../ckeditor-4.5.10/styles.js ? Thanks!
  8. Thanks, that is exactly what I was needing, Zeka. I kept trying to use $pages->find and set a limit=4, sort=random type of selection. Your solution above worked.
  9. No. The only page is called testimonials, which uses a template named testimonials which contains the field testimonials_repeater. Thus something like: $testimonials = $page->testimonials->testimonials_repeater->getRandom(4) also tried $testimonials = $page->testimonials->getRandom(4); but, both return an undefined function for getRandom();
  10. Following the example from the PW docs I set up a a repeater. I'm trying to fetch random fields from a repeater, for instance, display 4 random customer testimonials. Here is the basic setup in PW: created these fields: testimonial_text testimonial_name I then added them to a repeater field called: testimonials_repeater Next I added testimonials_repeater to a template called testimonials Last, I created a new page called Testimonials using the testimonials template. As far as fetching all the testimonials I'm doing this: <?php $testimonials = $pages->find("template=testimonials"); foreach($testimonials as $trepeater) { foreach($trepeater->testimonials_repeater as $t) { echo $t->testimonial_text . ' -' . $t->testimonial_name; }} ?> Could some please give me some guidance on how to pull, for instance, 4 random testimonials? I mean, I could stick the results in an array[] inside the foreach loops, then random sort the array, then output only 4, but there has to be a better way using PW. Also, is there a way to limit the number of records (customer testimonials) that can be added by the user? Repeaters just always seem to trip me up. :/ thanks much!
  11. Gotcha! I really appreciate your help on these topics and especially pointing me in the right direction on the API docs with the reference links.
  12. I do have another quick question. Basically when a user edits a song there is a drop down lists of artist names which the data comes from a Page type field called song_artist_selections. I was wondering when bulk adding records how to set the value of this field? pseudo code $mypage = new Page(); $artistname ='Elvis'; $mypage->set the song_artist_selection to 'Elvis' ... $mypage->save() P.S. where in the docs did you find information on the add() method? e.g. $mypage->song_mp3->add($mp3file); ? Thanks again.
  13. Thanks. I tested it and it uploaded the mp3 from a temp folder then added a new record. Final (snipped from my) code: $mp3file = 'temp/' . 'song1.mp3' $mypage->save(); $mypage->song_mp3->add($mp3file); $mypage->save();
  14. $mypage = new Page(); $mypage->template = "song"; $mypage->parent = $pages->get("/songs"); // root $mypage->title = "My New Song"; $mypage->song_number = "004"; $mypage->song_commentary ="this is the commentary"; $mypage->save(); Using the example above I was wondering if there is a way to supply the name of an mp3 file and when $mypage->save() executes the mp3 will be added to the processwire database and uploaded into its assets folder? For Example: I have a field song_mp3_file which is a File Type field. I have temporary copied all the mp3 files in templates/temp/ song1.mp3 song2.mp3 If I set a value like this, will PW know it is a File Field type and automatically upload it to its assets folder and add it to the database? $mypage->song_mp3_file = "temp/song1.mp3" The above code (at the top of the post) works fine to quickly add records, I just don't want to have to go into every song's page and manually upload each mp3. Thanks!
  15. I edited the question as you were composing. And I'm talking all backend with pw ... not front end ajax.