-
Posts
338 -
Joined
-
Last visited
-
Days Won
5
Everything posted by virtualgadjo
-
Hi, yes ? have a look at this blog post https://processwire.com/blog/posts/processwire-3.0.75-and-a-new-version-of-prodrafts/ have a nice day edited to say i should have clicked on your links before answering... so, just yes ?
-
hi, wow, of course, first thing to check out, i forgot, you're right ?
-
Hi, have you tried adding CreateDiv to CKeditor toolbar ? you'll find it in the field setting "input" tab => CKEditor settings this allows you not only to create div directly from the toolnar but will also keep yours if you wrote some in the source code hope it helps have a nice day
-
Issue with PWimage in CKEditor in PW 3.0.184
virtualgadjo replied to Alkrav's topic in General Support
Hi @Alkrav my pleasure and, wow, good idea a little search field when dealing with website with a lot of pages in my case i have three situations that help me not be lost in the matrix ? - when it comes to complex repeater in which i know i'll use many images, i put an image field in each repeater item (as they are pages, it works like a charm) - in the case you describe, the image field in the "parent page", well, not too long to select but here i admit i won't deny the use of a search field for big website or, simple way to prioritize this "parent" in the list page - when it comes to images i know i'm going to use in many pages i usually have a "stock page", hidden from the front side and the sitemap, in which i put some fields, default translations (with Ryan functional fields module), some default fields i'll use in many pages and... an image field i often give this page a loooong title that make it easy to find in the list ? but i like your search field idea, you should suggest it in the wishlist forum! Ryan may like that too ? have a nice day -
Issue with PWimage in CKEditor in PW 3.0.184
virtualgadjo replied to Alkrav's topic in General Support
Hi @teppo thanks a lot for your insight, i was assuming something like that as it sounds very logical according to the pw "everything is a page" concept and us crazy devs are quite found of logics ? but thank you very much for the hook, it may help for clients who would be confused after a pw update and i'm sure @Alkrav will love it too ? have a nice day -
Issue with PWimage in CKEditor in PW 3.0.184
virtualgadjo replied to Alkrav's topic in General Support
hi, actually this could be seen as a more strict pw way of thinking pages... each item of a repeater is a page by itself, that's what allows you to use the same fields many time in a "parent" page so far, pw repeater items ckeditor went browsing its parent page images but imagine you had an image field in the repeater item, the problem would be the same but inverse i know we can tell a ckeditor field which field to go looking for images but, in a repeater, you would have as many of this image field with the same name as you have repeater items and, have a look at the item name, a little harder to find it in a list of pages than the parent page the repeater is in i think this is the reason for this little change of behaviour have a nice day -
Extra custom button before the "save" button in admin area
virtualgadjo replied to stanoliver's topic in Getting Started
Hi @stanoliver in this case, i remember an old post that may help you adapt the code to your own need it does, at least visually, exactly what you are looking for bernhard added a more recent solution that may worth a look (like everything this guy writes here ?) have a nice day -
Extra custom button before the "save" button in admin area
virtualgadjo replied to stanoliver's topic in Getting Started
hi, i don't know when it come to a slogan but if you need a function button or a dropdown with a series of actions behind each link, it's quite easy to do this with a module it won't go before the save button but will be easily visible in the top menu bar like in this french website i've made in case it helps ? have a nice day -
Hi @joe_g great, good to hear everything works fine ? you'll see, in certain cases you'll also have to use a personal config.js file for your ckeditor but usually pw does the job without help ? have a nice day
-
@Mika Hi, don't be confused by this char length thing about the page title, it actually concerns the page title tag not the title of the page the title tag is not a native pw field and and would not advise you to use the page title for both things as far as SEO is concerned, google indeed said that the first 60/65 chars are really useful (taking into account that the more a word is at the beginning the stronger it is in a title tag, you don't make a keywords list but you are not too literary either and you wouldn't like your displayed page title to look like this tag ? have a nice day
-
Hi, yes, it could be ? i've had the same problem once forgetting to change this param when migrating my website from local to online have a nice day
-
Hi, as Robin said, so far it's not a native pw selector and, being a great fan of sql queries i do like his solution ? now if you want to take advantage of what pw gives you with selectors, you can just add a numeric field to the templates you want to find name it as you want (i'll use titlelength for my example) in the field tab of the... field set it as hidden then in your ready.php file put something like this (the namespace is just here in case you don't have a ready.php file for the moment) <?php namespace ProcessWire; if(!defined("PROCESSWIRE")) die(); $pages->addHookAfter('saveReady', function($e) { $p = $e->arguments(0); if($p->template != 'template_to_play_with') return; // you could also use an array of templates to exclude and if (in_array($p->template, $your_array)) $ln = strlen($p->title); $p->set('titlelength', $ln); }); now you can filter using titlelength>10 hope it helps have a nice day
-
Hi, if you look at the plugin js source code, you'll see its dependencies requires: 'api,widget', and, downloading those ckeditor addons, you'll see widget has quite a lot too so, first, you'll have to download those https://ckeditor.com/cke4/addon/api https://ckeditor.com/cke4/addon/widget https://ckeditor.com/cke4/addon/clipboard https://ckeditor.com/cke4/addon/notification https://ckeditor.com/cke4/addon/lineutils they are not default plugins installed in pw then, well, i suppose you've put the detail plugin files in a... detail folder in your /site/modules/InputfieldCKEditor/plugins folder, do the same with all those plugins folders too but it's not finished ? go to your ckeditor field input tab and allow all those plugins and, afterwards but considering your post i think you've already done this, add Detail to your ckeditor toolbar, job done ? ckeditor is highly configurable but it's not always that simple ? have a nice day
-
Trying to rewrite URL's of 3rd child to be under root
virtualgadjo replied to Chris FP's topic in General Support
hi, even if i must say i find this a curious idea which sounds so much like a wordpress idea it hurts ? you'll find the working answer in deltavik post in the last thread you quote more, as a visitor, i really prefer a clear url that makes me know where i am in the website structure and avoids the need of breadcrumbs disfiguring the pages ? pw not being wp you don't have to avoid default structure url as post, portfolio and so on, you can name your pages the way you want giving your visitors a good idea of what and where they are strolling in, a better UX than a simple domain with everything not organized following (not to speak about SEO...) have a nice day -
Hello again, be careful, you may end with a fky rink like me on top of your head ? being intrigued by your issue, i've had a look at this https://processwire.com/api/ref/pages/uncache-all/ and it sounds like an explanation that's good to know (i often use pagination without having ran into the same issue as yours... so far) have a nice day bye
-
Hi, great news! ? have you looked at your template cache settings (or procache if you use it) some pages containing dynamic content, pagination, forms, and so on are better not to be cached sometimes, depending on what you cache or not the main thing is now you'll stop loosing your hair ? and my pleasure have a nice day (better now :))
-
Hi again ? wow, funny behavior you describe here!!! in this kind of situation, first thing i would check is if this $teamPlayers var doesn't appear in another place it should not and where it stores something causing this surprising thing... of course, be sure not to use any cache as it could be your enemy here ? hope you'll figure this out have a nice day
-
Hi, if you have chosen the multiple select option for the field, it acts like a native html multiple select, click on the first one, hold the shift key and click on, the last one, job done if instead of a select you've... selected the checboxes option, well, personally i would go for another toggle/checkbox or else field saying all the pages and if checked, in the template i would use the same selection as the one you've set for the reference field with a $pages->find(...) in case it helps have a nice day
-
hi, hard to answer without testing completely but i think the problem stays the same as above, you first define $teamplayer and then apply a foreach to it and then again a filter to it keeping the same var name honestly, just php thinking, pw or not, what i would do for debug purpose in your case woud be a print_r of $teamplayer just after its first setting, one more after the foreach, nbot sure it would be any difference... and, again, use a new var name for your last call, something like this $teamPlayers = $pages->find("parent.name=players, team=$team"); //first one print_r($teamPlayers); bd($monster->name.':'.$teamPlayers->count()); // There should be 24 players in my team (which is the case on first call) foreach ($teamPlayers as $p) { $result = $p->child("name=tmp")->tmpMonstersActivity->get("monster=$monster, bestTime>0"); if ($result) { $p->bestTime = $result->bestTime; } else { $p->bestTime = 0; } } //second one, not sure it will different from the first one as you don't seem to replace the value in $teamPlayers print_r($teamPlayers); // and here, what seems the most logical way to do it imho would be $teammates = $teamPlayers->filter("bestTime>0")->sort("bestTime"); // I want to return only the list of players having a best time on this monster return $teammates; // a print_r($teammates); would also be a good way to see if anything happens but honestly, without kowing exactly the page structure, i just try to guess what those $p->child are... and i must say, usually when using a foreach i first set an empty var and feed it with the first array elements including those i've modified afterwards you can play with ne new array knowing you haven't modified the base one hope it helps in terms of debugging path ? have a nice day
-
Hi, i think you should have a closer look at how pw works as i would strlongly advise you not to use aliases (slugs) in the nav as they may change nor to use templates of course have a look at a simple, very simple nav <!-- link to the home page if your website is not multilingual you can simply use <a href="/"> --> <a href="<?php echo $pages->get(1)->url; ?>"><?php echo $pages->get(1)->title; ?></a> <!-- and then a simple list of the other pages of course, you can exclude some pages ids and put the wole stuff inside an ul or whatever you want going a little further, i let you guess how to deal with sub menu, easy as soon as you've understood how it works --> <?php $pgs = $pages->get(1)->children; foreach ( $pgs as $p ): $activ = $page->id == $p->id ? ' class="active"' : ''; ?> <a href="<?php echo $p->url; ?>"<?php echo $activ; ?>><?php echo $p->title; ?></a> <?php endforeach; ?> you could also have a look at the menu modules and either use one or understand how they work to make your own https://processwire.com/modules/process-menu-builder/ or https://processwire.com/modules/markup-menu/ they offer different way of building menu and can be a good starting point for your own hope it helps have a nice day
- 1 reply
-
- 1
-
-
sorry too big fingers... let's resume ? there you assign a value to $teamPlayers when afterwards you apply a method to this var, well, you apply a method but don't store the result of this method in a var which is exactly what you eventually do with your $teamMates = $teamPlayers->find("bestTime>0")->sort("bestTime"); return $teamMates; there you apply a method on $teamPlayers and store the result in $teamMates ? hope it helps have a nice day
-
Hi, actually, this is not a pw filter problem but a php one, well, not a problem, just a syntax rule when in your first line you write $teamPlayers = $pages->find("parent.name=players, team=$team");
-
CKEditor - How to Wrap the text in Source View
virtualgadjo replied to McAdam's topic in General Support
Hi, i may be wrong but the image you show doesn't look at all like PW CKeditor even when i add a lot of plugins and/or functionnalities... (not the case here but adding font-size, colors, background-colors, and so on doesn't change the display except for some more buttons ? ) and, by default, the text is wrapped inside the source view, at least when using the pw default sourcedialog extension checked, what i alwasy do are you sure you're using the default pw ckeditor? have a nice day -
? there are so many coming with PW... i nearly always use this one ablility to add default attributes to external links as clients tend to forget those good SEO practices and, thanks to this module, they always act as pros ? Coming to this attributes thing, this night i had an idea when having to deal with modale videos using a library needing attributes instead of a simple class The solution may be to create a repeater field, each element containing an image (screenshot for example), the video url and... a field using your FiledtypeRuntimeMarkup module displaying the HannaCode to be used in ckeditor i have done this kind of trick for images carrousels that a client may use wherever she wanted in a content and she appeared to like it and used it a lot ? Thanks a lot for coming and brainstroming with me + for this module i like to couple with HannaCode as for many people, writing a simple snippet of code is a bit freaky when copying/pasting sounds like a daily usage ? have a nice day