Зеленый хостинг ТЭИА


LTCBTC - Bitfinex



Syndicate content My RSS Feed
My RSS Feed
Updated: 51 weeks 6 days ago

How do you render a Node's Last Saved date in a Region Footer (ie, inside a Block on every page)?

Thu, 07/26/2018 - 10:57

I'm new to Drupal (8) and have no PHP experience, but I've managed to get this interesting CMS doing just about everything I need by playing with Twigs.

I cannot for the life of me figure out how to get a Page's "Last Saved" date to render in the footer block though.

In the Node twig I can add this, and it works perfectly:

{{ node.changed.value|date("d/m/Y H:i") }}

But in the region--footer.html.twig (which is an included block at the base of every page on the site, and where I wish to render this information) all I get back, from every combination I try, is the current date/time of when the page loads in the browser. Actually, i think it is the current server time.

Obviously there's something I just don't get about how Drupal works!

Can anyone offer a newbie some help in language I might understand?

Cheers, mrEdge

Categories: World News

How do I deploy a local site?

Thu, 07/26/2018 - 10:57

I've been getting mixed messages and there is practically no solid up-to-date documentation, I just want to know the standard procedure for moving a locally developed Drupal 8 site to an online server.

Some say it's as easy as FTP'ing your files over and exporting your local database SQL code over and then connecting to the db via the settings.php, others say to put a fresh installation of Drupal 8 online and then move certain files over while exporting the database using the backup module and then importing it online, others still say I also need to export the local configuration and import it online, still others say I need to update the URL's in some parts of the SQL or configuration exports, etc.

I'm developing with the latest Drupal 8.4 with a custom theme in Windows 10 on XAMPP (I have drush) and migrating to a server subdirectory that my domain points to with php 5.6+ (no drush options online because there's no SSH access).

TLDR: What are the steps to move a locally developed Drupal 8.4 site and database to an online server and get it configured, up and running normally?

Categories: World News

Can someone help me sort out where the code I need to change for this donation button is?

Thu, 07/26/2018 - 10:46

I'm working on this site: [Cameron Can](www.cameron-can.com). There's a Donate button in two areas on the site (homepage and Give Today page under Get Involved). The organization is changing how they receive donations, so both of those buttons need to be changed - I swapped out the one on the [Give Today](www.cameron-can.com/give-today/) page without any issues, but when I go into the homepage, the code for that button isn't there, and I'm not sure where I need to change that in order to correct that button. Does anyone have ideas?


submitted by /u/GinaC123
[visit reddit] [comments]
Categories: World News

I want to play music with button clicked and open new window together. but its not working

Thu, 07/26/2018 - 10:46

I want to play a music on button clicked and open new window together. please help me to solve it.

here my work done. -----

