hollyvalero

Members
  • Content count

    36
  • Joined

  • Last visited

Community Reputation

6 Neutral

About hollyvalero

  • Rank
    Jr. Member
  • Birthday 09/14/1962

Contact Methods

  • Website URL
    http://hollyworks.com
  • Skype
    hollyvalero

Profile Information

  • Gender
    Female
  • Location
    Maine

Recent Profile Visitors

686 profile views
  1. looks so much better than my code. Thank you!
  2. It is... just don't know how to code that... I haven't tried this... but something like this? foreach($subjects as $subject) { $submix = $subject->title; $submix = ($sanitizer->alpha('$submix', Sanitizer::translate) ) ; echo "<option value='.$submix'>{$subject->title}</option>" ; }
  3. It will translate to lowercase, but if someone puts in "Frick & Frack" ... what happens to the & and the space?
  4. The sample page name is my working "worst case scenario" but there's no way of guessing what page titles will be. I've got multiple versions of this foreach loop... $submix = $subject->title; (maps & geolocation, math, STEM, and a zillion others) $resmix = $resourcetype->title; (videos, games, magazines, etc.) $audmix = $audience->title; (kids, taxpayers, college bound, whatever) Assuming I might have to convert each title variable back to HTML, then remove "&amp;" or all special characters... Then spaces... and dashes I think caps and lowercase will work fine, however.
  5. Hi! I've got 3 page reference fields (multipage) used to tag database entries by audience, subject area, and resource type. These can be created on the fly, so you can ideally curate a special collection and have processwire generate pages, sorted displays, etc. Using Mixitup to create a nice sift and sort with multiple drop down menus. Mixitup doesn't like spaces, dashes, special characters - just letters. Rather than tell everyone, "don't use special characters!" I'd like to assume the worst and strip them out behind the scenes. The option value and card class are both invisible, so as long as it's just letters it should work whether it's upper or lower case. For the drop down menu I need to generate something like this: <option value='.ResumesJobs'>Résumés & Jobs</option> And then the actual card display below will contain a matching ID: <div class="mix ResumesJobs"> ---etc. </div> I've got the basics working... I can remove extra spaces. I can get rid of special characters. But I keep getting dashes and amp; in the displays. Tried the sanitizer->pageName which didn't get rid of the amp. Sample of my sad code below... gather all pages listed under subjects... create a variable $submix for the title... then try to strip out spaces and characters: foreach($subjects as $subject) { $submix = $subject->title; $submix = str_replace(' ', '', $submix); preg_replace('/[^A-Za-z0-9\-]/', '', $submix); echo "<option value='.$submix'>{$subject->title}</option>" ; } Is there a better single process? Sanitizer seems like overkill since this in internal stuff, not user input. Tried to html encode &amp; back to & and then strip spaces, characters, etc. but bogging down in errors and unable to get rid of dashes. Would appreciate any insights.
  6. Hi, I'm coding a pile of research that ends up being tagged for a variety of issue areas: early childhood, human rights, justice, etc. Using a multiple page array field to make it easy to select an unlimited number of issues. In most cases I want to spit out that whole list when the research blocks come up with titles, links, images, etc. so people can click any issue area listed... like this... foreach($feature->issue as $item) { echo "<li class='iss uk-text-tiny bold caps'><a href='$item->url'>$item->title</a></li>"; } But for the home page, I'd like to restrict the listing of issues to just the first one in the list, as that will be the primary issue area... rather than create a separate field. The total count doesn't matter because I want to use just the first and ignore the rest... foreach($feature->issue as $item) { [select the first issue in the list of supplied issues and then spit that one out linked] echo "<p class='iss uk-text-tiny bold caps'><a href='$item->url'>$item->title</a></p>"; } I'm getting better and bringing back everything but don't know if I should try to put in a counter? Establish a limit? ... appreciate any help.
  7. hollyvalero

    Oh, that is Nifty!!
  8. Thanks! Gotta check my email settings, my notifications are not showing up from the PW boards.
  9. I like the Reno wrapper for the admin. After looking at UIKit, then switching back to Reno, the back end is all Reno but the basic back end login page /processwire or /whateveryoucallit is displaying the original Default instead of the Reno login. I realize this is a first world problem, but I can't seem to reinstate the Reno login. Tried installing/uninstalling... It's not the same page code and it's not the same style sheets... I can't uninstall the default ...what am I doing wrong?
  10. Yeah, I think you're right. Just need to mimic the final destination... domain or subdomain for those that will be at the root. Or, identical folder name for those that will be in a subdirectory.
  11. ^^ btw, I did come up with an idea that would work... for websites that are either redesigns or brand new, I've designated an unused domain, activated it, and that will allow me to build at a .com address, export the site profile, and import it to another root level address. An addition to export site profile would be ideal, but this will work in the meantime...
  12. Yeah, trying to avoid further obfuscating DNS stuff, since that's the kind of thing that inevitably falls through the cracks later... no one remembers... the site grows big... It's not a huge site and grepping out all the paths will not take more than maybe an hour or two... I think. I'd rather do it now, before it gets bigger... Just wondered if there was a way to establish the root path within processwire. This is also helpful for developing a new site at an existing server... you'd want to build in a separate directory and move it up one while the current site is live and uncompromised. It's an administrative detail that always pops up in redesign. It would be the kind of thing that -- if it was part of Export Site Profile? Well, that would take care of it... if you could say "reset root path to..." with a domain name or domain.com/directory/path ...
  13. I have a website on a shared server that I use to store a few sites. My active domain is at the top. The new website domain hasn't been activated yet, but the path would be something like: myactivedomain.com/newdomain.com/ and once the DNS is flipped, just newdomain.com/ As I am building and adding a load of PDFs, all the links default to /newdomain.com/site/assets/files/etc... This isn't migration, but a DNS activation. Once that is updated, I'm still going to have a bunch of /newdomain.com/ links in there to pages, pdfs, images, etc. Before I resign myself to grepping out page-by-page all the "/newdomain.com/" references I thought I would see if there's a way to update these automatically in processwire but I'm seeing stuff on migration... stuff in the rich editors about correcting links, but I don't see anything that covers this. Is there a way to do this automatically? Via module? I didn't see anything in the config file... but would be grateful to anyone who can shed some light...
  14. hollyvalero

    I'm don't know how to implement this. Does every input field in the form need to be replace with a $variable . So the username field: <label class='label' for='username'>Username</label> <p class='control'> <span class='help is-info'>Please ensure your username contains <b>no spaces</b>. </span> <input type='text' class='input' name='username' value='{$v}'> </p> Does the entities string go before or after the form entry above? Do I batch all the sanitizer entries first? $v = $sanitizer->entities($input->post->first_name); Further down I am creating a user. Does this: $u->name = $sanitizer->username($input->post->username); Need to be changed to: $u->name = $sanitizer->username($v); If I can figure out the order for one field, I can apply it to all of them.