-
Posts
4,077 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
If I followed correct, you have a well running local site? You plain copied it to the online space? (Without running an installer before?) Maybe you can try to export your local site with the SiteProfileExporter Module, and then do a fresh installation online. But be aware, that all created roles & users & accessrights get not exported with the SiteProfileExporter Module. This you have to implement manually after installation. The advantage is that you don't have to deal with all the different caches and also get notifications during the installation routine if something with the online space is missing.
-
Here is some code I used which is working fine: https://github.com/horst-n/LocalAudioFiles/blob/master/site-default/templates/local-audio-files_stream.php#L34-L45 https://github.com/horst-n/LocalAudioFiles/blob/master/site-default/templates/local-audio-files_stream.php#L264
-
Programmatic manual sorting of page reference pages
horst replied to Martin Muzatko's topic in General Support
If you are searching for programatically save your own programatical defined sort order, you may find useful code snippets here: Interesting for you are the function(calls) of databaseUpdateSortInPages Also reading the few discussion posts may be of interest. -
Use the fields import / export functionality and respective the same for templates. Go to admin fields and click export, then select all the fields you need. Go to admin templates and click export, then select the template(s) you need. Edit: Additionally you may use the API: https://processwire.com/api/ref/templates/get-export-data/ https://processwire.com/api/ref/templates/set-import-data/
-
Wiremail problem with charset and german umlauts
horst replied to Juergen's topic in General Support
@Autofahrn, have you tried out one of the WireMail-ThirdPartyModules? -
If you really need to *write* html code, and not to copy / paste some pieces, I second the use of the ACE-editor:
-
You can add suffixes to image variations. If you want to do it with Pia, you need to add, for example, suffix=lowres, or suffix=hires to the selctor string. If you want to add suffix names to image variations without Pia, pass an options array to the width, height or size methods as (optional) last argument. Within the array set the key suffix to your desired name.
-
In some cases it is much work to do, for the own business (not related to web business, only) and for building websites. But building or adapting websites for clients to become gdpr compliant is nice, as you now can acquire some extra paid work. ? In the near future, we have to build new sites gdpr compliant from start up. In regard of only trust the lawyers, I have mixed feelings. Sure you can find some usefull infos on eRecht24, but they also claim without warranty. ? And the free generators are very basic. I got me a premium account there, and found some more in depth information. But I think it is important to get the hands dirty by walking through a lot of texts and finding out what is important for one self.
-
I really like them and uses them since the first minute. Mostly in the functions style. That's how my _init.php looks like <?php namespace ProcessWire; $homepage = $pages->get('id=1'); $kontakt = $pages->get("template=cfg")->kontaktdaten; // der Seiteninhalt: region('header+', ''); // fixed header region('nav+', ''); // ist im header region('hero+', ''); // heroimage region('main+', ''); // bodycontent region('footer+', ''); // footer // alle JS codes die innerhalb document.ready am body ende ausgeführt werden sollen, // nachdem jQuery u. main.js schon geladen sind: region('JSdocReady+', ""); // DebugAusgaben am Ende der Seite region('debug+', ''); If you wonder why I initially define the regions with a + (plus sign), it's because sometimes one may end up with a site that do multiple calls of template render functions on one page, what results in multiple includes of _init.php in the chain. This is to avoid an override of previous values. Of course one of the rare use cases, but not impossible.
-
Modyfikacja por roku i odziezy najwyzszej jakosci
horst replied to james smith's topic in General Support
Also it maybe an improvement from the other side, to serve your users some filter-lists (dropdown selects) of the products, additionally to the fulltext search field? Here you can see an example with architects in an archive, (realized with url-segements), that only serves all matching archive albums. (could be also only products) Whereas the fulltext search serves also matches in the blog or on pages with matches in different bodytext parts. The fulltext uses %= operator, that also allows to match small text snippets like BRT. (And yes, uses the pipe as OR selector!) -
looks like spam!
-
I really like that PC Buster serves different options! Until now, I use in my own scripts the ?{$fileTimestamp}, but have read about a versioning with .htaccess mod_rewrite here: https://stackoverflow.com/questions/118884/how-to-force-browser-to-reload-cached-css-js-files mod_rewrite on EVERY request and even page reloads for (how many files?) is a lot, whereas if it can get handled safely by the client browsers, it seems to be better for me. I'm interested in getting more information about which option may or may not work in which situation.
-
@gebeer, there was a change in Session-DB-Handler in the past, but don't remember exactly when. Maybe you compare the current 3.x Module against the 2.7.x one?
-
Get current langauge in init.php or init method of module
horst replied to Zeka's topic in General Support
whats about detecting it and set it to a session var in site/finished.php and afterwards looking for it in site/init.php? PS: it would need extra attention if a language change url was currently clicked. -
[SOLVED] Best way to search a site including hidden child pages
horst replied to Juergen's topic in General Support
Yep, that's with the overhead is right, but only on the first view. If you have many fields and reference fields on one page (template), your searches may become time costy in the DB. At that point you want to use concatenated fields (also available as core module!). So it depends on the amount of your involved fields (=DB-tables) which way to go. EDIT: The core module is called Cache, it is a fieldtype: -
[SOLVED] Best way to search a site including hidden child pages
horst replied to Juergen's topic in General Support
Maybe a bit dirty but very effective: add a hidden (or none manually editable) textarea field to your main page and on save of the main page or one of the children, collect all text there in. Then you need to search in this field instead of the (main)-body field. -
What is the server setting for uploads? What output is in the JS-console when your upload freezes? Do you have any log entries for images in PW? $config->debug = true?
-
My personal preference is not to update the .htaccess file automatic. If something breaks, the complete site may become unrenderable. Also warning mechanism may not get invoked then(!). Additionally I only allow read access to the file for security reasons. So my favourite would be to collect candidates and provide them as alphabetically sorted markup on demand
- 30 replies
-
- 2
-
- antispiders
- anticrawler
-
(and 2 more)
Tagged with:
-
I use Redirect gone ... in .htaccess Redirect gone /wp-login.php for all that stuff. (First I log 404s for a period, than I add those candidates to the .htaccess, before ProcessWires entries!!) I think it is better to not invoke PW for this stuff, (lesser overhead on the server!), instead use apache custom error page(s). 47ms is fast! PS: 410 is better than 404, as I also use this for SearchEngineRequests that try to reach URLs that do not exist since 10 years or so. Normally the SEs should flush their cache on 410 returns.
- 30 replies
-
- 3
-
- antispiders
- anticrawler
-
(and 2 more)
Tagged with:
-
Ajax - Send raw template only, without _main.php
horst replied to Jim Bailie's topic in General Support
To enable this, depending on your PW-Version, you may need to set the $config var useFunctionsAPI to true: $config->useFunctionsAPI = true; // pages()->find(), sanitizer()->pageName(), region('content', $markup), Links: https://processwire.com/blog/posts/processwire-3.0.40-core-updates/ https://processwire.com/blog/posts/processwire-3.0.39-core-updates/#new-functions-api https://processwire.com/blog/posts/processwire-3.0.39-core-updates/#new-region-function PS: To easily find things on the PW site, you may use g**gles search like this: site:processwire.com $config->useFunctionsAPI -
Ajax - Send raw template only, without _main.php
horst replied to Jim Bailie's topic in General Support
That's ProcessWire! A series of ways to reach your goal. Pick your favourite: Do you like uphill climbing, go there. Do you like to stroll, go here. Another way would be to put a snippet like this into the top of your _main.php: <?php namespace ProcessWire; if('ajax' == $page->template || $config->ajax) { echo region('main'); return; } -
can you show a full url of an image please?
-
Noob - Quickest way to create a site like the demo?
horst replied to ComputerKid's topic in Getting Started
Hi, there should also be a site profile in the directory called "blue vr" or alike. This is inspiring too. -
Ajax - Send raw template only, without _main.php
horst replied to Jim Bailie's topic in General Support
You can create a separate template for the ajax page (a single page URL, that is called for all ajax requests) and check both to be disabled, prepend and append files in the template settings. Under templates / files: deactivate auto prepend of _main.php