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

Uptolike

LTCBTC - Bitfinex

Криптоновости

feedspot

Syndicate content My RSS Feed
My RSS Feed
Updated: 24 weeks 23 hours ago

25 Outstanding Websites With Video Backgrounds

Wed, 06/15/2022 - 05:36

These websites with video backgrounds provide plenty of inspiration. You'll see example of websites that make effective and creative use of video within the web design.

The post 25 Outstanding Websites With Video Backgrounds appeared first on Vandelay Design.

Categories: World News

30 of the Best Edgy Fonts for Original Designs

Wed, 06/15/2022 - 05:36

These edgy fonts are unique, original, and unconventional. If you're looking for a font that will stand out, you'll love this collection of the best edgy fonts.

The post 30 of the Best Edgy Fonts for Original Designs appeared first on Vandelay Design.

Categories: World News

21 of the Best Subtitle Fonts

Wed, 06/15/2022 - 05:36

These subtitle fonts will give you plenty of options to create effective, legible subtitles. Simplicity is key for subtitles, and these fonts excel in that area.

The post 21 of the Best Subtitle Fonts appeared first on Vandelay Design.

Categories: World News

Another win for Linux.... Way to make life easy.

Wed, 06/15/2022 - 04:11

So I had one of my best Linux moments last night.

I fucked it up. I run KUbuntu 22.04, NVidia, and an older 8th Gen Intel processor. (Not relevant, just because.)

So last night, I was playing with installing unbound/pihole on my desktop to use as a local nameserver. Nice idea right?

Didn't work out the way i wanted it to, so I went back to my actual Pi and went to uninstall pihole and it ganked my system. Blew up the network stack, Xwindows...no idea what happened, spent a few minutes tinkering but realizing it had removed packages that I would need to go back to USB (or be able to get online) for I decided not to mess with it.

So I rebuilt last night. 30 minutes from boot-from-usb to "it's up and running", apt update/upgrade, remount my /home over the existing one, reboot again and boom. Everything is back. as I installed packages like Discord, Evolution, and the stuff I use for work, everything just worked, didn't even have to re-log-into email. Thank god all my config information lives in my home directory and not in some mystical registry that is made to be obscure. (Security through obscurity I suspect)

(My /home directory lives on a second NVMe drive on the mainboard, so no matter what happens to my root drive, my docs/data is safe.)

And *THAT* is why I love Linux.

Neofetch

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

Opp: Looking for someone to take over my local-shopping plugin with ~20,000 user accounts | Endorsed by NYTimes, HuffPost, People Mag | Similar tools have just raised $3 million - $30 million in funding

Wed, 06/15/2022 - 03:10

I created a local-shopping tool for fun a little while ago and it's gotten good traction (~20,000 users accounts, ~11.5K daily users, big-name recommendations from NYTimes, HuffPost, State Farm and others), but my full-time job is expanding and leaving me no time to work on it. I had been sending sponsored and affiliate emails to our user base before I didn't have time to anymore. Similar tools in local have gotten ~$3 million to $30 million in venture capital, but that's not a space I'm very fluent in.

Most of the value comes from the community and cheap, effective funnel - if you're working in a consumer-facing startup you know that people are burning cash to get these users at $45-$125 per user account. You can see it here!

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

Animated Hamburger Icon Astra Pro Theme?

Wed, 06/15/2022 - 03:10

Hey guys. Does anyone know how to make the hamburger icon animated? I’m using Astra Pro theme in WordPress

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

Which frontend cross-platform framework is the best and easiest to learn?

Wed, 06/15/2022 - 03:10

So I build a lot of flask apps. In the past I either simply took some simple html/css templates and adapted them for my needs. So far this always worked out and I’m comfortable to write my raw html and css files.

But as soon as a project gets too big, it starts to become a pain and I need some framework that easily renders my UI objects. I am not really comfortable with JS, I am just able to write some basic JS scripts for animations and stuff.

I looked into ionic, react and flutter as they seem to be very useful for my needs as I can turn my web apps also into native apps. But I am still undecided which one to choose.

