Posts by Vitor Hugo • 379 points
33 posts
-
-1
votes1
answer30
viewsQ: How to set a fixed key for an array?
How can I set a key for an array with multiple values? The array lists all trackers (in which case there is no key defined); $trackers = array( 'udp://9.rarbg.to:2970',…
-
1
votes2
answers144
viewsQ: Foreach only works if the array is inside brackets
Something strange is happening, I’m using foreach to add values directly by the ID, only the strange and the function only works if the array is inside a bracket. var elements1 =…
-
0
votes2
answers47
viewsA: How to include a file that is inside another folder on the same server
I solved the problem one way "easy" so to speak, was using NGINX which is the standard of Runcloud and for some reason it wasn’t working, so I created another Droplet and installed the LAMP standard…
-
1
votes2
answers47
viewsQ: How to include a file that is inside another folder on the same server
I’ve seen several other similar questions here in the O.R., and outside the community, but none were really helpful, some options that in theory should have worked, but somehow didn’t work. I…
-
0
votes1
answer62
viewsQ: How to structure a multi-array foreach/implode
I’m having a problem with listing an array within a table, I’m using a function to capture information from a file. torrent and display in a table, however when files are inside a folder, the list…
phpasked Vitor Hugo 379 -
2
votes1
answer1093
viewsQ: List folder and subfolders in a PHP foreach
I’m using the library Comic to extract information from a file .torrent, the idea and lists the information of the torrent files in a table using the foreach, however during listing, files that are…
-
0
votes1
answer333
viewsQ: How to hide a URL ID
I have a function that captures the ID of the URL and makes the query in DB and returns the value on the page, how to do this query without appearing the ID in the URL? Currently this way:…
-
0
votes1
answer77
viewsQ: Load reply comment with AJAX without refreshing page
I am sending comments with AJAX and then loading it in the reply, works well, except that the reply link is not being processed on the page, after you click to publish reply the page is being…
-
0
votes1
answer74
viewsQ: How to separate different values from a foreach
I’m using a PHP function to extract the main colors from an image I found in a question well-known in the OR. How I separate the values that are listed within the foreach? When they are listed not…
phpasked Vitor Hugo 379 -
0
votes2
answers434
viewsA: Make a screen responsive to monitor resolution
One of the viable and very simple solutions, instead of adding the background in a style, you could create a class as in the example below: In the example below instead of using the…
-
7
votes3
answers535
viewsA: CSS Change Time with Javascript
I’m not very good at javascript but the solution is simple and to be done with CSS using Transition. function togglePopup1() { document.getElementById('desktop-card').style.width = '480px'; }…
-
0
votes1
answer55
viewsQ: Extract image RGB values
I’m having difficulty extracting RGB values from an image, I can only get it if the image URL is in Base64, I tried to use some functions here from the OS but without success. The example below is…
javascriptasked Vitor Hugo 379 -
1
votes2
answers724
viewsQ: Apply the Blur effect to the floating box background
I have a simple jscript function that opens a floating box, but when the floating box opens I wanted the background to be with the Blur effect, only I can’t leave the background with this effect,…
-
0
votes1
answer18
viewsA: Show post with include_once
I solved the problem by replacing require_once with include <?php if ( get_post_type( get_the_ID() ) == 'filmes' ) { include('post/filmes.php'); } elseif ( get_post_type( get_the_ID() ) ==…
-
0
votes1
answer18
viewsQ: Show post with include_once
I want to list all my posts from all my custom post type, so far I get list in index.php But the problem is that it only lists one post of each custom post type. My index.php loop <?php $args =…
-
0
votes1
answer80
viewsA: Display multiple Custom post type on index
Following the suggestion of the user @Valdeir Psr <?php if ( get_post_type( get_the_ID() ) == 'filmes' ) { echo 'postagens no custom post type filmes'; } elseif ( get_post_type( get_the_ID() ) ==…
-
0
votes1
answer80
viewsQ: Display multiple Custom post type on index
I have a Wordpress template with Multiple post type, and I can query and display all Custom post type on index. My Custom post type is an area reserved only for Movies, Series and Blog, only in my…
-
0
votes1
answer30
viewsA: Display get_user_role and get_author_role function in English
After 8 days looking for a solution, I managed to solve by looking at the wordpress site. Solution link: By Vladimir Garagulia (@shinephp) Assuming $authordata contains a valid author user function…
-
0
votes1
answer317
viewsA: Error in paging with custom post type
After two days searching for information and methods to fix this error, I finally found a way. I was almost giving up, I decided I came here last case to ask, usually always have the people who know…
-
0
votes1
answer317
viewsQ: Error in paging with custom post type
I have two Custom post type created, one for movies and one for series, I have a loop that shows both on index, only when I use paging, it doesn’t work. Ex. Push to go to/page/2 Only I get a 404…
-
0
votes1
answer30
viewsQ: Display get_user_role and get_author_role function in English
I’m developing a Wordpress application that uses the function get_author_role, however I am unable to make her appear in Portuguese. The first function modifies the default names: function…
-
2
votes2
answers151
viewsA: Animation with image in CSS
Following the reasoning provided by Leandro Angelo, would be a solution, however as I do not want to modify the template too much to not have to use position, I will search another way, but if…
-
3
votes2
answers151
viewsQ: Animation with image in CSS
I’m breaking my head with a simple thing, usually I solve these problems by looking at google, but today I did not have this luck. And the following, I want to create a background with the class…
-
0
votes1
answer2330
viewsQ: Checking if user is logged in to Wordpress (show to visitor)
I want to check if a specific user is logged in to the site, who knows or works with Wordpress knows this and a very basic thing to do with the code below: <?php if (is_user_logged_in()) { echo…
-
0
votes0
answers100
viewsQ: View user status Online & Offline in Wordpress
The idea is to show visitors to the site if the author of the post is online or offline, there is some plugin or some code in PHP that makes this check? Xenforo has this feature, I would like to…
-
2
votes1
answer185
viewsA: How to create a reserved space when loading page content, same as facebook, youtube, etc
Good tried using a method with JS and worked, not and that professional thing, but meets the needs for now: I replace the classes using JS, I’ll leave the code using here:…
-
3
votes1
answer185
viewsQ: How to create a reserved space when loading page content, same as facebook, youtube, etc
This is a question asked on several sites on the internet, and before I came here to ask I researched a lot, even in stackoverflow in English. Well the part of the placeholder in html and css is…
-
2
votes1
answer55
viewsQ: Generate random number and add Class on the body of the Wordpress login page
I’m having a problem that at first is simple, but I have no idea what I’m doing to eradicate. function and simple, I want to add a class inside Body in the Wordpress login page, I can do this, but I…
-
0
votes0
answers35
viewsQ: Custom post types does not work properly
I created two "Custom Post Type", with the following names "Movies" and the other "Series", both using the same "Register Taxonomy"". However when I do a search like for example: When filter only…
-
0
votes1
answer52
viewsQ: Value duplication in PHP directory listing
The function of this code and lists files in a directory, however this with a mysterious error. The problem and the following, when it has only one file inside the folder, it shows the file and…
phpasked Vitor Hugo 379 -
-1
votes1
answer478
viewsQ: Take php function and add to another file
I’m having difficulty taking 3 functions that are already written and put in another file, I tried everything and could not. The code below serves for listing of directories and files, the functions…
-
0
votes2
answers42
viewsQ: Plural in time_ago
I’m having trouble determining the plural in the time display. Function: /** * @ http://us.php.net/manual/en/function.time.php#71342 */ function time_ago($timestamp, $recursive = 0) { $current_time…
phpasked Vitor Hugo 379 -
1
votes0
answers50
viewsQ: Youtube CSS style
I know the question is outside the scope, I don’t have enough points to post on the other stack forum, if anyone can switch to the right area thank you. How and done this type of style during page…