-
Posts
6,626 -
Joined
-
Last visited
-
Days Won
358
Everything posted by bernhard
-
does this help? https://processwire.com/talk/topic/4822-ckeditor-justify-plugin-walkthrough/
-
I'm on mobile. Maybe you want to have a look at semantic labels: http://semantic-ui.com/elements/label.html#basic The great thing is that you don't have to load a heavy framework. It's all devided into small components. That's really great when you are missing something in another framework. Maybe you could provide different marker styles easily using semantic
-
Credits go to tpr but I think the forum could profit if we spread the word and more people used it to show their work. I think it's the most efficient way to show modules/features and so on
-
hey kixe, also the best wishes to you would you mind doing a short screencast so that we do not have to install it, create the fields etc... http://www.cockos.com/licecap/ is a cool small tool to do that in seconds on win/osx. it creates a GIF so you don't even have to upload it to youtube or the like. just record and post it directly here in the forum. thank you for sharing your module
-
could I open a insert image to a new browser window?
bernhard replied to adrianmak's topic in General Support
https://processwire.com/talk/topic/803-tinymce-insert-image-modal-window/?p=6802 -
+1 for at least more integrated cropping. i agree that apeisa and horst did an awesome job on their modules but i don't think that should be a reason to not build this functionality into the core. i use those modules in every project and i really think that's a very common and core-worthy thing. thank you peter for your work on the mockups
-
Bootstrap ProcessWire - fields not working like expected
bernhard replied to Henrik's topic in General Support
Hi henrik, this problem comes from the fact, that there is no outputformatting when bootstrapping PW. therefore image fields are always arrays even if they are set to max = 1 and all your textformatters won't work. https://processwire.com/talk/topic/5375-image-paths-when-bootstrapping-pw/ regarding your ajax problem: you don't need to create a file outside your site folder! you have two options: 1) create a separate template only for ajax requests and also a page for that (eg hidden page /ajax) - then you can just call this page and return your content 2) return your ajax content from within the same file. if you are using delayed output strategy that's really easy. all you have to do is put something like this on top of your template file: if($config->ajax) { // do your ajax stuff here echo 'i am an ajax response'; die(); } // regular call $headline = '<h1>' . $page->title . '</h1>'; $content = $page->body; and so on... hope that helps! good luck -
very easy now with newer versions! just put this in your /site/ready.php $wire->addHookAfter("Session::login", function(HookEvent $event) { $user = $event->return; // check if login was successful if($user) { // your condition here if(!$user->isSuperuser()) { // your destination page here wire('session')->redirect('/'); } } });
-
such a fieldtype could be really cool for seatmaps in a booking system http://iakob.com/canvas-area-draw/demo.html sorry... just dreaming
-
you could also create one regular image field and trigger clicks on that image via jquery http://stackoverflow.com/questions/2159044/getting-the-x-y-coordinates-of-a-mouse-click-on-an-image-with-jquery . you could then trigger an "add new" event on a pagetable and fill the coordinates that you got from the click offset. editing existing items would be more difficult though... just to throw in an idea
-
Copying pages or content from one Processwire instance to another
bernhard replied to FrancisChung's topic in General Support
sorry, just guessing, no experience with it, but maybe the new devns is worth a try: https://processwire.com/blog/posts/processwire-2.6.20-and-surprise-processwire-3.0-alpha-1/#processwire-3.0-alpha-1 ? -
Parse Error: syntax error, unexpected '}' (line 109 of /var/www/html/site/templates/systemcheck.php) This error message was shown because you are logged in as a Superuser. Error has been logged. PHP Version 5.5.9-1ubuntu4.14 sorry, no time to investigate this on my own for the time...
-
this looks great kongondo! have you thought about implementing the blueimp file uploader to it? it has built in preview (at least for mp3 and images) and supports client side image resizing. that's one thing i am missing most when it comes to image galleries! looking forward to trying this module
-
If you turn on debugging you can see the MySQL queries on the bottom of the admin
-
Hi and welcome combicart! You can use "wirerenderfile" for that. On mobile, so please use Google. It's very easy and i use it in all my projects
-
How to use pw to create a guestbook like functionality ?
bernhard replied to adrianmak's topic in General Support
sounds like a job for listerpro... just choose what fields to display and you're done. admincustomfiles could also be helpful -
Repeater field usability; reverse order/collapsed items
bernhard replied to a-ok's topic in General Support
On mobile but I know there is a topic about this on the forum. Did you try Google forum search? In my opinion pagetable have a lot better ux most of the time. Maybe try that? -
/site/ready.php $wire->addHookAfter("ProcessPageEdit::buildForm", function(HookEvent $event){ $process = $event->object; $page = $process->getPage(); $config = wire('config'); if($page->template == 'basic-page') { $config->scripts->append($config->urls->templates . 'scripts/pagefieldclearbutton.js'); } }); /site/scripts/pagefieldclearbutton.js $(window).load(function() { $('ul.PageListActions').append('<li class="PageListActionSelect PageFieldClearButton"><a href="#">Unselect</a></li>'); $('.PageFieldClearButton').click(function() { $(this).parent().siblings('p.PageListSelectName').html(''); $('#Inputfield_pageselect').val(''); }); }); working starting point. maybe someone wants to take this further... as you can see it jumps to the pagetop for now
-
thank you! i was already using document.ready (short syntax) - gebeer was right, both injecting the JS via str_replace(</body> and loading the script via window.onload worked! i updated the code above so it should be working now.
-
hi tpr, this method works in frontend but not in admin! try echo $page->id; it will show "10" for all processpageedit pages... /admin/setup/ would be 22 unfortunately there's a bug in my script: when you save a field with 5 pages it will not remove the select-field because its only called on change of the field. the problem is, that the select-field is injected by jquery by the admin so this does not work: // my field is called "pageselect" $(function() { $('#Inputfield_pageselect').siblings('select').hide(); // added this line $('#Inputfield_pageselect').change(function() { if($('#Inputfield_pageselect :selected').length > 4) { $(this).siblings('select').hide(); } else { $(this).siblings('select').show(); } }); }); maybe it would work if the script was loaded at the very last of all scripts? how could i achieve that?
-
nice challenge for the evening with a happy end create a javascript file scripts/limitpageselect.js: // my field is called "pageselect" $(window).load(function() { if($('#Inputfield_pageselect :selected').length > 4) $('#Inputfield_pageselect').siblings('select').hide(); $('#Inputfield_pageselect').change(function() { if($('#Inputfield_pageselect :selected').length > 4) { $(this).siblings('select').hide(); } else { $(this).siblings('select').show(); } }); }); and inject this file via hook in /site/ready.php $wire->addHookAfter("ProcessPageEdit::buildForm", function(HookEvent $event){ $process = $event->object; $page = $process->getPage(); if($page->template != 'basic-page') return; // set your template name here $config = wire('config'); $config->scripts->append($config->urls->templates . 'scripts/limitpageselect.js'); });
-
i created a sublime snippet for that so when i need it i just have to type resetadminpassword and i'm done <snippet> <content><![CDATA[ \$admin = \$users->get(${1:41}); \$admin->of(false); \$pw = '${2:admin}'; \$admin->pass = \$pw; \$admin->save(); echo 'username: ' . \$admin->name . '<br>'; echo 'password: ' . \$pw; die(); ]]></content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <tabTrigger>resetadminpassword</tabTrigger> --> <!-- Optional: Set a scope to limit where the snippet will trigger --> <!-- <scope>.php</scope> --> </snippet> just save it under C:\...\Data\Packages\User\php\reset-admin-password.sublime-snippet and use TAB to navigate from userid to password
-
seems that pagetable got updated and now displays images in a new way: the problem is that the id of the link is wrong (it uses the page id with the pagetable, not the item id where the actual field resides) my quickfix was to hide the buttons via css: table div.cropLinks {display: none;}
-
thank you both adrian and teppo! i think teppo is right and i will have to test my setup with dynamic roles - no need to invent that wheel again