-
Posts
1,835 -
Joined
-
Last visited
-
Days Won
21
Everything posted by Nico Knoll
-
OK, I updated preview.php with something much simular to Ryans posted code. So it should be much safer while I'm working on the backed method. Same download link like in the first post.
-
Well yeah I'm working on it but I hadn't much time this week because of my school life. So at the weekend I probably improve this module
-
I would recommend Modernizr.js with IE-Specific tags (<!--[if IE]>). Did this for my schools homepage and now it's working up to IE6.
-
Why is your parser that complicated. I mean I also used a __() function for translations month ago and it always worked like this: function __($string,$type) { global $db, $lang; if(is_file('languages/'.$db->get_element('setting','value','`key`=\'language\'').'.php')) { require_once('languages/'.$db->get_element('setting','value','`key`=\'language\'').'.php'); // something like de_DE.php } if(isset($lang[$type][$string])) { return $lang[$type][$string]; } else { return $string; } } So you could e.g. have multiple translations in one line, ... / Nico
-
The category thing isn't possible because some articles got more than one category. So I've created a 3 third child of home called "categories" and made every category a subpage of "categories". And if you're editing a article you can add categories with an page tree
-
My problem is that I have like 300 article pages. And I have some static pages. So if I would have each page as child of "/" it would be hard to find to the static pages. So I created to different pages as parents ("pages" and "article") but I don't wanted to see "article" or "pages" in the url. To 2.: If I'm creating a module I often don't really know how I should name it (I know, we had this already but I forget where) and I'm not sure what kind of class I should use for "extends" or "implements" so I'm normally just using something that works To 1. and 3.: I'll improve this in the next update
-
To the first: Tested it - doesn't look good... To the second: I guess it's better like this, because "Save"/"Publish" is the main button and "Preview" is just a second, optional.
-
Hi, here's a really simple preview module. It adds a "preview" button next to "save". To use it you have to copy "preview.php" to your root folder. (If the module has write permission it should do it automatically). Please let me now if it work and what do you think about it. You can download it here: https://github.com/NicoKnoll/ProcessPreview/ Happy new year(!!!), Nico
-
Hi, today I want to introduce my biggest and most powerful module until today: ProcessPermalink. The main function is to change URLs of pages so that you can customize the pages URLs (e.g.: http://example.com/article/abc/ -> http://example.com/2011/10/10/abc/). You can set a separate URL formats for each template under "Your Template -> URLS -> Permalink Format". For this, you can use the following placeholders (I'll add some more in the future): %name%, %author%, %id%, %year%, %month%, %day%, %hour%, %minute% and %second%. It's not perfect right now but it's working. Unfortunately you have to do two core hacks to make some core functions hookable: Change "buildEditFormURLs" to "___buildEditFormURLs" in line 916 of "wire/modules/Process/ProcessTemplate/ProcessTemplate.module" Change "path" to "___path" in line 865 of "wire/core/Page.php" Another problem is that you have to add a URL format to every existing template and to every template you'll create in the future. And something that will probably be missed right now is %parents% (and maybe something like %default%) but I'm working on it. But I would be happy if you could try it out and report errors to me so that I can optimize it. You can download it here: https://github.com/NicoKnoll/ProcessPermalink Hope it will work for you! Greets, Nico
-
YES! It works What does addHookBefore do exactly?
-
I just replaced the "<p class="...">" with preg_replace. But now I've got the problem that I have to save an additional template file (permalinkFormat) but if I use "___executeSave" I can't use "$this->input->post" because it does a redirect...
-
Hi, I try to modify the "InputfieldPageName". I'm using the render hook, but it returns the whole form so I'm looking for a way to only modify this specific field. Does anone know a way? Greets, Nico
-
Add field to "setup"->"template"->"URLs"
Nico Knoll replied to Nico Knoll's topic in General Support
sent -
Add field to "setup"->"template"->"URLs"
Nico Knoll replied to Nico Knoll's topic in General Support
I've got autoload = true -
Add field to "setup"->"template"->"URLs"
Nico Knoll replied to Nico Knoll's topic in General Support
Ok: I'm building a module which shouldn't be loaded if im in the backend. So I tried first to get the backend URL with "wire('config')->urls->admin" and second to get the template "wire('page')->template". But both return NULL. -
Add field to "setup"->"template"->"URLs"
Nico Knoll replied to Nico Knoll's topic in General Support
OK. And by the way: is there a way to use wire('config') in the init part of a module? It always returns NULL... -
Add field to "setup"->"template"->"URLs"
Nico Knoll replied to Nico Knoll's topic in General Support
Well, in the meantime I added just "___" and now it's hookable. Would be beautiful if you could make as much functions hookable as possible! Greets, Nico -
Hi, how can I add a field to "setup"->"template"->"URLs"? Greets, Nico
-
I wrote my own version of grid-a-licious. And I'm working on a mobile HTML5 version . But right now it's optimized for windows which are at least 960px width. So it will work on every device in something like a week
-
The main problem was the fade in javascript effect. The page never were really slow but everyone thought it because the script waited until all of the images were loaded (now I additionally wrote a cache script for them ). So I deleted this effect and it seem to load much quicker.
-
OK, changed it
-
Hi, I just finished my second module today. This one is based on the "js_QuickTags.js" of Alex King (alexking.com) which is under the LGPL licence. This module will add a toolbar above a given textarea which holds some insertable HTML tags. You can add it to a textarea like you would add TinyMCE. It's inspired by the HTML <-> TinyMCE switch editor of WordPress. You can download it here: https://github.com/NicoKnoll/QuickTags Hope you like it. Greets, Nico
-
No, because I don't know what you want to autocomplete (But maybe I'll add one later so that you can define some points in the "Details" page)
-
Hmm, maybe you're right. I never created a Fieldtype/Inputfield before so I thought I have to create both But I think I need both... Nevertheless a new version is uploaded
-
Hi, today I started and finished work on my new module "TextboxList". It includes "FieldtypeTextboxList" and "InputtypeTextboxList". The main function is to create inputfields like Facebook when you have to insert the name of your friend (see the screenshot below). It automatically creates a new "box" if you press "," or "enter". The result will be saved as a comma-separated list. It is based on the TextboxList.js of Guillermo Rauch so I wouldn't use this for a commercial project right now. (But I wrote him a mail if he would allow this). I changed the color schema so it looks like a native element. I recommend to use it if you have something like a tag list (like: bla, christmas, bla, 2011, bla, ...). You can download it here: https://github.com/N...oll/TextboxList Have fun with it! Greets, Nico