Towards the end of the year I will build another saas app that I would love to not only host as a web app but also als native apps for iOS and Android (I am not really convinced by PWA approaches yet as long as Apple do not really support them).

If you have any experience with such cross platform frameworks, which would you recommend for a beginner like me? I guess they will all integrate well with a Python flask backend / API, but are there some things I need to keep in mind? I’d be grateful for all of your insights and experiences with such frameworks. Thanks in advance!

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

How should I write website breadcrumbs for accessibility!

Wed, 06/15/2022 - 03:10

Im wondering how I write out a websites breadcrumb thread for accessibility for a screen reader?

Thank you!

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

Want to have a site designed and hosted as a gift.

Wed, 06/15/2022 - 01:14

Hello web gurus!

I have a friend whom I would like to surprise by having a page designed for her business. She's a Nutritional/Health advisor who just has a Facebook page. I have marketing experience and would love to get her setup with something more formal and marketable, something I can promote and clients can make appointments on; but I am behind the times when it comes to page design and hosting.

Looking for advice on where to start, and general estimates on cost (preferably lower cost because times are tough).

Thanks in advance!

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

How can file descriptors be misused?

Wed, 05/11/2022 - 13:08

like double closing an fd, passing an already closed fd to a function that takes an fd etc

I am trying to explore different scenarios that a static analyzer should consider while analyzing code that uses file descriptor APIs

consider the following code:

int fd = open("file", O_RDWR):

close(fd);

close(fd);

Here the static analyzer would warn that the fd is being closed twice.

Thank you.

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

Comparing 'old' values in hook_user_update

Wed, 05/11/2022 - 12:55

I've got a function which is running on hook_ENTITY_TYPE_update for the user account, but I want to be able to compare against previous values that may have been on the user account, eg see if the user has changed their email address and be able to react to it.

I can see that if I run the debug on the $entity value that is part of the function that there is an 'original' item within the values array, is that the only way to retrieve the pre-edited data?

Categories: World News

How to custom access for entity paragraphs_type?

Wed, 05/11/2022 - 12:55

I have a problem with entity paragraphs_type, when I add a paragraphs_type in a node, with paragraph items inside, and I set it unpublish status, anonymous users can still see it. I try to custom access by different way :

/** * Implements hook_ENTITY_TYPE_access(). * ENTITY_TYPE : paragraphs_type */ function my_module_paragraphs_type_access( Drupal\Core\Entity\EntityInterface $entity, $operation, \Drupal\Core\Session\AccountInterface $account ) { echo '<pre>'; var_dump('my_module_paragraphs_type_access'); var_dump($operation); var_dump($account); exit(); //Hide paragraph for anonymous users if is not published if ($operation == 'view' && !$entity->isPublished() && ($account->isAnonymous() || !$account->hasPermission('view unpublished paragraphs')) ) { return \Drupal\Core\Access\AccessResult::forbidden(); } return \Drupal\Core\Access\AccessResult::allowed(); }

It's not work, var_dump('my_module_paragraphs_type_access'); it's never executed

Or a custom class that extends ParagraphsTypeAccessControlHandler :

<?php use Drupal\Core\Access\AccessResult; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Session\AccountInterface; use Drupal\paragraphs\ParagraphsTypeAccessControlHandler; /* * Add custom paragraphs_type access */ class CustomParagraphsTypeAccessControlHandler extends ParagraphsTypeAccessControlHandler { /** * {@inheritdoc} */ protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) { switch ($operation) { case 'view unpublished paragraphs': if($account->isAnonymous()) return AccessResult::forbidden(); break; case 'view label': return AccessResult::allowedIfHasPermission($account, 'access content'); default: return parent::checkAccess($entity, $operation, $account); } } }

but still the same... Another plan to hide them to anonymous users ?

I found an this issue :https://www.drupal.org/project/paragraphs/issues/3095959#comment-13363535

Categories: World News

How can i get the fields of a view which has contextual filter inside views_view_field hook in drupal 9?

Wed, 05/11/2022 - 12:55

