Jump to content

dil_bert

Members
  • Posts

    939
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by dil_bert

  1. first of all i will loook into all that. I will try to digg deeper. afaik -as far as i understand your postings then i should use another way of upload the images -not as a backgroud image. the interseting finding: the addtional css in the theme-customizer is not working - in other words. no change in the comands of the additonal css has any effect - it looks in some way like i have the very same behavior like the other authors ..here: https://stackoverflow.com/questions/14644138/custom-css-in-wordpress-not-working#comment20460334_14644138 Additional CSS not working? https://wordpress.org/support/topic/additional-css-not-working/ well this is my current additional css... .wrap { max-width: 1366px; } .wrap { max-width: 1366px; } @media screen and (min-width: 1168px) { .entry-header, .entry-content { float: left; } .entry-header { margin-right: 5%; width: 35%; } .entry-content { width: 85%; } } .search_keywords { font-size: 16px; font-family: serif; } .search_location { font-size: 16px; font-family: serif; } .search_category { font-size: 16px; font-family: serif; } .navigation-top .wrap { max-width: 96%; text-align: center;} .navigation-top [class*="menu-primary"] { text-align: center; display: inline-block;} /*For Content*/ .has-sidebar:no(.error404) #primary { width: 60% /*For Sidebar*/ .has-sidebar #secondary { width: 30% } /*Responsive*/ @media(max-width:768px) { /*For Content*/ .has-sidebar:(.error404) #primary { width: 100% } /*For Sidebar*/ .has-sidebar #secondary { width: 100% } } /* STRUCTURE */ .wrap { max-width: 80% !important; } .page.page-one-column:not(.twentyseventeen-front-page) #primary { max-width: 100% !important; } @media screen and (min-width: 48em) { .wrap { max-width: 80% !important; } } @media screen and (min-width: 30em) { .page-one-column .panel-content .wrap { max-width: 80% !important; } } @media screen and (max-width: 350px) { .wrap { max-width: 95% !important; } } @media screen and (min-width: 48em) { .background-fixed .panel-image { background-attachment: initial; } } .custom-header-media { height: 6vh; } @media screen and (min-width: 48em) { .panel-image { height: 460px; }} .postid-256 .single-featured-image-header img { /* display: block; */ /* margin: auto; */ height: 45vh; object-fit: cover; } .postid-258 .single-featured-image-header img { } @media screen and (min-width: 48em) { .postid-258 .panel-image-prop { padding: 12px; height:33px; object-fit: cover; }} @media screen and (min-width: 48em){ .background-fixed .panel-image {background-attachment: scroll !important;} .panel-image {height: auto !important; max-height: 800px; background-size: contain !important;} }
  2. hello and good evening, today i have a issue on the wp-theme twentyseventeen: Flip of size in Featured-Image: the size in the desktop view is too big - on mobile (responsive) okay i have found out that there is a flip - if we watch the site on a mobile phone - then the images look tiny - the proportions are neat and nice. see the awesome comparison i have made in chrome.. see the flip of the both pictures.. enter image description here btw: see the site: https://www.job-starter.com see the flip of the size of the image. My idea on the images was the following: can just not make them parallax by adjusting the styles. They seem to work ok in the mobile width because it turns them into non-fixed images. Using that thinking, i could add this to the “Additional CSS” (at the bottom): @media screen and (min-width: 48em){ .background-fixed .panel-image {background-attachment: scroll !important;} .panel-image {height: auto !important; max-height: 800px; background-size: contain !important;} } That should fix the images on the page. but it did not. Note: i run the twentyseventeen - theme with a two column option. any idea? see the site: https://www.job-starter.com Any ideas!? look forward to hear from you
  3. hi there - good day dear Barand - dear Requinix and all php-friends, found a solution - this i want to share with you... cf https://stackoverflow.com/questions/51990613/getting-a-list-of-all-plugins There is a plugin API which we can query for plugins like this: $api = plugins_api( 'query_plugins', $args ); developer.wordpress.org/reference/functions/plugins_api – we can make use of plugins_api('hot_tags'), array('page' => 90000000000, 'number' => 90000000000). It returns some plugins but not all. we can go this way: $api = plugins_api( 'query_plugins', [ 'per_page' => - Because getting all plugins at once will be too heavy for the server, it is a better idea to do it in steps we could do as many plugins at once as the server can handle. For the example I use a safe 100 plugins at once. Everytime the script runs, it increments the "page" number with 1. So the next time the script runs the next 100 plugins are retrieved. The contents of the existing plugins.json will be parsed. The new plugins will be added (or overwritten if the plugin already is present) to the existing data, before encoding and saving it again. If the page number is past the last, no results will be returned. This way the script knows there are no more plugins next. It then resets the page to 1, so it starts over. we can use the wp_options table to keep track of the pages, simply because it's the quickest way. It would be better to use some kind of filesystem caching. That will be easier to reset manually if needed.we can set a cronjob to execute the script every x minutes. Now the plugins.json file will build up and grow step by step, every time it runs. // get the current "page", or if the option not exists, set page to 1. $page = get_option( 'plugins_page' ) ? (int)get_option( 'plugins_page' ) : 1; // get the plugin objects $plugins = plugins_api( 'query_plugins', [ 'per_page' => 100, 'page' => $page, 'fields' => [ //......... ] ] ); // increment the page, or when no results, reset to 1. update_option( 'plugins_page', count( $plugins ) > 0 ? ++ $page : 1 ); // build up the data array $newData = []; foreach ( $plugins as $plugin ) { foreach ( $plugin as $key => $p ) { if ( $p->name != null ) { $newData[ $p->name ] = [ 'slug' => $p->slug ]; } } } // get plugin data already in file. // The last argument (true) is important. It makes json objects into // associative arrays so they can be merged with array_merge. $existingData = json_decode( file_get_contents( 'plugins.json' ), true ); // merge existing data with new data $pluginData = array_merge( $existingData, $newData ); file_put_contents( 'plugins.json', json_encode( $pluginData ) ); Getting a list of plugins: This will not return ALL plugins but it will return the top rated ones: $plugins = plugins_api('query_plugins', array( 'per_page' => 100, 'browse' => 'top-rated', 'fields' => array( 'short_description' => false, 'description' => false, 'sections' => false, 'tested' => false, 'requires' => false, 'rating' => false, 'ratings' => false, 'downloaded' => false, 'downloadlink' => false, 'last_updated' => false, 'added' => false, 'tags' => false, 'compatibility' => false, 'homepage' => false, 'versions' => false, 'donate_link' => false, 'reviews' => false, 'banners' => false, 'icons' => false, 'active_installs' => false, 'group' => false, 'contributors' => false ))); we can save the data as JSON Since the data that we get is huge and it will be bad for performance, we can try to get the name and the slug out of the array and then we write it in a JSON file: $plugins_json = '{' . PHP_EOL; // Get only the name and the slug foreach ($plugins as $plugin) { foreach ($plugin as $key => $p) { if ($p->name != null) { // Let's beautify the JSON $plugins_json .= ' "'. $p->name . '": {' . PHP_EOL; $plugins_json .= ' "slug": "' . $p->slug . '"' . PHP_EOL; end($plugin); $plugins_json .= ($key !== key($plugin)) ? ' },' . PHP_EOL : ' }' . PHP_EOL; } } } $plugins_json .= '}'; file_put_contents('plugins.json', $plugins_json); Now we have a slim JSON file with only the data that we need. To keep updating the JSON file, we run that script to create a JSON file every 24 hours by setting up a Cron Job. just wanted to share this with you have a great day...
  4. after some more investigations i think that i am on the right path., The API is the proper way to get the metadata. However it seems to be not very fast. For 50 calls it might take 1-2 min. I have the feeling that WP intentionally makes this call slow to discourage others from mining the plugin information. But anyway - i like this option very much. others too: see what i have found https://wordpress.stackexchange.com/questions/345095/using-custom-code-how-can-i-fetch-data-from-the-wordpress-plugin-repo/345361#345361 Using custom code, how can I fetch data from the WordPress plugin repo? $args = [ 'slug' => 'woocommerce', 'fields' => [ 'sections' => false, // excludes all readme sections 'reviews' => false, // excludes all reviews ], ]; my project; I'd like to retrieve only the title of the page and https://wordpress.org/plugins/wp job-manager https://wordpress.org/plugins/ninja-forms a little chunk of information (a bit of text) The project: for a list of meta-data of popular wordpress-plugins (cf. https://de.wordpress.org/plugins/browse/popular/ and gathering the first 50 URLs - that are 50 plugins which are of interest! The challenge is: i want to fetch meta-data of all the existing plugins. What i subsequently want to filter out after the fetch is - those plugins that have the newest timestamp - that are updated (most) recently. It is all aobut acutality... https://wordpress.org/plugins/wp-job-manager https://wordpress.org/plugins/ninja-forms https://wordpress.org/plugins/participants-database ....and so on and so forth. see the source: https://wordpress.org/plugins/wp-job-manager/ we have the following set of meta-data for each wordpress-plugin: Version: 1.9.5.12 installations: 10,000+ WordPress Version: 5.0 or higher Tested up to: 5.4 PHP Version: 5.6 or higher Tags 3 Tags: database member sign-up form volunteer Last updated: 19 hours ago plugin-ratings but as i saw today: there we have a api that can be used for this purpose too: cf: https://developer.wordpress.org/reference/functions/plugins_api/ The API is the proper way to get the metadata. However it is not very fast. but anyway - i will go this way.
  5. hello and good day first of all:; i hope youre all right and everything goes well at your site;: Worpress-Plugin API - giving back the meta-data according the usage of different filters I'm currently working on a parser to make a small preview on the newest plugins in wordpress. at the moment i think i work from a URL given out of the range of these: https://de.wordpress.org/plugins/browse/popular/ - let us say the first 30 to 40 URL-pages. I'd like to retrieve only the title of the page and https://wordpress.org/plugins/wp-job-manager and https://wordpress.org/plugins/ninja-forms and - let us say the most popular wp-plugins: a little chunk of information (a bit of text) The project: for a list of meta-data of popular wordpress-plugins (cf. https://de.wordpress.org/plugins/browse/popular/ and gathering the first 50 URLs - that are 50 plugins which are of interest! The challenge is: i want to fetch meta-data of all the existing plugins. What i subsequently want to filter out after the fetch is - those plugins that have the newest timestamp - that are updated (most) recently. It is all aobut acutality... https://wordpress.org/plugins/wp-job-manager https://wordpress.org/plugins/ninja-forms https://wordpress.org/plugins/participants-database ....and so on and so forth. see the source: https://wordpress.org/plugins/wp-job-manager/ we have the following set of meta-data for each wordpress-plugin: Version: 1.9.5.12 installations: 10,000+ WordPress Version: 5.0 or higher Tested up to: 5.4 PHP Version: 5.6 or higher Tags 3 Tags: database member sign-up form volunteer Last updated: 19 hours ago plugin-ratings but as i saw today: there we have a api that can be used for this purpose too: the Wordpress-Plugins-API cf: https://developer.wordpress.org/reference/functions/plugins_api/ Browse: Home / Reference / Functions / plugins_api() plugins_api( string $action, array|object $args = array() ) Retrieves plugin installer pages from the WordPress.org Plugins API. Description #Description It is possible for a plugin to override the Plugin API result with three filters. Assume this is for plugins, which can extend on the Plugin Info to offer more choices. This is very powerful and must be used with care when overriding the filters. The first filter, ‘plugins_api_args’, is for the args and gives the action as the second parameter. The hook for ‘plugins_api_args’ must ensure that an object is returned. The second filter, ‘plugins_api’, allows a plugin to override the WordPress.org Plugin Installation API entirely. If $action is ‘query_plugins’ or ‘plugin_information’, an object MUST be passed. If $action is ‘hot_tags’ or ‘hot_categories’, an array MUST be passed. Finally, the third filter, ‘plugins_api_result’, makes it possible to filter the response object or array, depending on the $action type. Supported arguments per action (object|array|WP_Error) Response object or array on success, WP_Error on failure. See the function reference article for more information on the make-up of possible return values depending on the value of $action. +--------------------+---------------+--------------------+----------+----------------+ | | | | | | +--------------------+---------------+--------------------+----------+----------------+ | Argument Name | query_plugins | plugin_information | hot_tags | hot_categories | | $slug | No | Yes | No | No | | $per_page | Yes | No | No | No | | $page | Yes | No | No | No | | $number | No | No | Yes | Yes | | $search | Yes | No | No | No | | $tag | Yes | No | No | No | | $author | Yes | No | No | No | | $user | Yes | No | No | No | | $browse | Yes | No | No | No | | $locale | Yes | Yes | No | No | | $installed_plugins | Yes | No | No | No | | $is_ssl | Yes | Yes | No | No | | $fields | Yes | Yes | No | No | +--------------------+---------------+--------------------+----------+----------------+ well - i guess i can use this API for the above mentioned aims too? look forward to hear from you regards dil_Bert cf: https://developer.wordpress.org/reference/functions/plugins_api/ see the reference list : $fields = array( 'active_installs' => true, // rounded int 'added' => true, // date 'author' => true, // a href html 'author_block_count' => true, // int 'author_block_rating' => true, // int 'author_profile' => true, // url 'banners' => true, // array( [low], [high] ) 'compatibility' => false, // empty array? 'contributors' => true, // array( array( [profile], [avatar], [display_name] ) 'description' => false, // string 'donate_link' => true, // url 'download_link' => true, // url 'downloaded' => false, // int // 'group' => false, // n/a 'homepage' => true, // url 'icons' => false, // array( [1x] url, [2x] url ) 'last_updated' => true, // datetime 'name' => true, // string 'num_ratings' => true, // int 'rating' => true, // int 'ratings' => true, // array( [5..0] ) 'requires' => true, // version string 'requires_php' => true, // version string // 'reviews' => false, // n/a, part of 'sections' 'screenshots' => true, // array( array( [src], ) ) 'sections' => true, // array( [description], [installation], [changelog], [reviews], ...) 'short_description' => false, // string 'slug' => true, // string 'support_threads' => true, // int 'support_threads_resolved' => true, // int 'tags' => true, // array( ) 'tested' => true, // version string 'version' => true, // version string 'versions' => true, // array( [version] url ) ); what do you say-!?
  6. hi there - good day dear experts This is the .htaccess code for permalinks in WordPress. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> we have the following ingrediences: -f and -d part means to give real directories and files higher priority. how it works: ^index\.php$ - [L] prevents requests for index.php from being rewritten, to avoid an unnecessary file system check. If the request is for index.php the directive does nothing - and stops processing rules [L]. This following block is all one single rule: this rule says that if it is not a real file and not a real directory, reroute the request to index.php. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] well - the index.php itself interprets the URL that was requested by the client-machine (since PHP can see the requested URL using $_SERVER['REQUEST_URI']) and it calls the correct code for rendering the page the user requested. and now to the issue of today: i want to do this for using to redirect HTTP to HTTPs with mydomain - what kind of htaccess do i need to run? what is wanted: i want to do this for using to redirect HTTP to HTTPs with https://www.mydomain.com and https://mydomain.com/ and http://mydomain.com - what kind of htaccess do i need to run With my current .htaccess, this is what happens: https://www.mydomain.com/ - i need this https://mydomain.com/ -i need this that subsequently redirects to the above which would be great , it should redirect to the https version: note: i all way thought that i need to have a new /(and extra vhost to do this) http://www.mydomain.com/ http://mydomain.com/ Here is the .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # BEGIN WordPress RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> again: what is wanted: i want to have a redirect that helps in each time & situation With my current .htaccess, https://www.mydomain.com/ - i need this https://mydomain.com/ -i need this that subsequently redirects to the above which would be great what is aimed: all options should load fine, it should redirect to the https version: note: i allways thought that i need to have a new /(and extra vhost to do this). but perhaps i do not need a second vhost!? Perhaps i can do it with .htaccess too!? http://www.mydomain.com/ http://mydomain.com/ can you help out here..!?
  7. hello dear Freaks parse-error with a 4 liner : unexpected syntax with a little parser-script i am getting a error <?php require 'simple_html_dom.php'; $html = file_get_html('https://wordpress.org/plugins/wp-job-manager/'); $title = $html->find ("h1", class_="plugin-title").text]; $text = $html->find(class_="entry-meta").text]; echo $title->plaintext."<br>\n"; echo $texte->text; ?> i get back the following report: PHP Parse error: syntax error, unexpected '=', expecting ')' in /workspace/Main.php on line 7 Background: for a list of meta-data of popular wordpress-plugins ( cf. https://de.wordpress.org/plugins/browse/popular/ and gathering the first 50 URLs - that are 50 plugins which are of interest! The challenge is: i want to fetch meta-data of all the existing plugins. What i subsequently want to filter out after the fetch is - those plugins that have the newest timestamp - that are updated (most) recently. It is all aobut acutality... https://wordpress.org/plugins/wp-job-manager https://wordpress.org/plugins/ninja-forms https://wordpress.org/plugins/participants-database ....and so on and so forth. the method: so to take one page into consideration - fetching the meta-data of one Wordpress-plugin: With simple_html_dom ( http://simplehtmldom.sourceforge.net/ ) i guess that there is a appropiate way and method to do this without any other external libraries/classes. So far I've also tried using generally (DOM)-DOCDocument classes http://docs.php.net/manual/en/domdocument.loadhtml.php), loading the HTML and displaying it on the screen, and now i am musing about the proper way to do it. i consider simple_html_dom ( http://simplehtmldom.sourceforge.net/ ) for this. It will make it very easy. Here is an example of how to pull the title, and the meta-text(description) see the source: https://wordpress.org/plugins/wp-job-manager/ we have the following set of meta-data for each wordpress-plugin: Version: 1.9.5.12 installations: 10,000+ WordPress Version: 5.0 or higher Tested up to: 5.4 PHP Version: 5.6 or higher Tags 3 Tags: database member sign-up form volunteer Last updated: 19 hours ago plugin-ratings Well at the moment i am trying to get the data for one plugin - if that runs well - then i want to loop over a certain amount of urls - beghinning with https://de.wordpress.org/plugins/browse/popular/ Any and all idea & help will be greatly appreciated.
  8. good day dear requinix hello dear Barand, hello and good day dear experts, Session - are they necesarily writable!? background see this thread on Limesurvey-Forum https://forums.limesurvey.org/forum/installation-a-update-issues/120432-how-to-do-a-reset-of-the-user-pass-combination#194881 is this necessarily the case - and so called "important " that the sessions are writeable!? What do you say!?
  9. good day dear Requinix, good day dear Barand, hello dear experts good day dear Community, the topic today: setting up php: on a win 10 box: issues - cannot add the environment-variables to the system during the setup of PHP on a Win-10 i run into issues - cannot add the environment variables to the system although: i should have the admin rights. but i cannot do the settings.. cf . Installing PHP 7 and Composer on Windows 10, Natively | Jeff Geerling https://www.jeffgeerling.com/blog/2018/installing-php-7-and-composer-on-windows-10 Add C:\PHP7 to your Windows system path: Open the System Control Panel. Click 'Advanced System Settings'. Click the 'Environment Variables...' button. Click on the Path row under 'System variables', and click 'Edit...' Click 'New' and add the row C:\PHP7. Click OK, then OK, then OK, and close out of the System Control Panel. Open PowerShell or another terminal emulator (I generally prefer cmder), and type in php -v to verify PHP is working. dear Requinix: do you have any Workaround!? Can i do some steps on the powershell - i have access to it. possible workdaround that come to my mind: ican try the rapid editor - the so called Rapid Environment Editor what do you think about this?! ps - on Linux this would be no problem at all.. kook forward to hear from you Have a great day
  10. hello dear experts, i am currently trying to achieve password protect a domain and all of it's subdirectories and files, but my knowledge on the matter is very limited, how can I go about doing that? i want to do this for a wordpress site - in other words:; i want to passwordprotect a site ; i guess that this is a simple two step process - In the .htaccess i think i can put AuthType Basic AuthName "restricted area" AuthUserFile /path/to/the/directory/you/are/protecting/.htpasswd require valid-user for the password generation i can use - the passwordgenerator of python or - the passwordgenerator of keepass or i also can make - use of http://www.htaccesstools.com/htpasswd-generator/ or simpliy - command line to generate password and put it in the .htpasswd Note 1: i am using winSCP or filezila to put it to the server - btw. should i do more confifguration; e.g. configure in the security section "Password Protect Directories" then propably we need to do a AllowOverride All to the directory of the .htaccess (or at least to previous ones) in http.conf followed by a apache restart <Directory /path/to/the/directory/of/htaccess> Options Indexes FollowSymLinks MultiViews AllowOverride All </Directory> note: what if i want to have this protection in a special way - so that i can - call the domain - open the passwordprotected site - and have access to the site for 2 or 3 hours - is this possible?! note - generally i have learned that i can passwordprotect a directory served by Apache via a .htaccess file in the directory we want to protect and a .htpasswd file that can be anywhere on our system that the Apache user can access (but put it somewhere sensible and private). is it a good idea to put .htpasswd in the same folder as .htaccess. The .htaccess file for the wordpress already exists: if it would not exixt i should have to create it and insert: AuthType Basic AuthName "Your authorization required message." AuthUserFile /path/to/.htpasswd require valid-user Then we should create a .htpasswd file using whatever username and password we want. And yes: The password should be encrypted. note: i am on a Linux server, - well here we can use the htpasswd command which will encrypt the password for us. Here is how that command can be used for this: htpasswd -b /path/to/password/file username password the question is: how to achive that: what if i want to have this protection in a special way - so that i can - call the domain - open the passwordprotected site - and have access to the site for 2 or 3 hours - is this possible?!
  11. hello daer all well i run MX-Linux Version 19.1 on a notebook of the following type: asus k 54 l see https://www.ass.com/Laptops/X54L/ according the install-instructions here https://docs.anaconda.com/anaconda/install/linux/ we have to do certain steps in order to install Anaconda on the system: Installing on Linux Prerequisites To use GUI packages with Linux, you will need to install the following extended dependencies for Qt: Debian apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 RedHat yum install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver ArchLinux pacman -Sy libxau libxi libxss libxtst libxcursor libxcomposite libxdamage libxfixes libxrandr libxrender mesa-libgl alsa-lib libglvnd OpenSuse/SLES zypper install libXcomposite1 libXi6 libXext6 libXau6 libX11-6 libXrandr2 libXrender1 libXss1 libXtst6 libXdamage1 libXcursor1 libxcb1 libasound2 libX11-xcb1 Mesa-libGL1 Mesa-libEGL1 Gentoo emerge x11-libs/libXau x11-libs/libxcb x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes x11-libs/libXrender x11-libs/libXi x11-libs/libXcomposite x11-libs/libXrandr x11-libs/libXcursor x11-libs/libXdamage x11-libs/libXScrnSaver x11-libs/libXtst media-libs/alsa-lib media-libs/mesa The question is - is this the only way to install the Anaconda on the MX-Linux box: note i allready downloaded the Anaconda from the webpage and followed this steps here https://problemsolvingwithpython.com/01-Orientation/01.05-Installing-Anaconda-on-Linux/ 5. Run the bash script to install Anaconda3 With the bash installer script downloaded, run the .sh script to install Anaconda3. Ensure you are in the directory where the installer script downloaded: $ ls Anaconda3-5.2.0-Linux-x86_64.sh Run the installer script with bash. $ bash Anaconda3-5.2.0-Linux-x86_64.sh but see what i have gotten (base) martin@mx:~/Downloads $ wget https://repo.continuum.io/archive/Anaconda3.sh --2020-05-08 16:31:32-- https://repo.continuum.io/archive/Anaconda3.sh Auflösen des Hostnamens repo.continuum.io (repo.continuum.io)… 2606:4700::6812:c94f, 2606:4700::6812:c84f, 104.18.201.79, ... Verbindungsaufbau zu repo.continuum.io (repo.continuum.io)|2606:4700::6812:c94f|:443 … verbunden. HTTP-Anforderung gesendet, auf Antwort wird gewartet … 301 Moved Permanently Platz: https://repo.anaconda.com/archive/Anaconda3.sh [folgend] --2020-05-08 16:31:32-- https://repo.anaconda.com/archive/Anaconda3.sh Auflösen des Hostnamens repo.anaconda.com (repo.anaconda.com)… 2606:4700::6810:8203, 2606:4700::6810:8303, 104.16.130.3, ... Verbindungsaufbau zu repo.anaconda.com (repo.anaconda.com)|2606:4700::6810:8203|:443 … verbunden. HTTP-Anforderung gesendet, auf Antwort wird gewartet … 404 Not Found 2020-05-08 16:31:32 FEHLER 404: Not Found. (base) martin@mx:~/Downloads $ https://repo.continuum.io/archive/Anaconda3<release>.sh bash: release: Datei oder Verzeichnis nicht gefunden (base) martin@mx:~/Downloads $ ls 'Anaconda3-2020.02-Linux-x86_64 (1).sh' Anaconda3-2020.02-Linux-x86_64.sh (base) martin@mx:~/Downloads $ bash Anaconda3-2020.02-Linux-x86_64 bash: Anaconda3-2020.02-Linux-x86_64: Datei oder Verzeichnis nicht gefunden (base) martin@mx:~/Downloads $ weil at the moment i try to make up my mind - where to start into the installation - perhaps i do need some more of the prerequisites
  12. hello dear Freaks i am currently musing bout the portover of a python bs4 parser to php - working with the simplehtmldom-parser / pr the DOM-selectors... (see below). The project: for a list of meta-data of wordpress-plugins: - approx 50 plugins are of interest! but the challenge is: i want to fetch meta-data of all the existing plugins. What i subsequently want to filter out after the fetch is - those plugins that have the newest timestamp - that are updated (most) recently. It is all aobut acutality... https://wordpress.org/plugins/participants-database ....and so on and so forth. https://wordpress.org/plugins/wp-job-manager https://wordpress.org/plugins/ninja-forms https://wordpress.org/plugins/participants-database ....and so on and so forth. we have the following set of meta-data for each wordpress-plugin: Version: 1.9.5.12 installations: 10,000+ WordPress Version: 5.0 or higher Tested up to: 5.4 PHP Version: 5.6 or higher Tags 3 Tags:databasemembersign-up formvolunteer Last updated: 19 hours ago the project consits of two parts: the looping-part: (which seems to be pretty straightforward). the parser-part: where i have some issues - see below. I'm trying to loop through an array of URLs and scrape the data below from a list of wordpress-plugins. See my loop below- as a base i think it is good starting point to work from the following target-url: plugins wordpress.org/plugins/browse/popular with 99 pages of content: cf ... wordpress.org/plugins/browse/popular/page/1 wordpress.org/plugins/browse/popular/page/2 wordpress.org/plugins/browse/popular/page/99 the Output of text_nodes: ['Version: 1.9.5.12', 'Active installations: 10,000+', 'Tested up to: 5.6 '] but if we want to fetch the data of all the wordpress-plugins and subesquently sort them to show the -let us say - latest 50 updated plugins. This would be a interesting task: first of all we need to fetch the urls then we fetch the information and have to sort out the newest- the newest timestamp. Ie the plugin that updated most recently List the 50 newest items - that are the 50 plugins that are updated recently .. we have the following set see here the Soup_ soup = BeautifulSoup(r.content, 'html.parser') target = [item.get_text(strip=True, separator=" ") for item in soup.find( "h3", class_="screen-reader-text").find_next("ul").findAll("li")[:8]] head = [soup.find("h1", class_="plugin-title").text] new = [x for x in target if x.startswith( ("V", "Las", "Ac", "W", "T", "P"))] return head + new with ThreadPoolExecutor(max_workers=50) as executor1: futures1 = [executor1.submit(parser, url) for url in allin] for future in futures1: print(future.result()) see the formal output background: https://stackoverflow.com/questions/61106309/fetching-multiple-urls-with-beautifulsoup-gathering-meta-data-in-wp-plugins Well - i guess that we c an do this with the simple DOM Parser - here the seclector reference. https://stackoverflow.com/questions/1390568/how-can-i-match-on-an-attribute-that-contains-a-certain-string look forward to any hint and help. have a great day
  13. Hello dear Community, i want to run a python code in a phpBB-Extension - is this possible!? see the code - this i a parser. import requests from bs4 import BeautifulSoup from concurrent.futures.thread import ThreadPoolExecutor url = "my url" def main(url, num): with requests.Session() as req: print(f"Collecting Page# {num}") r = req.get(url.format(num)) soup = BeautifulSoup(r.content, 'html.parser') link = [item.get("href") for item in soup.findAll("a", rel="bookmark")] return set(link) with ThreadPoolExecutor(max_workers=20) as executor: futures = [executor.submit(main, url, num) for num in [""]+[f"page/{x}/" for x in range(2, 50)]] allin = [] for future in futures: allin.extend(future.result()) def parser(url): with requests.Session() as req: print(f"Extracting {url}") r = req.get(url) soup = BeautifulSoup(r.content, 'html.parser') target = [item.get_text(strip=True, separator=" ") for item in soup.find( "h3", class_="screen-reader-text").find_next("ul").findAll("li")[:8]] head = [soup.find("h1", class_="plugin-title").text] new = [x for x in target if x.startswith( ("V", "Las", "Ac", "W", "T", "P"))] return head + new with ThreadPoolExecutor(max_workers=50) as executor1: futures1 = [executor1.submit(parser, url) for url in allin] for future in futures1: print(future.result()) this is the output: Notitzen-Feld: vgl. https://phpbb3.oxpus.net/dlext/details?df_id=37 News-Scroll: vgl. https://www.phpbb.com/community/viewtopic.php?t=2420771 Installation: https://www.phpbb.com/extensions/installing/ in one of the two mentioned blocks i want to run the above mentioned python code!?
  14. Hi there good day dear Requinix many tanks for the quick reply - great to hear from you. Thanks for the clearing. Thanks for sorting things here. Have a great day.
  15. hi there just wiped the whole installation - and set the new files of WP 5.4 but the page ist not visible --- not yet guest@dnstools.ch:~> ping www.mydomain.com PING www.mydomain.com (133.34.65.114) 56(84) bytes of data. --- www.mydomain.com ping statistics --- 16 packets transmitted, 0 received, 100% packet loss, time 7620ms but the info.php file with the data is visible http://www.mydomain.com/info.php
  16. hello dear experts forbidden: no permission to access site: ways, methods to get the access back :: i am looked out - and cannot access the page any more: the questioin is: how to disable theme using ftp or how to do some configurations that help me to get back again. to begin with the beginning: - running wP 5.3 - with the theme 2020 - note; the site is not active in a true sense: it was just installed several days ago. So there is not much content on it. i can do fresh install. No problem here. the conditions: and the preliminaries: server and setup - i am on a root-server which is maintained by a friend of me. - i have webmin and access to the logfiles and the apache and mysqlserver. - i have access to the backend via ftp what happened: several days ago i have been doing some minor changes in the backend - while this job i have fallen asleep (believe it or not) and the next day i get the following: Forbidden: You don't have permission to access this resource. the logfiles look like so: [Fri Apr 10 19:07:39.79231 2020] [core:error] [pid 15263] (13)Permission denied: [client 73.43.47.323:56979] AH00035: access to /favicon.ico denied (filesystem path '/sites/www.site_one.org/favicon.ico') because search permissions are missing on a component of the path, referer: http://www.site_two.org` interesting: both sites are vhosts on my server: the site one is not active - and the site two is the site i cannot access at the moment. regarding the settings: i have set the site to theme 2020 - twentytwenty. at the moment i do not have a idea what to do: can i restore the site via backend... sensu: how to disable theme using ftp https://wordpress.org/support/topic/how-to-disable-theme-using-ftp/ One of my themes, Avada, is currently causing a white screen with the message, “The site is experiencing technical difficulties” on both front and backend. If I rename the Avada folder using FTP, the message changes to “The theme directory “Avada” does not exist”. So I know it is calling the theme. How do I go about disabling the Avada theme using FTP (since backend is not accessible) and how do I activate another theme, e.g. Twentynineteen? Any help is much appreciated! Thanks, Rutger end of quote... the questions are: - can i do something via backend - that is: via ftp-backend? - renameing themes - that is switching off themes - renaming plugins - that is switching off plugins or do something else alike - or should i do a update &amp; to the newest version 5.4 note: the site does not (!) have a bunch of content - it was just in a freshly install-mode. look forward to hear from you regards
  17. hopefully this text and this question fits in this forum well - i guess and hope so since it is a question regarding websites and things alike. the topic: setting up phpBB • Compliance with GDPR : how to do the basic editing of the given text blocks after setting up a phpBB - which should have its main target audience in Europe... it is aimed to run this phpBB for a international community so the target audience is international and the language english i wonder how to treat the differend kinds and sorts of texts we have in the phpBB-overview we have the following texts: a. Privacy Acceptance Policy.-> with the texts regarding the Privacy acceptance: b. Privacy Policy -> i guess that we here can customise the board’s Privacy Policy. in other words that herein we have the DSGVO terms... c. Terms of Use Policy.->with the texts regarding erms of Use Policy. a. Privacy Acceptance Policy.-> Privacy acceptance: here we have the pre-filled version,...that looks like so: b. Privacy Policy -> i guess that we here can customise the board’s Privacy Policy. in other words that herein we have the DSGVO terms... Here you can customise the board’s Privacy Policy.: > Privacy policy: General Data Protection Regulation - 2018 (GDPR) c. Terms of Use Policy by the way - two questions arise here : where would you add the following text: [Adress name street town etc. mailadress and telephone-number:) Disclaimer Liability for contents As a service provider, we are responsible for our own content on these pages in accordance with § 7 Section 1 of the German Telemedia Act (TMG). According to §§ 8 to 10 TMG, however, we are not obliged as service providers to monitor transmitted or stored third-party information or to investigate circumstances that indicate illegal activity. Obligations to remove or block the use of information in accordance with eneral laws remain unaffected by this. However, liability in this respect is only possible from the time of knowledge of a concrete violation of the law. As soon as we become aware of such violations of the law, we will remove these contents immediately. Liability for links Our website contains links to external websites of third parties over whose content we have no influence. Therefore, we cannot take any responsibility for this external content. The respective provider or operator of the pages is always responsible for the contents of the linked pages. The linked pages were checked for possible legal infringements at the time of linking. Illegal contents were not recognizable at the time of linking. However, permanent monitoring of the content of the linked pages is unreasonable without specific indications of a violation of the law. If we become aware of any infringements, we will remove such links immediately. Copyright The content and works created by the site operators on these pages are subject to German copyright law. Duplication, editing, distribution and any kind of use outside the limits of copyright law require the written consent of the respective author or creator. Downloads and copies of this site are only permitted for private, non-commercial use. As far as the contents on this site were not created by the operator, the copyrights of third parties are respected. In particular, the contents of third parties are marked as such. Should you nevertheless become aware of a copyright infringement, please inform us accordingly. As soon as we become aware of any such infringements, we will remove such content immediately. and furtermore - by the way - where would you add the following text: - a guess: i think that we have to add this things to b. b. Privacy Policy !? see a example https://gdpr.eu/privacy-notice/?cn-reloaded=1 GDPR privacy notice template: again - the phpbb should have its main target audience in Europe... it is aimed to run this phpBB for a international community so the target audience is international and the language english i wonder how to treat the differend kinds and sorts of texts we have look forward to hear from you regards dilbert
  18. dear Gizmola, dear requinix, again me - well to second the allready said things - it is all about learning - i want to have some areas of free speech and learning - an area where we can develope ideas. and yes: the q&a structure at SO supports learing - and a scaffolding approach I am looking for ideas that support a scaffolding-approach in coding - and for the help: in the terms of a learing theory-approach. i regard the SO- Q&A-Area as a place where one could get more insights into Coding-things... - with mini-lessons - we can see this with a walk through the some oft he SO-questions that give us many many examples for these kind of - starting points for us to make the next steps... some of them - describe concepts in multiple ways...;(with the different approaches ) and some question-answer-threads - Incorporate practical steps and also aids with code and theoretical concepts - like links to the tutorials; - give novices the time to do some things with the first steps and yet... - encourage (all the novices) to go ahead with little steps; therefore offer mini-lessions... - to summarize: more or less - these things above - they are essential features of scaffolding that facilitate learning - to work with these so called scaffolds in "simple" skill acquisition or they may be dynamic and generative"; cf. the concepts of instructional scaffolding: https://en.wikipedia.org/wiki/Instructional_scaffolding (**) so plz regard the idea of "Farming" or linking (which describes it much much better) certain threads as a idea that targets and aims only one thing. Learing. As pointed out yesterday - the SO_AREA is somewhat very very rigid in terms of allowing free-speech and discussion - in Stackoverflow, comments aren't for discussion. You'll get banished to the chat. - in Stackoverflow, words like "Thanks" and "Good day" in your post are considered as noise. - in Stackoverflow we have down votes (okay and up votes - but this system does not support any discursive method of learning.. This is awful in every sence of learning... in that regard SO is terrible terrible - plz keep up this place - phpFreaks is a better place - we need to keep it open ... have a great day - and stay at home, stay safe, stay healthy,;) regards, dil_bert
  19. hello dear gizmola, hi requinix,😉 many thanks for your replies and the ideas - @requinix you posting made me smile… first of all - this idea is rooted in the impression i got by my first steps on dev.to: i saw that you can share topics / not the whole thread to dev.to - that is a great features. At the moment i do not know what happens with such content on dev.to - i did not try it out - and that said: i am a dev.to member for only one week now. btw: the options of the idea of "sharing to a phpBB: see https://www.phpbb.com/community/viewtopic.php?f=496&t=2546646&p=15466131#p15466131 David63 says: note: you can share the posts or at least the Subjects to dev.to /besides to Twitter and Facebook too and regarding he structure of SO i like the post of Zohar Peled on dev.to cf https://dev.to/peledzohar/differences-between-dev-and-stackoverflow-6o3 note: its more to be a humorous comparison rather then a real feature-to-feature list. [sorry for the bad format - but this is quote below - was not intended - and i t cannot be fixed at the moment;) [sorry for the bad format - but this is quote - it was not intended - and i t cannot be fixed at the moment;) have a great day regars dil_bert
  20. dear fellows at the php-Freaks-forum first of all: hope you are all well and all goes okay in your locality. I hope that you can cope with all the corona-issues. plz stay healthy! I would like to see a forum plugin [phpbb] that would allow the sharing of forums posts from Stackoverflow in phpBB. It gets rather annoying seeing that this is not possible in the past. so the question is - is this possible - to share posts that appear on SO or in the forum in another place. see such an option at stackoferflow: Share a link to this question (includes your user id) the question is: does the Stack Overflow API currently has a so called sharing function. If one want to migrate posts, hi had to do this in earlier times best bet is to do it by hand. Eventually the API will include sharing functions. At the moment they have such a sharing function to DEV.to, to FaceBook and Twitter. is there a timetable for the sharing option and some access on the SO-API. plz stay healthy! regards
  21. hello dear gizmola many many thanks for the quick reply. i am very glad to hear from you. I will have a closer look at this vid and will do all they advice. Again - many thanks. Keep up the great work here. It rocks. best regards dil_bert 😃
  22. hi there i have done some further investigations for the Python 2 i can do the following: apt-get install python-setuptools python-dev gcc g++ pip install wheel and supsequnently: pip install python-csv for the Python 3 i have to do the following: python3-setuptools apt-get install python3-setuptools python3-dev gcc g++ pip3 install csv
  23. dear PHP-Feaks-fellows, At the moment i am working on the setup of the Python development on the MX-Linux-System - I think it is very useful to collect all the findings in this single thread - with this procedure it can avoid to open several threads... the situation. i am on the newest version of MX - which is 19.1 so far so good: the version MX-linux version 19.1 and i have installed python 3.7.xy note: i have also pip installed - root@mx:/home/martin# pip check No broken requirements found. root@mx:/home/martin# pip check No broken requirements found. well i need to have the python csv-package. i tried out many comands sudo apt-get install python-pip sudo apt-get install python3-pandas sudo apt-get install python3-csv sudo apt-get install python-csv pip install python-csv and furthermore python -m pip install csv i used the install-manual https://docs.python.org/3/installing/index.html well i need to have the python csv-package. i tried out many comands sudo apt-get install python-pip sudo apt-get install python3-pandas sudo apt-get install python3-csv sudo apt-get install python-csv pip install python-csv and python -m pip install csv i used the install-manual https://docs.python.org/3/installing/index.html but see what i get Collecting python-csv Downloading https://files.pythonhosted.org/packages/a5/dc/7d044beccf6d10748ff5ad005441897e84265dea9aea9b39885758cc47fc/python-csv-0.0.11.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named setuptools ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-DachfY/python-csv/ root@mx:/home/martin# ^C root@mx:/home/martin# question: can you give me a hint..!? well at the moment i am a bit clueless. plz stay healthy and well - have a great day yours dil_bert
  24. dear fellows, first of all - i hope that you are all well and all goes okay since it seems to belong all to the same issue and the same thing i add this to this thread. the question today is: How can we install the Python package other than using pip?th i run Python on MX-Linux - there is root@mx:/home/martin# python3 --V unknown option --V usage: python3 [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. root@mx:/home/martin# python3 -V Python 3.7.3 root@mx:/home/martin# pip install pandas bash: pip: command not found. i have no pip on the machine: if i want to install pandas with the following command it does not work pip install pandas well i guess that i first of all need to instal pip If you do not have EasyBuild installed yet, or if you just want to install the most recent version of each of the EasyBuild packages, you can use one of the following simple commands: using easy_install (old tool, but still works): easy_install --prefix $HOME/EasyBuild easybuild Note If we already have easybuild installed, we may need to instruct easy_install to install a newer version, using --upgrade or -U. using pip (more recent and better installation tool for Python software): pip install --install-option "--prefix=$HOME/EasyBuild" easybuild The --prefix $HOME/EasyBuild part in these commands allows you to install EasyBuild without admin rights into $HOME/EasyBuild. Note For pip v8.0 and newer, pip install --prefix=$HOME/EasyBuild easybuild works too. but wait: this page tells us that pip should be no my machine: pip is already installed if you are using Python 2 >=2.7.9 or Python 3 >=3.4 downloaded from python.org or if you are working in a Virtual Environment created by virtualenv or pyvenv. Just make sure to upgrade pip. Installing with get-pip.py To install pip, securely download get-pip.py by following this link: get-pip.py. Alternatively, use curl: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py Then run the following command in the folder where you have downloaded get-pip.py: python get-pip.py Warning Be cautious if you are using a Python install that is managed by your operating system or another package manager. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state. so after all i am a bit confused: what should i do - if i want to install pandas - the questions are: - wich options do i have to install pandas without pip - besides that: am i able to install pip with a simple method without running into any troubles?!? - what should i do have to look for the preliminary steps!? - are there any stepstones or pitfalls here !? Dear Fellows - sorry for adding this also to the thread - but i guess that this is quite helpful since it belongs to the same area of scope and interest. love to hear from you
  25. hi there - well i guess that there are still some packages missing on my machine. see the next trial from bs4 import BeautifulSoup URL = "https://www.worldometers.info/coronavirus/" r = requests.get(URL) soup = BeautifulSoup(r.content, 'html5lib') countHTML = soup.find('div', attrs = {'class':'content-inner'}) for countVar in countHTML.findAll('div', attrs = {'class':'maincounter-number'}): count = countVar.span - i get back the following result: Traceback (most recent call last): File "/tmp/atom_script_tempfiles/0c9e3b30-6d27-11ea-84a4-095d4171334a", line 2, in <module> worldometers.info NameError: name 'worldometers' is not defined [Finished in 0.069s] i am on MX-Linux on Atom and i do not know why i get this back!? i guess that there is something wrong i have to digg deeper what goes on here.
×
×
  • 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.