-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
<= IE7 is blocked from the admin anyway already by the admin theme javascript. I don't think ti would be a problem to use icon fonts, but hard to implement a module based on what chars and how the icon font is made. It would be a horror to make your own and further. If you look at the page tree and what you can customize, and quickly create your own icon for a special purpose, dorp that in the folder and go... is far more flexible than hard molted icon font. I agree it would be a nice thing for buttons and other UI elements in PW admin, and use icon font for a custom theme.
-
language translation in templates stopped working
Soma replied to Soma's topic in Multi-Language Support
I can't get it to work with modifying the debug_backtrace. Why does it not find the text domain and works in PW 2.2.2? Is that related to some other part? No matter what I do, it must be that __() function not finding the template file? -
You could use @x2 versions and with some css. I also thought at first it would be cool to use icon font. But for various reasons also mindplay mentioned it's really a lot more easier to use bitmaps. The way it is done is nice and allows to easily change and add icons. Perfect for this usecase in the page list tree. Icon font would be nice for admin interface icons and for frontend. @mindplay I'm not sure how to handle the theme conflict with the module. Overwriting via CSS would be an option, since my and other themes use CSS to add icons to the div wrapper as background. You module add an img to each page via the label. This is a nice thing. That's what I meant that I would have done it differently and basicly use CSS styling for adding icons same as with the theme and overwrite them so to say. This would have also worked, but the current solution is also nice I think. Also, as with this thread, Ryan added a css class to each page in the tree with it's template name especially for being able to do something using css only. Since the admin theme is not a module and I don't want to add a module together with the theme the user also needs to install. No option for me. 1. So either remove my icons from the theme completly, and be able to add icons with this module. 2. Or add a line or two in my theme to check if your module is installed and then not ouptut the css for the theme icons. 3. Your module overwrites css for the pagelist tree to remove icons. As for the states. For the hidden pages it already has opacity changed as by default in PW, and unpublished are strikethrough. So this is already covered, and for having separate icons for each state I think it would be overkill.
-
language translation in templates stopped working
Soma replied to Soma's topic in Multi-Language Support
This seems related to what I already reported a while back with php 5.2.4 -
language translation in templates stopped working
Soma replied to Soma's topic in Multi-Language Support
I have no idea why it suddenly stoped working but found out if I add the language domain the text translation works. Like __("text",__FILE__); __("text"); simply stopped working for some reason I don't know. It would be great to not have to add __FILE__ to each text phrase. -
language translation in templates stopped working
Soma replied to Soma's topic in Multi-Language Support
Ok, I tested on my local test install 2.2.9 and it works normally with translations in templates. But can't get it to work on that host. Only difference I know is php version. Locally PHP 5.2.9 and on the server where it doesn't work PHP 5.2.4. So, strange thing it works when I put in PW 2.2.2. -
language translation in templates stopped working
Soma replied to Soma's topic in Multi-Language Support
Thanks apeisa for mentioning. That's something I also recognized in the latests versions... -
language translation in templates stopped working
Soma replied to Soma's topic in Multi-Language Support
Just uploaded 2.2.4 and still the problem persists. -
language translation in templates stopped working
Soma replied to Soma's topic in Multi-Language Support
Thanks MG, I just uploaded PW 2.2.5 core, but it still same problem. -
Are you using abstract link module from Ryan?
-
language translation in templates stopped working
Soma replied to Soma's topic in Multi-Language Support
Ok if I drop in an older /wire core (2.2.2 as in footer) it works again with the translation, but the whole admin is broken then. Thanks. -
Somehow on a page I use PW translations: echo __("Text string") it stopped working showing the alternative language. Before it was all ok. I updated the core to latest 2.2.9. No luck. Before I updated to 2.2.6 and there it seems it stopped working. I didn't recognize until now. The page is a formular: http://www.velokurie...ine-bestellung/ and you can cahnge to english using the link above the form. So only the formular is/should be translated (not the rest of the page). I didn't change anything so I'm a little lost as to why and how. Language is set like this: if($input->get->lang){ $lang = $sanitizer->pageName($input->get->lang); $langfield = "_en"; } else { $lang = 'default'; $langfield = ''; } $user->language = $languages->get($lang); Then in the formular the texts are outputed like this: <?php echo __("Vorname / Name")?> And it worked really well, until now. Any ideas?
-
Thanks alan for mention. Yes I think if you use a custom content.css and don't have the PW classes .align_left etc in it won't show the floating in the editor. PW has those classes in the content.css from the InputfieldTinyMCE by default, so if you create you own content.css make sure you copy them over. If you want to be able to select those classes also manually via bramus you write "img.align_left{}" with the tag "img", if you don't want them to show up in the bramus style dropdown you can just write ".align_left{}"
-
I shared this already a couple times, but thought copy it here also. I have a site where there's language folders on the root level. To give different users only access to edit and add pages in a branch with all children inherited, or just a single page. I use a page field on user template to sepcify which page. Then use this module code. .. public function init() { if($this->user->hasRole("editor")) $this->addHookAfter("Page::editable", $this, 'checkpermission'); if($this->user->hasRole("editor")) $this->addHookAfter("Page::addable", $this, 'checkpermission'); //if($this->user->hasRole("client")) $this->addHookAfter("Page::viewable", $this, 'checkpermission'); } public function checkpermission(HookEvent $event) { // if it was already determined they don't have access, then abort if(!$event->return) return; $page = $event->object; $parents = $page->parents; // run check for parent pages and allow recursive inherit access foreach($parents as $p){ if($this->user->editable_pages->has($p)) return true; } // then run check on selected single pages if(!$this->user->editable_pages->has($page)) $event->return = false; } ...
-
I'm not sure it is official but I see it here ../tutorials/quick-start/ I think Ryan moved it and it is "in progress".
-
wire("sanitizer")->name() I'd guess.
-
Yeah it's exactly what it does (your code). have your tried it? InputfieldForm is just a wrapper.
-
What so confusing about a form?
-
What about using InputfieldForm. ... $form = $this->modules->get("InputfieldForm"); $form->attr('action', $url); $form->attr('method', 'post'); $form->attr('id', 'myform'); ... $form->attr('value', $table->render());
-
Yes it's trying to load the content.css from ergo in core. Though it still load the one you specify in the field additional settings. So no big deal for me.
-
Of course the image folder (whole "ergo" folder) should be in there.
-
With this hack, you'll also still have the tiny_mce.js core loaded by the field. Not very convincing. Apart from all dialogs not working. <script type='text/javascript' src='[url="http://pw2-dev.ch/wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.4.7/tiny_mce.js"]/wire/modules/Inputfield/InputfieldTinyMCE/tinymce-3.4.7/tiny_mce.js[/url]'></script>
-
If you really want to have a skin together with admin theme you could do something like this without having whole TinyMCE delivered. Put the "ergo" skin somewhere into templates-admin folder. if('undefined' != typeof InputfieldTinyMCEConfigDefaults){ InputfieldTinyMCEConfigDefaults.skin = "ergo"; InputfieldTinyMCEConfigDefaults.editor_css = "/site/templates-admin/themes/ergo/ui.css"; InputfieldTinyMCEConfigDefaults.popup_css = "/site/templates-admin/themes/ergo/dialog.css"; };