Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


dil_bert last won the day on June 12

dil_bert had the most liked content!

Community Reputation

5 Neutral

About dil_bert

  • Rank
    Prolific Member

Profile Information

  • Interests
    used OpenSuse for more than 10 years - now stick to Mx-Linux; Interested in all raspi-things, Python, Perl, PHP and GIS,

Recent Profile Visitors

5,569 profile views
  1. hi many thanks for the quick reply. well - with rss i can see (from remote) what is going on with a. my thread or some sub-forums the one and only factor is - a "internet" factor - being far away - but close -(through RSS) - anyway - thanks for the reply. greetings
  2. hello dear php-experts hello dear all, i am in the mid of the planing stages of a new projectpage where i want to adress several audiences in southern europe. therefore i want to use polylang (and Max-Mega-Menu): i want to run the page where i have pages with information assets and sets see below: topic 1 topic 2 topic 3 topic 4 topic 5 topic 6 those six topics i want to publish on pages - in two languages: a. english b. german besides this i want to publish a summary of the topics 1 to 6 - (see below) note: my preliminary tests of polylang are very very convincing and i like the plugin very much. But i have recognized that if i have set up the sysstem for let us say 8 languages then: every posting /every page has to contain text (data) in order to get the article (the post or page in my use-case) published. question: - is this true - !? - can i arrange the texts in the way that i have shown in the image below!? look forward to hear from you ps -above all: keep up the great forum here - it rocks!!! i love PHPFreaks!!! 😊 +-----------------+ +-----------------+ +----------------+ +-----------------+ +------------------+ +-------------------+ +-------------------+ +---------------------------+ | | | | | | | | | | | | | | | | | topic 1 | | topic 2 | | topic 3 | | topic 4 | | topic 5 | | topic 6 | | English | | Texts that covers | | | | | | | | | | | | | | German | | topic 1-6 (summary): | | | | | | | | | | | | | | | | | +-----------------+ +-----------------+ +----------------+ +-----------------+ +------------------+ +-------------------+ | | | french | | | | spanish | | | | italian | | | | greek | | | | hebrew | | | | turkish | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +-------------------+ | | | | | | | | | | | | | | | | | | | | | | +---------------------------+
  3. hello dear all, can i rssify the postings here that i post on this board!? is this possible!?
  4. hello dear experts, good day, at the early planning stage of a new project i muse bout the mailing-options. in other words - we work on a pragmatic way to setup SMTP settings programmatically with the wp_mail function? - without any need of a SMTP-Plugin. i think about the easiest way to setup SMTP settings programmatically with the wp_mail function? Well to be frank - i think i can live witout a special SMTP plugin - at least i can try out to work with the native options and functions that are on board of WP. The question is: can i figure out to configure a solution that runs as - let us say "best practice" by using the wp_mail function. at a first glance - if we have a peek on the implementation of wp_mail function, we will see that this function uses PHPMailer class to send emails. Also we could notice that there is hard coded function call $phpmailer->IsMail();, This setup sets to use PHP's mail() function. That said - we see that with this settings we can't use SMTP settings with it. If we want to - then we have to call isSMTP function of PHPMailer-class. Furthermore - we need to set our SMTP settings as well. To achieve it we need to get access to $phpmailer variable. And here its it where the phpmailer_init comes into play. The action which is called before sending an email. So we can do what we need by writing our action handler: The action handler goes like so: add_action( 'phpmailer_init', 'wpse949800099999170_phpmailer_init' ); function wpse9498170_phpmailer_init( PHPMailer $phpmailer ) { $phpmailer->Host = 'your.smtp.server.here'; $phpmailer->Port = 25; // could be different $phpmailer->Username = 'our_username@example.com'; // if required $phpmailer->Password = 'ourpassword'; // if required $phpmailer->SMTPAuth = true; // if required // $phpmailer->SMTPSecure = 'ssl'; // enable if required, 'tls' is another possible value $phpmailer->IsSMTP(); } SMTP Exceptions: in default WordPress doesn't give us any debug output. Instead it just returns FALSE if an error occurred. Well - what can we do to fix this. above all - i am very happy to be here in this great community 😉
  5. hello dear freaks, One of the most common security questions i came over the last few months was the question of moving wp-config.php one directory higher than the vhost's document root. Well - since i am currently working on the setup of several vhosts and web-pages i think bout these things. I 'm assuming it's to minimize the risk of a malicious or infected script within the webroot from reading the database password of my wordpress-installation. one solution could be to expand open_basedir to include the directory above the document root. Doesn't that just defeat the entire purpose, and also potentially expose server logs, backups, etc to any attackers that comes along the way? Or is the technique only trying to prevent a situation where wp-config.php would be shown as plain-text to anyone requesting http://example.com/wp-config.php, instead of being parsed by the PHP Server engine? That seems like a very rare occurance, and it wouldn't outweigh the downsides of exposing logs/backups/etc to HTTP requests. Well maybe it's possible to move it outside the document root in some hosting setups without exposing other files, but not in other than this setups? Well - since i am currently working on the setup of several vhosts and web-pages i think bout these things. some ideas and possible answers have emerged that I think should be considered the authoritative ones. a real-world example could be like so: With wp-config.php in the web root, a request to /wp-config.php would have downloaded the WordPress configuration file to the attacker. With wp-config.php outside the web root, a request to /wp-config.php downloaded a completely harmless file. So the hacker would be not harmful. The real wp-config.php file could not be downloaded. Well that would be very fine. Well - i guess that moving wp-config.php outside the web root has some cool security-benefits What do you think!?
  6. hello dear freaks probably the Apache-supforum fits most here - for this setup-question. I'm currently working on a setup of a server to host multiple websites on a single IP. Note: i am on openSuse and Webmin. configurations and setup: i have installed Webmin on an OpenSuse-server. I created the directory /var/www/sites/my_testsite. Then I created a virtual host under Webmin->Servers->Apache Webserver with the following settings: Address: Any Port: 80 Document Root: /var/www/sites/my_testsite Server Name: my_testsite.com Address: Any Port: 80 Document Root: /var/www/sites/my_testsite Server Name: my_testsite.com Then, to test it, I edited the hosts file on my local machine and added [my.server.ip.address] my_testsite.com. Then went to my_testsite.com in my browser and encountered a issue: the problem i encountered: the browser is loading the default site (at /var/www) instead of the virtual one I just have been creating (I verfied this by adding different index.html files in /var/www and /var/www/sites/my_testsite). Well i muse what goes wrong here at the moment: I have written down the directives and all the config-things: Here are the directives webmin created in /etc/apache2/sites-available/webmin.1372499999999888777656578.conf DocumentRoot /var/www/sites/my_testsite <Directory "/var/www/sites/my_testsite"> allow from all Options +Indexes </Directory> ServerName my_testsite.com ServerAlias www.my_testsite.com an update: i fixed this by adding directive ServerAlias domain.tld *.domain.tld i found this at the setup under Apache -> the Virtual Domain settings -> Networking and Addresses -> Alternate virtual server names FIELD. domain.tld *.domain.tld question: - is it very important to add server name initially and then webmin virtual host edit/delete, - i can imagine that if i do so, it does not updated the directive and subsequently the Server Name will be missing in it - so the question is: do i need to add the Server name and then Restarting apache in order to make it work? Servers -> Apache Webserver: Select your virtual Server -> Edit Directives and subsequently: Server Name: my_testsite.com Others -> Command Shell service apache2 restart i then opened the web address in browser. besides this: is it thinkable that the mixing with 'Any' with a specific port doesn't play nicely for some reason. so the question here is: should i try to run with the vhost settings to: Address: Any Port: Any Document Root: /var/www/sites/my_testsite Server Name: my_testsite.com and do not choose or select a specific port!? on a side note, should i do the setting of my sites to not allow directory indexing? look forward to hear from you yours dil_bert
  7. good day dear experts, the issue of today: Semantic and non-semantic-url on wordpress: how to run semantic URLs? One of the most useful features of the WordPress platform is certainly the one allowing you to customize the Permalinks for each of our posts or pages on our wordpress-page. As the many of us surely know, the default settings of this feature can be set via the Settings > Permalinks tab in the Admin Panel: the procedure: go to the top of that, and then see each specific Permalink can also be reviewed and customized in the Edit Post page. Before going further, however, it may be useful to briefly summarize what these definitions actually mean. the term of semantic URLs (whats in it) There are two main powerful and featurerich characteristics that help and make a so called Semantic URLs better than any other technique: a. their readability and their consistency with respect to the content of any page they’re addressing to. b. The most obvious advantage of a semantic URL over any other piece of URL is that anyone, regardless of the reader skills, will be able to understand the page subject and main topic, the page-visitor gets a brief overview by watching the URL - he (we can say) gets a level of visibility on the web and indexing - even if he watches at search engines. above i tried t o briefly summarize what permalinks and semantic URLs are, a. how to to set them properly on our WordPress installation’s settings. b. In order to do this we need to access to the Admin Panel and then navigate to Settings > Permalinks. Here’s a good example of a Semantic URL Permalink: https://www.foobar-page.com/en/os-x-yosemite-vmware-improve-performance/ 1 http://www.foobar-page.com/?post=203333344556654393939345953939 well - this is a very common example of a non-semantic URL Permalink: so the question is: how to create a semantic URL composed of words that reflect the content of the text and the article - this is a very important feature for our SEO site. the customization-question is: how to enable semantic URLs on WordPress i have a approach and a (lets say; theoretical ) understanding of what is a semantic-URL in WordPress - but at the moment i do not know how to set it up in Backend!? Look forward to any and all help
  8. good day dear friends, question: which is the correct way to use Wordpress Multisite With Different Domain Names - without a plugin? i plan to work with WordPress multisite, but I want to be able to use my own names. Well this can be done with wordpress-plugins - but i want to try to setup all - without the usage of a plugi! question: So what is the correct way to map bare domains without www to a multisite install? Are plugins required? Should this all be handled in web server config using rewrites in the .htaccess? here some musings to set up the tactics: For example my main site is called bar.com. If I want to add a new site to my multisite network it's gonna be called foo.bar.com. I want it to be newsite.com without example. Is there a way to achieve this? the main question is this: how to write the .htaccess-file for that above mentioned approach? I heard about domain mapping with a plugin, but I dont know if this is relevant to this question. If it is relevant I would like to know what exactly this is i suppose Multi-site wasn't intended to be used for TLD' So first of all, i do a install of WordPress, then i arrange the setup of multisite, and configure it as a subdomain network configuration. Here's a sample configuration for the wp-config.php file in the base directory of the WordPress installation: /* Multisite */ define( 'WP_ALLOW_MULTISITE', true ); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); define( 'DOMAIN_CURRENT_SITE', 'www.primary-domain.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 );` my tactic is like the following: guess that i need: - one Apache Virtual Host for the primary domain in the network and that i have to configure that virtual host with alias domains. - Each alias domain being one of the additional sites in the network. However - there is more: how do i end up tweaking the setup, - do i need each domain's DNS to resolve to the same web server, and - each domain to be pointed to the same directory the primary domain is installed with WordPress. Each domain in the network needs to point to the same web server with DNS records and share the same directory path for the files used by WordPress. configured and setup properly as discussed above. the wordpress-adminstration-part in the WP-backend: there is a WordPress administration area where i have to continue the configuration: - Network administration area to add a new site into the network. - When i go to add a site, it will enforce me to add the website as if it were a sub domain under our primary domain. - Once the site has been added to the list of sites in the network. - i can edit that specific site - eg putting the actual domain name for this TLD site. but how to write the .htaccess-file for that above mentioned approach? i need to add a basic configuration for the .htaccess file as a subdomain configuration in the base directory of the WordPress installation; look forward to hear form you
  9. good evening dear php-freaks, hope you are all right. i am currently working on a parser that gets data via OSM Overpass API with PHP-SimpleXML. I am workin with the pretty new to the work with PHPSimpleXML so do not bear with me for askin newby questions. I am tryin to get data using Open Street Maps. I want to write a code that works with the endpoint of openstreetmap - and the given data is the starting point for further explorations. My tactic is as follows: I fetch data from the openstreetmap-endpoint 1. i run requests to the openstreetmap-endpoint- (see below) and i try three different APIs per request isn't that easy on ressources and 2. I don't know how to work with the results that i gather from the OpenStreetmap-Endpoint as of the first point: - workin on the endpoint of OSM-Overpass-API.... see my approach: <?php /** * OSM Overpass API with PHP SimpleXML / XPath * * PHP Version: 5.4 - Can be back-ported to 5.3 by using 5.3 Array-Syntax (not PHP 5.4's square brackets) */ // // 1.) Query an OSM Overpass API Endpoint // $query = 'node ["amenity"~".*"] (38.415938460513274,16.06338500976562,39.52205163048525,17.51220703125); out;'; $context = stream_context_create(['http' => [ 'method' => 'POST', 'header' => ['Content-Type: application/x-www-form-urlencoded'], 'content' => 'data=' . urlencode($query), ]]); # please do not stress this service, this example is for demonstration purposes only. $endpoint = 'http://overpass-api.de/api/interpreter'; libxml_set_streams_context($context); $start = microtime(true); $result = simplexml_load_file($endpoint); printf("Query returned %2\$d node(s) and took %1\$.5f seconds.\n\n", microtime(true) - $start, count($result->node)); // // 2.) Work with the XML Result // so far so good: with this i get a bunch of data..... I have data in a file retrieved from a API pull request at the openstreetmap data source that looks something like this: <?xml version="1.0" encoding="UTF-8"?> <osm version="0.6" generator="Osmosis SNAPSHOT-r26564" xapi:planetDate="2014-10-07T15:42:02Z" xmlns:xapi="http://jxapi.openstreetmap.org/"> <node id="251652819" version="6" timestamp="2013-10-19T14:03:10Z" uid="1198089" user="GeorgeKaplan" changeset="18434238" lat="48.8527413" lon="2.3333559"> <tag k="dispensing" v="yes"/> <tag k="website" v="http://www.pharmacie-paris-citypharma.fr/"/> <tag k="name" v="Pharmacie Citypharma in downtown paris"/> <tag k="amenity" v="pharmacy"/> </node> <node id="251774849" version="9" timestamp="2014-07-28T21:28:26Z" uid="92075" user="Art Penteur" changeset="24411346" lat="48.8468043" lon="2.3696423"> <tag k="phone" v="0143430996"/> <tag k="dispensing" v="yes"/> <tag k="name" v="Pharmacie de la Rapée in downtown paris"/> <tag k="amenity" v="pharmacy"/> <tag k="opening_hours" v="Mo-Fr 08:30-20:30; Sa 09:00-19:30"/> </node> <node id="263262912" version="3" timestamp="2014-07-28T21:37:24Z" uid="92075" user="Art Penteur" changeset="24411346" lat="48.8446917" lon="2.3101829"> <tag k="dispensing" v="yes"/> <tag k="amenity" v="pharmacy"/> </node> and so forth and so forth ....etc. what is aimed: I am trying to filter the records based on the attributes that i find in the dataset, basically i am trying to retrieve the records that do not have a <tag k="name" v="blahblahblah"/> field. I have been looking around and the classical way to do it its easy, however because of my poor skills in doing anything xml related i do have a couple of questions: Is it possible to apply xml filtering for tags that look like this <tag k="dispensing" v="yes"/> ones that do not have the <tag></tag> .....format. Also how can i filter the records when each child of the node has different attributes,like v, i would knew how to do it if it would look like this <tag k="name">Pharmacie in Paris-downtown - Rapée-metro-station</tag> but within this format received at this moment i cannot not see a way out on how to get the children that i need i have had a quick look at the PHP-SimpleXML and the XPath-approach: it may help me in achieving what is aimed. but at the moment - i think i got stuck. i greatly appreciated hints and some ideas that may fit her. have a great day. - yours dil_bert
  10. hi there requinix many thanks for the reply - sure thing - i have had a closer look at this. i try to clear this up. Your ideas were very convincing. i take them into consideration. greetings
  11. hello dear Barand many thanks for the reply and the sharing of ideas and insights. I am glad to be here at this place. Again - many thanks have a great day.
  12. hello dear experts I hope this is the right place for this kind of question. I’m using the Twenty Seventeen theme in WordPress (5.3) with a static front page with 4 additional sections - in short: i run the parallax-theme - with all the config-specs that are needed for this (cf. https://www.wpexplorer.com/parallax-effect-wordpress/ and https://premium.wpmudev.org/blog/twenty-seventeen-wordpress-theme/ ) my setup: On the very top part, as we scroll down, the logo, site name, and tagline scroll up over the opening image. As for the true parallax we have there’s a clear background to the logo, title, tagline group, so the background image shows through. And thats just great. As we scroll down further, the 2nd image comes into view, and it’s completely displayed when the 1st image has scrolled off the screen and the menu is now at the top. Continue scrolling and the text of the next section scrolls up, covering over the 2nd image. However, this text has a white (in my case) background and the image does NOT show through. And thats just why i am posting here. To be frank - this is the same behavior for the remaining image/text pairs. What I want to know how to do is make the background on those text sections clear, like in the topmost section. I’ve seen how their color can be changed, but not how it can be made to be transparent. How can i do some corrections here: can i work with the browser developer tools to discover what element is involved here. well - am i able to adjust the CSS on the fly to see what changes achieve the desired result. How to apply the CSS changes to the style sheet or to custom CSS: .site-content-contain { background-color: transparent; } i have heard about a so called <strong>css @media screen breakpoint </strong> of 20rem for all smaller screens: this css @media screen breakpoint causes the two column content blocks to collapse into single columns. Furthermore that breakpoint also deactivates a bit of css which gives the parallax effect. But i do not want to loose the parallax-effect. question: can i ensure the effect by copying the portion of css (see below) into either outside of an @media break block or in a custom css file. note: for reference, the <strong>css to get the parallax-effect </strong>back is: .background-fixed .panel-image { background-attachment: fixed; } can i work with the above mentioned code to get the parallax-effect back and to ensure that the i have this effect constantly on my page? note: i am following the parallax-documentation here: https://www.wpexplorer.com/parallax-effect-wordpress/ love to hear from you best regards say
  13. hello dear Freaks - good day. i am just in the early planning stages of a new proejct - a project that will be created wordpress and a theme called twentyseventeen - and the Max-Mega-Menu Note: this ideas that i discuss here - might sound like a hackish idea - and probably many of you think that they are very very unusual. So i want to discuss all the ideas with you - in order to make up my mind and to go a safe way and finally to avoid risks. question: can i do this project like i described it. i want to add the Max Mega Menu plugin into my theme for a new project. What i've done so far is the following: a.copy and paste plugin folder into my theme (the twentyseventeen) b.include megamenu.php file into my theme function.php file Needed to work: what do i need to do - what is still on the shedule: a. include with theme b. active when theme active c. So, how can I include this plugin and activate it when my theme is activated? so the question is: can i include a plugin in my theme by calling it from my functions.php. pitfalls and cons: - Also, we shouldn't move parts of the plugin directly to the theme, - It might be looking for a file that isn't there and throw an error. reasons that support this idea: conclusio: So, the right way to do this is have the complete plugin in a subdirectory of our theme and call it only after we have checked whether it hasn't already be loaded so far. With this i can try to avoid running into issues rooted by the integration of the plugin directly into the theme. This can be done by checking the existence of a certain function or class that we know is available in the plugin. add_action('after_setup_theme', 'wpse237683_load_plugin'); function wpse237683_load_plugin() { if (!class_exists('wpse3333237683')) { include_once (get_template_directory() . 'plugins/wpse3333237683/wpse3333237683.php'); } } note: to include a plugin directly inside a theme - will cause fatal errors - due to some rejecton of either Wordpress and the theme itself. we can use TGMPA for including plugins with themes: http://tgmpluginactivation.com/ btw we can make use of a PHP library like TGMPA that will help here: http://tgmpluginactivation.com/ Further reading: http://code.tutsplus.com/tutorials/using-the-tgm-plugin-activation-library-in-your-themes--cms-20901 Using TGMPA means the plugin remains a plugin, WordPress loads it in the normal 'plugin' way, and users will get plugin updates as they're released. Note: this ideas that i discuss here - might sound like a hackish idea - and probably many of you think that they are very very unusual. So i want to discuss all the ideas with you - in order to make up my mind and to go a safe way and finally to avoid risks. question: can i do this project like i described it.
  14. hello dear experts, Running PolyLang in a special Use-Case: a page-only setting the topic of the day: How to run PolyLang the wordpress-translation for a special use case - my use-case: i only want to have PolyLand in the pages: The use case: in my use case: Pages describe the project. Therfore the pages are important to me. I’m using polylang for translating pages - and i am very happy with it. Posts, i do not want to translate. on my page - the Posts should stay be single language - englisch. the question is: is this behaviour doable - can i configure wordpress and polylang so that. What is aimed: the sytem should show when I publish posts without translating. is this doable!? question: do i still need a post in each language. Is this necessary? solution 1: so in the case of the posts: the solution can be to copy the post 1:1 to all reffered languages, so in fact Polylang gets the post (with different ID) in all the requested languages but with the same content. or even better: the solution 2 So no way to ignore translating posts. “ignore translating posts”? How do you expect Polylang should ignore posts? this is my use case what may help me - we can turn off translations for posts with a hook: function turn_blogposts_translation_off( $post_types, $is_settings ) { unset( $post_types['post'] ); return $post_types; } add_filter( 'pll_get_post_types', 'turn_blogposts_translation_off', furthermore we can with Polylang deactivate the translations for the Categories and Tags of Post. Turn Off Translations for Category function turn_categoryblog_translation_off( $taxonomies, $is_settings ) { unset( $taxonomies['category'] ); return $taxonomies; } add_filter( 'pll_get_taxonomies', 'turn_categoryblog_translation_off', 10, 2 ); Turn Off translations for tag and the turn-off of even more... see here: function turn_tagblog_translation_off( $taxonomies, $is_settings ) { unset( $taxonomies['post_tag'] ); return $taxonomies; } add_filter( 'pll_get_taxonomies', 'turn_tagblog_translation_of well - i will try out the code to get the aimed goals done and do achieve all the things i need to achive on the site.
  15. hello again - well i also have discussed the issue with the limesurvey-user here: https://www.limesurvey.org/forum/installation-a-update-issues/119649-err_empty_response-after-it-worked-very-well-for-weeks/191580 after having mused bout the errors and the possible reasons - after having mused bout porting over the installation on subomains or a side to side installation i suddenly saw that the site is coming back... note: i guess that the errors ERR_EMPTY_RESPONSE - is rooted in a very very weak server - just that easy - is this possible - is this thinkable!? Holch - one user of the limesurvey - he has got the very same installation - structure as i have. the user holch: : in this thread you answer very interestingly : https://www.limesurvey.org/forum/installation-a-update-issues/119649-err_empty_response-after-it-worked-very-well-for-weeks at the moment it goes very well - in other words i have no issues at the moment: Holch - is it thinkable that this error is rooted in a very slow server!? I have to admit that this seerver is very very old and will be replaced very soon (in a few weeks) you have mentioned that you have installed limesurvey in (exactly) the same way as i did. you also have mentioned that you did not have encountered any of the issues as i have encountered. is this true!? furthermore; i have googled this error - guess that it is this one:
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.