I have a drupal 9 site. I have a parent view A and a child view B. I am using views_field_view contrib module in order to pass an id from view A to view B. I have added a contextual filter in B to get this id from A. I want to fetch this id in my views_view_field hook and do some modifications based on the id fetched. But i am not able to get inside the view B in my views_view_field hook. If i remove the contextual filter from view B, then i am able to go inside the view in my code. But i need that id from the filter, I can't remove that because all the modifications are happening based on that id only.

Here is my code:

function mymodule_preprocess_views_view_field(&$variables){ $view = $variables['view']; if($view->storage->id() == 'B'){ //print something } }

But when i go to the path of view B, it prints nothing. Can anyone please help how to resolve this issue?

Categories: World News

Use HTTP_REFERER within a twig template

Wed, 05/11/2022 - 12:55

I have a FAQ page with five nested bootstrap 5 accordions and I need to have one accordion item or another open depending on the page the user is coming from.

I tried using this:

{% set previousURL = app.request.headers.get('referer') %}

but I get nothing.

Using Drupal 9.

Categories: World News

How to convert hook_entity_property_info_alter in Drupal 8 or 9? [duplicate]

Wed, 05/11/2022 - 12:55

I am trying to convert Drupal 7 custom module to Drupal 9. I came across the function hook_entity_property_info_alter(). How can I convert or migrate this function to Drupal 9?

Categories: World News

Why don't users with the &quot;Create new content&quot; permission for a custom bundle cannot access /node/add, but they can access /node/add/author?

Wed, 05/11/2022 - 12:55

If I give to a custom role the Article: Create new content permission, users can access the /node/add page. However, if I give the same permission for a custom bundle, for example Author: Create new content, users can't access that page, but yet can access /node/add/author.

What should I try to address the problem? I've tried to debug NodeAccessControlHandler::createAccess(), but this code doesn't show anything wrong.

$result = parent::createAccess($entity_bundle, $account, $context, TRUE)->cachePerPermissions(); return $return_as_object ? $result : $result->isAllowed();
Categories: World News

How do I check if a user has view access to a node, in a template file?

Wed, 05/11/2022 - 12:55

I'm currently working on a simple LMS in D8 and have already defined the fundamental content types. Among them is a content type called Course, which can be considered "Premium" content, i.e. all users may access those fields that contain more general information, but the users will have to buy a subscription for accessing the full content.

To make that possible without any Premium module (which, at the moment, have not been ported to Drupal 8), I created a simple grid-view and deactivated "SQL rewriting", which works perfectly, so far. For displaying the nodes in this view, I have created a new view mode, called gallery, so that the nodes that are displayed can be styled in a template.
I would like to apply different CSS styles to those nodes in the view that the user may access. I'm not sure if this can be done in the view itself.

Anyway, I'm currently thinking of checking the view permission inside node--course--gallery.html and I would like to add a class to the article tag, if access is permitted.

Unfortunately, I can't seem to find the right function for this. I set it up like this:

{% set classes = [ node.bundle|clean_class, node.isPromoted() ? 'is-promoted', node.isSticky() ? 'is-sticky', not node.isPublished() ? 'is-unpublished', view_mode ? view_mode|clean_class, user.hasPermission('view nodes') ? 'is-permitted', node.access('view') ? 'is-permitted', 'clearfix', ] %}

Neither user.hasPermission('view nodes') ? 'is-permitted' nor node.access('view') ? 'is-permitted' seem to have any effect.

Do you have any idea?

Categories: World News

What is the equivalent of hook_property_info_alter()?

Wed, 05/11/2022 - 12:55

In Drupal 7, The Entity API module uses hook_entity_property_info() and hook_entity_property_info_alter() which allowed us to add custom properties. (Not everything is a field.)

I can't find anything related to Drupal 8. The only thing I find is how to add it on a custom entity. How should I add properties to an existing entity/bundle?

Categories: World News

Use value from buildForm() in submitForm()

Wed, 05/11/2022 - 12:55

My buildForm() method queries the database and returns data which is used to calculate default values for the form. How can I use these values in submitForm() without querying the database again?

Categories: World News

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