-
Posts
2,780 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Macrura
-
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
-
@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..
-
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..
-
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.
-
Any way to create multiple fields (of the same type) at one time?
Macrura replied to n0sleeves's topic in Getting Started
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- 9 replies
-
- 1
-
-
- multiple fields
- field creation
-
(and 1 more)
Tagged with:
-
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..
-
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...
-
thanks soma, just used this on a project, really solved a need.
-
gotta love wordprass sometimes known as wordprat
-
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); } }
-
nice! i've done a lot of tables from repeaters... this might come in handy...
-
i have no problems inserting with FF, dragging and resizing; i'm on 2.3.0, mac os x 10.8.2
-
Can't Login to ProcessWire Site Anymore
Macrura replied to thetuningspoon's topic in General Support
maybe check the php version, if it got upgraded, then downgrade it back to what it was so you can login... -
@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);
-
i just meant that i can't get this hanna code to work with less than or greater than symbols, like this: [[works range=<2000]] i get no results for the selector; this does work if i put the selector directly in the code, as per original post on this; thanks!
-
@flyerdave - having recently converted a very complex wordpress theme into something that could be used for processwire, i think i might be able to help you simplify the process; first thing is you'll need to have a working install of the actual wordpress theme running on wordpress; then the next step is to look at the generated markup; from there you'll be able to figure out how to structure the pages, including the head and foot (depending on how you do that - for example if you are using the default profile, you would place the header code in the head.inc file and the footer code in the foot.inc files). it was so much easier than i thought it would be once i stopped looking at the wordpress theme files; i did look through all of the WP files for the theme i was converting, to see how they were handling certain output, and was able to sort of convert that thinking into a processwire model. my version actually runs way faster and has way more flexibility that the original wordpress version and can do a lot of tricks that WP people would be scratching their heads over... i'll be posting it in the showcase soon;
-
Maybe Hanna code?
-
I have this problem on a recent site - the spell check in TinyMCE doesn't work at all; i will check some older sites and see if those still work.
-
right thanks as always kongondo... it's not a huge rush, i was just wondering if anyone else had done hanna codes with comparison operators, and if there were some examples i could look at to determine if I'm doing something wrong... i also think it will be good to eventually have a repository of hanna code examples; hanna codes are going to be really essential to this one site i'm working on, in order to let the editors place tags for redundant info, such as telephone # etc...
-
so i guess i should assume that hanna code can't handle PHP comparison operators?
-
sure sitnarf - if you need help post here; i have tweaked the js now to support editing in lightbox and refreshing the table after closing the lightbox;
-
How can you pass parameters to a selector in Hanna Code; for some reason i can't get it to work; i have an attribute called "range" and then my hanna tag looks like this: [[works range=<2000]] which means my $range variable is <2000 the $workrange variable is then work_year<2000, but the code doesn't work... $workrange = ""; if($range) {$workrange = " work_year{$range}, "; } $works = $pages->find("template=work,$workrange sort=-work_year"); $out = '<ul>'; foreach($works as $work) { $out .= "<li>{$work->title}- {$work->work_year}</li>"; } $out .= '</ul>'; echo $out; the selector works if i put the work_year<2000 directly in the code, it just doesn't work with hanna code. it also works if I use an = sign not a > or <.... so i get results if i put in range==2000 to the tag, which makes the $range var be "=2000"
-
i noticed that on mobile, the menu doesn't collapse... which means a lot of scroll down when navigating through the site on mobile
-
@sitnarf - you mean like this? http://processwire.com/talk/topic/704-datatable/?p=40621