-
Posts
1,427 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Juergen
-
Maybe a hook could be an option. Create a module and add a hook "before save". You have to check for the field (fe. body) first. If it is the right field, then check for internal links. After that try it with a foreach loop to grab all installed languages (foreach languages as language). Here it will get tricky. Maybe you could grab the id out of the anchor? Replace the anchors by id if it is present in other languages too. It was just a thought and I dont know how to realize this, but maybe you have an idea.
-
Hello tpr, z-index man is back with a new z-index issue concerning the date/time inputfield. As you can see the date/time picker div will be overlapped by using the static header. The CSS used for this inputfield: .ui-datepicker {z-index: 100!important} So you have to add this line of code also to your Stylesheet with a higher index than the static header divs and the important addition. This is what it looks like with a much higher index: Best regards the z-index man
-
Perfect! Maybe its on the time to rename the module as well: TprOnSteroids
-
Hello Horst, thanks for your prompt answere. The page under Admin > Pages was missing. I have reinstalled the module and now everything works fine. Thanks!!!!
-
Hello Horst, I got problems with the crop function. I always get the error message "process returns no content" after clicking the cropping button: Here are the crop settings of my image field: As you can see I have added pre-defined crop settings to the image field. And here you can see what happens if I press the crop button: The modal window always shows that no content will be returned. I have tried to catch an error with Tracy Debugger but not luck. PW: 3.0.32, User: Superuser, PHP 5.6.25, Server: Apache, Croppable image 3: version 0.9.14 Any idea? Best regards Jürgen
-
Hello tpr, here is another z-index problem by showing the source code via CK-Editor. You gave the divs "breadcrumbs" and "headlines" a z-index of 100011. Now there is a problem if you use the "show source code" function of the CKEditor. This window will be overlapped from the 2 divs in the static bar, because the table which holds the source code has no z-index value (only position static). The following line of CSS should solve this problem (not tested yet): table.cke_dialog_contents {z-index: 100012;} Best regards
-
Thank you all for your contribution!! Finally I ended up with this piece of code, which works as expected: <?php /** * Processwire module for adding a special class for lists added via CKEditor. * by Juergen Kern * * ProcessWire 2.x * Copyright (C) 2011 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://www.processwire.com * http://www.ryancramer.com * */ class TextformatterForLists extends Textformatter implements Module { public static function getModuleInfo() { return array( 'title' => "Textformatter for lists", 'version' => "100", 'summary' => "This little Textformatter adds a class to the ol and ul tags", 'author' => "Juergen Kern", 'requires' => array( "PHP>=5.4.0", "ProcessWire>=2.5.28" ), 'icon' => 'list' ); } public function format(&$str) { $str = str_replace('<ul>', '<ul class="textlist fa-ul">', $str); $str = str_replace('<ol>', '<ol class="rounded-list">', $str); } } It seems that the class name causes the problem, but I swear I have not the same class anywhere on the page. Maybe the CK in the classname was responsible for the behaviour. Anyway now it works.
-
Thanks for the Explanation @LostKobrakai
-
Thanks @ Robin for the hint, I know this and i have tried it without the closing tag yesterday, but there was no influence. Currently I am not at home so I cannot test all the recommendations.
-
Thanks for the tipp Adrian, I will try this if I am at home and post my results here.
-
Hello @tpr, I see you use a different approach. Your function in MultivalueTextformatter looks like public function formatValue(Page $page, Field $field, &$value) { while my function is public function format(&$str) Could this be a reason?
-
After reinstalling it is not being loaded at all, flag stays at 1 in the db and it is definitely the body field where I have applied this Textformatter. I have created another CKEditor field for testing purposes and have applied this Textformatter too - same effect. The problem is definitely that the Textformatter will not be loaded in my case. I use the latest dev version (3.0.30) of PW.
-
Flag stays at 1, but nothing happens on the frontend. I will take a closer look tomorrow.
-
Doesnt work in my case. After refreshing the modules the value is set back to 0.
-
Hmmmm! Tracy Debugger says that this Textformatter module is not loaded (I cannot find it in the list of loaded modules) The other Textformatter that I have added to the body field will be loaded (it appears on the module list of Tracy Debugger).
-
Hello BitPoet, no whitespaces or additional attributes and the content comes from the body field. Caching is deactivated. Thats the reason why I am a little bit confused why it is not working
-
Hello @ all, I have created a very simple Textformatter module which should add a class to ordered and unordered lists. <?php /** * Processwire module for adding a special class for lists added via CKEditor. * by Juergen Kern * * ProcessWire 2.x * Copyright (C) 2011 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://www.processwire.com * http://www.ryancramer.com * */ class TextformatterListCK extends Textformatter implements Module { public static function getModuleInfo() { return array( 'title' => "Textformatter for Lists", 'version' => "100", 'summary' => "This little Textformatter adds a class to the ol and ul tag (only for lists added via editor)", 'author' => "Juergen Kern", 'autoload' => false, 'singular' => false, 'permanent' => false, 'requires' => array( "PHP>=5.4.0", "ProcessWire>=2.5.28" ), 'icon' => 'list' ); } public function format(&$str) { $str = str_replace('<ul>', '<ul class="textlist fa-ul">', $str); $str = str_replace('<ol>', '<ol class="rounded-list">', $str); } } ?> Problem: This Textformatter is added to the body field, but it doesnt change anything and I could not find any mistake. Maybe someone has a better experience in creating Textformatter modules and could give me a hint why it is not working. Thanks in advance
-
I have created the exact same field and added it instead of the body field. Now everything works fine. Unfortunately I was not able to trace down the problem according to the tipps of Robin S. Thanks all for your help.
-
Hello tpr, here is a new z-index issue On th right side - the dropdown of the usermenu will be overlapped by the PW messages. Not a big problem. You can click them away, but if you have time.... Data: PW 3.0.30, Reno Theme, AdminOnSteroids 0.5.1 Best regards from the z-index man
-
Of course. This was the first that I have done.
-
Hello Webrocker, I think it has nothing to do with the page/template because if I remove the body field from the template the page can be viewed without problems. It is only depending on the field.
-
Hello @ all, I have very strange error messages if I want to render my body field in a template. First of all: This happens only if I am not logged in as administrator and only for the body field. If I am logged in with superuser rights everything seems ok. Here are the error messages from Tracy debugger: Has anyone an idea what the cause could be? Best regards Jürgen
-
Now everything works fine Here is a small video to demonstrate the ajax login process for others who are also interested in creating an similar login process. Finally I have decided to redirect to the same page instead to the profile page because I think it is much more comfortable for the user. The form will be loaded via ajax. All inputs (username, password) will be checked in real time against the database. If everything is correct, the user is able to click the button and the login process starts. After finishing the login process I use a get parameter in the url to show a success message. Best regards
-
I have added it after success error: function(data){ alert('error');//or whatever you want }
-
Thats true! I havent added it because username and password will be checked first in real time with an ajax request and it is only possible to click the submit button if everything is fine. If username and password dont match it is not possible to click the button and proceed. The second validation (not really necessary) takes place on the server with the form data submitted via Ajax