-
Posts
313 -
Joined
-
Last visited
-
Days Won
4
Everything posted by virtualgadjo
-
How to insert a <div> in tinyMCE? [SOLVED no!] [now really SOLVED]
virtualgadjo replied to zota's topic in General Support
Hi @Mats i had been fighting for a while with this too and ended wrting my own solution to keep some hair on my head ? and my pleasure of course have a nice day -
hi, in this case you have many options... - simply unable ACF and Html purifier, good practice if you rely on the person whomanage the website (you? :)) more risky if you don't - use the extra allowed content your field... field tab) with things like blockquote2[[attributes]{styles}(classes) blockquote3[[attributes]{styles}(classes) - or even adding a ckeditor config.js file adding or overwriting native rules but honestly, more useful when using special plugins or if you neede to implement special dropdown menus something i often did in ck editor area ? but the previous solutions are a bit more simple have a nice day
-
Display image as SVG – "Failed to open stream"
virtualgadjo replied to lenoir's topic in General Support
hi, sorry, as it was not said in your first post i assumed you were simply trying to access the svg as an simple image file in the case your httpUrl stays the simplest way despite the get request except from putting the svg code in a textarea field, not very client friendly i must agree ? have a nice day -
Display image as SVG – "Failed to open stream"
virtualgadjo replied to lenoir's topic in General Support
hoi, would be happy to see but just aword to say that i use a lot of svg and src="<?= ...->url" ;?>" works fine if you just want to display it as an img <img src="<?= $page->topimg->url; ?>" alt="" /> the flag you may know ? is an svg in a simple image field sure it would too to force download for example have a nice day -
Display image as SVG – "Failed to open stream"
virtualgadjo replied to lenoir's topic in General Support
hi, first of all, just check if you have allowed svg files in your file or image field if yes, i would strongly suggest you install this module https://processwire.com/modules/file-validator-svg-sanitizer/ as svg being code made files they can be a bit dangerous the second thing is the way you 'echo' the img is your $content the 'as' of a 'foreach', that's to say an element of your repeater and not the repeater itself well, let's assume it's the cas as in the contrary you should have written something like $page->content instead, but you can't access a repeater element field directly by the repeatr itself so, have you tried something like foreach($page->your_repeater as $content) { echo '<img src="' . $content->images->eq(0)->url . '" alt="" />' . "\n"; } // or, if content is the name of the repeater foreach($page->content as $c) { echo '<img src="' . $c->images->eq(0)->url . '" alt="" />' . "\n"; } well, the names should be yours of course ? have a nice day -
Unable to access Admin Area on Testing Server
virtualgadjo replied to KG60's topic in General Support
glad to "hear" you've found the origin of the issue ? you may have been alerted, trying to see a page other than the homepage on the front side but you would just have seen it didn't work not knowing exactly why, sometimes the simplest and more "brutal" test helps as pw install warns you if there is anything it needs and doesn't find during the process : good luck with cwp and my pleasure of course ? have a nice day -
Unable to access Admin Area on Testing Server
virtualgadjo replied to KG60's topic in General Support
hi @KG60 well php 7.4 you're in cotton ? and yes, if you try a fuul pw install directly on the server and everything goes well, you will be able to compare those two files the other things may also be the various php "extensions" that are installed locally as if you're are completly managing the online server using webmin, as you say, it's a little touchy and needs some learning curve pw is not very needy in terms of requirements https://processwire.com/docs/start/install/new/#requirements but if you've installed some modules they may have their self requirements too have a nice day and enquiry ? -
Unable to access Admin Area on Testing Server
virtualgadjo replied to KG60's topic in General Support
hi @KG60 well, i don't think the problem is coming from whether the main website is a splash page or not reading your posts i see a few usual first questions - the server; url rewriting working or not, if the pw website works, it does and so should do the htaccess - this famous httphost line in the config (without protocol but i'm sure you know) - the database, well if the website works with its right content, should be good too - the user you use to log in, have you creates guset users or any kind of users other than you as the super user and aren't you loging with one of them wsth some kind of maintenance mode on you see, all those kind of silly first questions we ask ourselves with the normal what have i done wrong ? honestly when going online with a pw website that works locally, the only things to check are - have i put all the needed files on the server (ftp, ssh or whatever you use) - have i set the right -- database credentials -- and httphosts in the config file - and if needed have i changed (usually uncomment) the right things in the htaccess file, www or not, ssl or not but if the website itself works, all this should be ok you could also check the php version, between 5.6 (not a good idea :)) and say 8/8.1 (depending on the pw version you're with) for pw but depending on potential modules you've installed, 7.x and above may be needed when stuck like this, if i could, one thing i would do is to add another subdomain and to create a separate database and then try to install a fresh blank pw to see if everything works, if not, you'll soon know why, if yes, sorry, you may have forgotten something somewhere ? have a nice day -
Unable to access Admin Area on Testing Server
virtualgadjo replied to KG60's topic in General Support
hi, you don't need the ip address, i even tend to think it's not a good idea... ? the problem seems to be your ddb as it's not really usual to have database servers hosts opened to external request actually, i often do what you're describing but with the domain name alive with a splash page saying coming soon ? ( or the former version) and the future website in a subdomain this way, no nedd to change the bdd credentials when the website is ready you just have to change the domain path into the "real" website and change that httphosts line in the config file, job done well, you can, while working with the preprod version add a meta robot noindex in the head you'll remove once online as you never know wether the master of the world, aka google ? will find the preprod version or not and then reference it which is obviously not what you want... but honestly this way you can work with you dev version, even give a client the admin credentials, and when going live with this simply changing the domain path in your hoster panel, no need to change anything about the ddb this of course if your dev server is the same as the future live one Gideon was faster the i ? have a nice day -
Unable to access Admin Area on Testing Server
virtualgadjo replied to KG60's topic in General Support
hi, there may be various reasons for this, the first i tend to think about is have you changed this line in the config.php file $config->httpHosts = array('localurl.test'); to fill the quotes with the domain (or sub...) your website is on online ? have a nice day -
hi, maybe adding something like this in the custom json (if you're using blockquote2 and 3 as tags { "extended_valid_elements": "blockquote2[id|class|style],blockquote3[id|class|style]" } even if seems honestly curious as blocquote class="xxx" sounds a little bit more html friendly ? have a nice day
-
@Didjee nice idea to keep in mind ?
-
hi @Didjee glad to hear you've found your solution and a good way to get a page sorting by template ? now i just wonder why $pages->find("title|headline|search_index~*={$query} as if you've included title and headline in the template search_index, it's twice the search but well, maybe it helps ordering as you wanted too, first the result in the title, then the headline and so on i've done many weird things with this search engine but not tried this one, yet... ? have a nice day
-
Hi @Didjee of couse this is possible ? once you've get the results $results = $pages->find('search_index%=' . $q . ', limit=25'); what you do with it is totally up to you, you could for example use two foreach(es) like the one Teppo shows foreach ($results as $result) { echo "<li><a href='{$result->url}'>{$result->title}</a></li>"; } and submit, inside the foreach, the fact that in the first one the request is contained in the title and then in the second one if the request is not (as if it is part of the results, it is somewhere else in the fields you've set as indexable) have a nice day
-
hi, honestly, i think you shouldn't have moved anything... nor shouldn't ask pw to do eveything ? the simpler way to do this would have been in you cpanel to change the domain path and having it aim at the folder in which you had your pw installed only thing to do, important one actually, in your config.php file, search the line that looks like $config->httpHosts = array('www.domain-name.com/processwire-master'); and change it to $config->httpHosts = array('www.domain-name.com'); if your don't, things will work on the front side but you'll have bad surprises if you try a previex from the admin same thing when you have a domain and a preprod subdomain, you don't have to move anything to set the preprod to be the live domain, instead you just change the domain path and this line in the config have a nice day
-
Hi, a little more compréhensive answer sent by mail, you'll, it's pw, nothing will be broken ? have a nice day
-
Hi, before we tackle with your 10 000 questions ?, in the situation you descibe i would the simplest way to do what you say would be to give all languages a name (the slug) that's to say fr for french, en for english and so on and have the domain aim at yourdomain.com/fr by default coming to the admin, nothing simplest than using the french language pask for the frenc language (no kidding :D) and then go in your user parameters and choose french as its language, the admin will be in french when logging with this user even if not the default one i personally don't use the multilanguage profile, always use the blank one but i'm sure it's well set as every thing in pw ? and yes, what a foot as you say ? and most of all, same as for the clients who love it when coming from shrink customer suppliers like drupal, joomla or even wordpress and discovering how simple it can be to manage a website, even a complex one... have a nice day
-
Hi @Webjack sorry, not here yesterday... i think you're not taking advantage of pw multilanguage abilities, processwire is language agnostic and let you do whatever you want i assume you are making a website with several languages and want the back-end tio be in french, the best way to do this is to consiider french as your default language and add the other ones, included english as other languages, this way your site will be youdomain.com for french and youdomain.com/en/ youdomain.com /de/ youdomain.com/fi/ for the other languages just for fun, let's imagine a simple situation, you want to make a website with only french as the front end and back end language, you will not add french as a new language but just, put your content in french and translate the admin in french for the one and only language you're using, french it's exactly the same thing here except that once this is done, you can add other languages (i've made websites in 7 an 9 languages with pw and the client didn't believe how simple they were to manage when they suddenly wanted to add another language ? ) coming to the back-end, just add the french translation files to your french default language, it will be the default language of the admin and of the users for whom the language is defined as default now, let's imagine you'll have different users for the admin, you can set their language chosing among those you've created and for each of those languages just use the language pack to have their interface translated, no need of course for english as without a language pack it will use pw native "wording" and now, about these front-end translations, of course, pw doesn't translate anything for you but, if you have fully installed all the multi language things pw proposes when installing the language support module, you can, for nearly every field chose a mono or a multi language version, in that last case, the fields will come with tabs that let you enter the content for each language cherry, i know, now people say icing but i'm an old guy..., ?, on top of the cake, pw lets you choose if you want or not to use the default one content for the other ones when not filled well, i stop this 1km long post here but if you want some help in french don't hesitate to write me an email using my pseudo @gmail.com and we will discuss all this in french and even, why not, use a share screen thing to show you some tricks that may help you save some time and liters of sweat ? hope it will help have a nice day
-
Hi; i think what you're speaking about is the _main.php file in which we usually put what's common i nearly all the pages, html head, in the head yes you'll find the metas, the og, analytics or matomo for me ? the css links, sometimes a few js vars you want to have everywhere then comes the header (can be different from the homepage and the others using either s simple php if $page->id == 1 or taking advantage of pw markup regions (this is true for other parts you may need in some pages and not for all of them, markup regions are really a killing the game stuff ? ) the nav, search engine, etc to the bottom of course, the footer, the script href and so on and in the middle, the div with an id which will be filled by pages (home page included) content working like this allows you for any new website to have a ready to go working environment changing very few things, name of the css, js files, add or remove those you do or don't use i usually also use the _init.php to store things i always need and sometimes my ready.php file for some hooks but this is maybe a little outside your question ? have a nice day
-
? $pages is a very useful var but it may be sometimes tricky particularly when dealing with multilingual websites (4 out of five websites in my case being a froggy... ? ) i always use this module https://processwire.com/modules/page-list-show-page-id/ as dealing with page ids allows us to make really short an efficient requests with $pages->get, pw taking care of the language of the object you retreive have a nice day
-
hi @Smirftsch my pleasure ? have a nice day
-
hi, have you tried $pages->get(1) instead of get->('/')? 1 being the id of the homepage, if the problem stays the same it more a case of where that nav is placed in your templates structure have a nice day
-
Hi, you'll probably find this a little funny but now i'm trying to reproduce your fieldtype abilities but saving data to the database to make it "indexxable" by teppo great search engine as it will allow me to get datas from any database i need even an external one and save it as a field content with or without formatting thanks again for this great module i porbably play a bit too much with ? have a nice day
-
Hi, having just ran into a funny issue trying to upload a zip in a files field (after my customer couldn't do it several tries later) i think, as there is an extract zip option, a do not validate zip content or, but a bit more complicated and not really necessary, what kind of content to validate, option would avoid this kind of issue as i explain in the forum post, it was just images with not really great name (diacritics, uppercase extensions), and i'm sure our customers are not all very aware of this kind of problem on a linux server and it's not really an issue as long as the zip is not unzipped server side but just offered to be downloaded as it is (typical case, a press kit) just in case ? have a nice day
-
- 1
-