Jump to content

Macrura

PW-Moderators
  • Posts

    2,756
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. This is great, my only issue is that i'm having trouble with CKEditor in general, with it loading up blank, and it's been hard to track down the issue - so switched back to tinyMCE, and am thinking about how i could adapt this module to be used with that, might be cool to have a button on the toolbar with 'HC' or something which would bring up the list of hanna codes EDIT: just read the readme.md... looking forward!
  2. @Wanze - good solution thanks!, this might work, i'll try it out; this is searching through about 200 pages max, so it should be ok i think for performance;
  3. @sshaw - i don't think that would work because at the point that the if statement is run, it would only apply to the $page which would be the search page or any page with the search form; i tried a lot of ways of doing selectors with an OR; the selector is built up like in the skyscrapers profile, so has various other elements; but the part with the ages i want to return pages where age_min<=$value, age_max>=$value OR age_max='' [ so i can't do a pipe here because the >= won't work to compare to an empty field ] (age selected on the form = $value) I could add a secondary selector all through the search processor and then run 2 $pages->find at the end, one with each of the 2 selectors and then import one into the other, but i was hoping to avoid doing a double query for this, i would probably at that point just run some code to fill in all the empty fields with defaults.. main reason why i'm bringing it up is in case i'm missing some easy way to do this with a single selector string, or anyway to globally replace that field value with a hook, sort of like how in the CMS critic study, Ryan changes the default Page::path function for certain templates
  4. Yes! that would be great! - seems the only reliable way to use HC with an editor? otherwise you'd have to adjust the config settings per the above conversation...
  5. I have a situation where a template has 2 age range fields: age_min and age_max. If the age_max is blank, i would like to tell the api to treat that as the number 99, so that searches by age will return results; i'm using a search system very similar to the skyscrapers profile; I couldn't come up with a selector that would return results with this situation; for now it works if we enter 99 as the age_max; but looking for a backup for the pages already entered..
  6. does this module work for roles other than superadmin - i can't seem to get it to show for a manager role i setup.
  7. @Teppo - thanks again for your help and comments - yeah i should definitely go with the basicEntities and decode in Hanna.. will try asap and report back...
  8. thanks Ryan - didn't see your reply but i'll test today or tomorrow with the file you posted
  9. yes - i'm using CK editor (and your hanna code helper...thanks for that!!!).; so what would be the fix for this, is there a way to prevent CK editor from encoding automatically? this issue also relates to my posts a few up about php comparison operators like < and >; the reason those hanna codes were not working was from the same editor problem; being that this is really a major issue for Hanna Code, i think this should be addressed, or at least some instructions or disclaimer in the readme file, as i have spent several hours trying to figure out a fix/workaround for this.. so i added this to the config.js: config.entities = false; not sure if this will have any impact on other areas, but it at least fixed this issue.
  10. having trouble with this, for some reason the hanna code is not working with atttributes like this [[accordion title=Some Title]] this one has an attribute called 'link'. all it outputs is "Some but i don't get why my variable is not being fully passed to HC, i'm following the instructions from the ReadMe <?php echo "<div class='trigger'> <a href='#'>"; echo $link; echo "</a> </div> <div class='hide'> "; !HannaCode:accordion:eyJuYW1lIjoiYWNjb3JkaW9uIiwidHlwZSI6IjIiLCJjb2RlIjoiXC8qaGNfYXR0clxubGluaz1cIlNvbWUgVGV4dFwiXG5oY19hdHRyKlwvXG48P3BocCBcclxuZWNobyBcIjxkaXYgY2xhc3M9J3RyaWdnZXInPlxyXG5cdCAgPGEgaHJlZj0nIyc+XCI7XHJcbmVjaG8gJGxpbms7XHJcbmVjaG8gXCI8XC9hPlxyXG4gICAgICA8XC9kaXY+XHJcblx0ICA8ZGl2IGNsYXNzPSdoaWRlJz5cclxuXHQgIFwiOyJ9/!HannaCode
  11. @kongondo - do you think it would be ok to use this on a production site? I have to make a custom menu for a new site, and before i go and do it with pages, i wanted to maybe consider using this..
  12. did wordprass change something? I really don't like WP backend, default PW is vastly superior IMHO... i can get so much more done and much faster..
  13. you start with a html file and add any calls to the api as necessary; from 0 and up. for example to get your stylesheets and js you would do <?php echo $config->urls->templates?>style.css (if your style.css was in the root of the templates folder..) most of what you initially need to know is all there in the default profile.
  14. also i think there are some code examples in the forum for how to add fields using the API; you would just paste that code in a template file and run it and all your fields/templates would get created... will have to search tomorrow...getting a bit late here
  15. i guess if you are not wanting to do all of the design work from scratch, you could start with a template, or a framework; If you can find something on Themeforest that covers a decent percent of what you need, you might save yourself some markup/css time..
  16. in dev branch, my page list select (using asmselect) stopped working when using custom selector: has_parent=/settings/class-types/, template=option-generic i had to change from the custom selector to a PHP selector return $pages->find("has_parent=/settings/class-types/, template=option-generic"); in summary, i have a page field, which was using a custom selector to find the pages; it stopped working after i updated to dev branch; it works only when using the PHP selector... not sure why the PHP selector works, and not the custom selector...
  17. thanks soma, just used this on a project, really solved a need.
  18. gotta love wordprass sometimes known as wordprat
  19. Hi Manol, not sure if this would help, but last time i had to add a hook to FB, i used something like this, in the form-builder.inc file: $forms->addHookBefore('FormBuilderProcessor::saveForm', null, 'hookCampaignMonitor'); function hookCampaignMonitor(HookEvent $event) { $form = $event->object->getInputfieldsForm(); // make sure it's the form you want if ($form->name != 'product-inquiry') return; // grab the data $email = $form->get('email_address')->attr('value'); $first = $form->get('name_first')->attr('value'); $last = $form->get('name_last')->attr('value'); $subscribe = $form->get('subscribe'); $name = $first . ' ' . $last; // check to see if they subscribed if($subscribe->attr('checked')) { $cmurl = 'http://www.example.com/?some-var=' . urlencode($email) . '&cm-name=' . urlencode($name); // post the data $http = new WireHttp(); $http->post($cmurl); } }
  20. nice! i've done a lot of tables from repeaters... this might come in handy...
  21. i have no problems inserting with FF, dragging and resizing; i'm on 2.3.0, mac os x 10.8.2
  22. maybe check the php version, if it got upgraded, then downgrade it back to what it was so you can login...
  23. thanks martin/SiNNuT for posting on pure; i was thinking of trying to build something with this soon: http://www.getuikit.com/
  24. @teppo - thanks, i finally got it to work, i had to decode the > and < signs, that's what i was wondering about with hanna code and why i originally was asking about using comparison operators like > and <, since in the editor they get encoded and that's why the selectors were not working... i just had to add this line and it works now: if($range) $range = html_entity_decode($range);
×
×
  • Create New...