<body> <style="background-image: url(40007-happiestbday.html)"/> <div class="container"> <div class="main-greeting"> <div align="center html2canvas-ignore"> <div style="font-size: 17px; font-weight: 800; color: yellow;"> <p id="demo"></p> <div class="main\_body"> <div class="vi" style="text-align: center;"> <img src="Snow\_falling1.gif" class="swing1" alt="diwali" style="width: 100%; height:100px;"> <h3>Wishing You</h3> <h2>Merry Christmas</h2> <audio> <id ="myAudio"> <source src="https://firebasestorage.googleapis.com/v0/b/myapplication-3167b.appspot.com/o/hpbd.mp3?alt=media&token=88b03e37-cae7-48aa-95c9-817f8c9959c5" type="audio/ogg"> <source src="https://firebasestorage.googleapis.com/v0/b/myapplication-3167b.appspot.com/o/hpbd.mp3?alt=media&token=88b03e37-cae7-48aa-95c9-817f8c9959c5" type="audio/mpeg"> </audio> <button onclick="playAudio(); openWin()" type="button">Play Audio</button> <script> var x = document.getElementById("myAudio"); function playAudio() { [x.play](https://x.play)(); } function openWin() { [window.open](https://window.open)("mno.html"); } </script> <h2> <img src="merry\_christmas\_2018.gif" class="img-responsive" alt="NEW YEAR" > </h2> </div> </div> <p aling="center" style="font-size: 15px;color:white;"><b></p> Merry Christmas my friend!</br> Now let's party!<br></p></b></p> <img src="15.png" height="40px" width="40px"/> <div class="busi"><p style="text-transform: uppercase;"> <br><img src="4.png" height="35px" width="35px"/></p> </body>

Here I only give you <body> conten If its right then i have done mistake other place.

submitted by /u/CynonianRaj123
[visit reddit] [comments]
Categories: World News

Adorable Tiny Electric Car Inspired By The 1950s Comes In Eight Fun Colors

Thu, 07/26/2018 - 09:02
[Click here to view the video in this article]

Yesterday, you saw the sexy all-electric hypercar that might give Porsche’s stunning, first-ever all-electric automobile a run for its money.

While those speed demons vie it out, a compact sustainable car is arriving in Europe.

Say hello to the ‘Microlino’, a tiny electric car with an aesthetic inspired by the adorable 1956 BMW ‘Isetta’, shown directly below.

The 1957 BMW Isetta 300 - smart family car pic.twitter.com/OMvqdGGeAB

— Sport & Casino History (@CDCHistory) January 24, 2018

Measuring a mere 2.4 meters (8 feet) long, the two-seater city car doesn’t have any distinct hood. Unlike conventional cars, both driver and passenger can access and exit the interior through its single front door.

As for rejuicing, the ‘Microlino’ can be plugged into any mainstream domestic power socket and refueled within four hours. For faster recharging, use a Type 2 connector that will get you back on the roads within one hour.

It comes with the two battery options 8 kWh or 14.4 kWh that cover a range of 120km and 215km respectively. Acceleration from zero to 50km/h is five seconds, with maximum speed reaching 90km/h.

To add, ‘Microlino’ comes in eight fun colors that will display your personality on the road. This includes ‘Zurich Blue’, ‘Milano Red’, ‘Amsterdam Orange’, ‘Paris Mint’, ‘Barcelona Brown’, ‘London Grey’, ‘Gotham Black’, and ‘Vienna White’.

‘Microlino’ will begin production in December 2018, and is slated to hit roads in Germany by 2019. While pricing hasn’t been confirmed, it’s anticipated to cost approximately €12,000 (US$14,000).

[via Microlino]
Categories: World News

What programs are now standard for web design/development?

Thu, 07/26/2018 - 08:28

I have a background in graphic design/UI/UX (familiar with Adobe products) and it’s been about 10 years since I taught myself some basic html/css. I will be getting back into it by taking classes at a local uni for html/css/jquery/java in over the next year or two.

I am most familiar with Dreamweaver from back then and have used Sublime a little bit more recently but I’ve been told Dreamweaver is dying out as the program for web. Is there something new becoming sort of “industry standard” worth investing in?

I really like the ability Dw had to split screen between live/code, and how it’ll live update a web version without saving. I also like how clearly Sublime colour codes the various tags, and simplifies the coding process, etc.

Thanks for the tips!

submitted by /u/GD08
[visit reddit] [comments]
Categories: World News

Failure often paves the way for success

Thu, 07/26/2018 - 07:22

Success and failure are not polar opposites: you often need to endure failure to enjoy success. In Google's 2004 Founders' IPO Letter, Larry Page wrote:

We will not shy away from high-risk, high-reward projects because of short term earnings pressure. Some of our past bets have gone extraordinarily well, and others have not. Because we recognize the pursuit of such projects as the key to our long term success, we will continue to seek them out. For example, we would fund projects that have a 10% chance of earning a billion dollars over the long term. Do not be surprised if we place smaller bets in areas that seem very speculative or even strange when compared to our current businesses. Although we cannot quantify the specific level of risk we will undertake, as the ratio of reward to risk increases, we will accept projects further outside our current businesses, especially when the initial investment is small relative to the level of investment in our current businesses.

Think big and fail well — fail fast, fail often, and learn from your mistakes.

Categories: World News

Must-Read Books On Freelancing For Designers &amp; Digital Creatives

Thu, 07/26/2018 - 07:21

It takes years of hard work to create a freelance lifestyle. But it’s also one of the most rewarding choices for digital designers who want more control over their schedule. Unfortunately freelancing is not just about designing. It involves managing your clients, your finances, and your time. It’s certainly not for everyone but it does […]

The post Must-Read Books On Freelancing For Designers & Digital Creatives appeared first on Vandelay Design.

Categories: World News

Introducing: Tattly Balloons

Thu, 07/26/2018 - 07:21

Team Tattly launched balloons yesterday! YAY! So many Feelings! Can you RESIST?

Categories: World News

How to get the label value for list field?

Thu, 07/26/2018 - 06:59

I'm trying to fetch the label of the list and display it on the twig template.

Using node.filter_list.value outputs the key value. I tried using node.filter_list.label but it returns empty. I tried using node.filter_list.title, node.filter_list.0.label or node.filter_list[0]['#markup'] but it still returns empty on the twig template

Categories: World News

Using views reference field, how do you output the items from inside the block?

Thu, 07/26/2018 - 06:59

I'm currently trying to explore embedding or display content using Views Reference Field Module to my twig template. I know I can just add or embed the views using {{ drupal_view('machine_name', 'block_1') }} to my twig template. But I want user to have the flexibility to add or change views without writing code. I can't seem to find any documentation on how to output a reference view to my twig template

Categories: World News

How to clear cache for config entity after making changes?

Thu, 07/26/2018 - 06:59

We have a custom form mymoduleForm that has mymodule.settings which stores some values that we need to run some logic when calling mymodule_preprocess_node() hook.

We can store the values in a Config entity as expected (see below). When we make changes to the Config entity, we want to clear cache for the config entity as well. How can we clear the Config Entity's Cache after making changes?


  • When there are updates to the Config entity, clear the cache for the entity so that the latest entity is used in mymodule_preprocess_node hook.


  • When we make changes to the Config entity using the custom form, the logic that we need to run is not running with the latest settings.

What we have tried:

  1. Tried adding addCacheableDependency($form, $config); to the buildForm(), but it is not working.


public function buildForm(array $form, FormStateInterface $form_state) { if (!$this->entity->isNew()) { \Drupal::service('renderer')->addCacheableDependency($form, $this->entity); } $config = $this->config('mymodule.settings'); $form['some_field'] = [ '#type' => 'textarea', '#title' => $this->t('Some field title'), '#description' => $this->t('some description'), '#default_value' => $config->get('some_field'), ]; return parent::buildForm($form, $form_state); } public function submitForm(array &$form, FormStateInterface $form_state) { $this->config('mymodule.settings'), ->set('some_field', $form_state->getValue('some_fields')) ->save(); }


function mymodule_preprocess_node(&$variables) { $config = \Drupal::config('mymodule.settings'); $config_value = $config->get('some_field'); $library = 'mymodule/some-library'; if($config_value == 'some_value') { $variables['#attached']['library'][] = $library; } }
Categories: World News

Running node creation from another url?

Thu, 07/26/2018 - 06:59

I have a node called "survey". To create one, you go to:


I want to make a new url at: /make-survey, which must show exactly what you would see at /node/add/survey

What is the easiest way to do this in Drupal 7?

Categories: World News

Easiest way to create a &quot;agree completely&quot; to &quot;dont agree at all&quot; field on a content type?

Thu, 07/26/2018 - 06:59

I have a content type called "survey". I want to add this to it:

Source: https://manual.limesurvey.org/Question_types#Multiple_choice

The only difference is, I want to change the 1,2,3,4,5 to:

  1. Agree Strongly
  2. Agree Somewhat
  3. Undecided
  4. Don't agree
  5. Disagree Strongly

The "no answer" option should probably not be there.

My survey would then have where it currently says 'FBI', something like:

Company ABC provides fantastic service.


I can do this using multiple "List Text" fields. But then it's going to be tricky to add the heading.

Can someone please advise if there is an easier way to do this?

Categories: World News

Programmatically Add Block to Panelizer Panel Display on a Specific Node

Thu, 07/26/2018 - 06:59


I have a content type called section. This content type is used to create sections on the site (e.g., Blog List). Each section typically has a menu entry and has panelizer turned on.

Panelizer has been configured to allow overriding specific node layouts/content instead of staying with the defaults.


In the hook_install of my blog module I create a section node and menu link. My blog module also comes with a view of the most five recent blogs as a block display. I want to add the blog view block to the section node I created at the beginning of the install.


I have tried https://www.drupal.org/project/panelizer/issues/2822585 with no luck. Besides this I have just tried various things on my own that have not worked.

Categories: World News

jQuery transition not run on anon page

Thu, 07/26/2018 - 06:59

I am running Drupal 8.5.5 and am running into a problem. It seems for anonymous users jQuery is not loading a library that it would when I am logged in as admin. I tried to understand why that is but I am stumped. So far I disabled js caching, I have the following in my libraries.yml:

leadership: version: 1.x css: theme: css/leadership.css: {} js: js/leadership.js: {} dependencies: - core/jquery: {}

and it loads on the page, and runs this javascript which calls:

$content.toggleClass("whole-body", 800);

In the admin, I see the transitional effect of 800 seconds, but anonymous users don't see that.

Categories: World News

Can no longer run &quot;composer require drupal/swiftmailer&quot;

Thu, 07/26/2018 - 06:59

I have a module that relies on swiftmailer, and needs the libraries installed. Whenever I've needed to install swiftmailer libraries to a Drupal environment, I've always run this command line: https://www.drupal.org/project/swiftmailer/issues/2743195#comment-11918643

This no longer seems to work. Running this now prompts me for authentication to git.drupal.org, and I don't understand why. Apparently this isn't the same as my drupal.org credentials:

I'm not extremely familiar with Composer and am wondering what I can do here.

Categories: World News

Combine multiple link fields into a single link field (unlimited)

Thu, 07/26/2018 - 06:59

In our drupal 7 site I have multiple social link fields (links) that I would like to combine into a single "social_links" link type field. How do I do that in a custom d7 to d8 migration? I've tried multiple ways with no success.

Essentially I have something like this, but I want other source link fields to be added to field_soc_link_m:

(snipped from the migration yaml file) field_soc_link_m: plugin: sub_process source: field_linkedin (I want source fields: field_twitter, field_instagram, etc added) process: uri: url title: title options: attributes


Categories: World News

can't load JavaScript using hook_page_attachments() [on hold]

Thu, 07/26/2018 - 06:59

Here my module file I did exactly what the documentation https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module say for declaring js files of a module and attaching the created library. But always can't see my module js file within the page code source. Here is my files content:
my_module.librarises.yml :

my_module.lib: version: VERSION js: js/my-module.js: {} dependencies: - core/jquery - core/drupalSettings - core/drupal


/** * Implements hook_page_attachments(). */ function my_module_page_attachments(array &$page) { $page['#attached']['library'][] = 'my_module/my_module.lib'; }

my-module.js (in my_module/js directory):

(function ($, Drupal) { $(document).ready(function() { console.log('Loaded...'); }); })(jQuery, Drupal);

In code source I can see "my_module/my_module.lib":

{"path": ..., {"libraries":.., "my_module/my_module.lib",..

But can't get the file js.

SOLVED: it was a typing error while naming libraries.yml: my_module.libraries.yml instead of my_module.librarises.yml

Categories: World News

Просто хороший хостинг