Posts by Daniel Costa • 416 points
26 posts
-
0
votes1
answer434
viewsA: Start page with unchecked checkbox
I did it this way: After defining the areas, I made them disappear from the map, using layer_1.setMap(null); layer_2.setMap(null); layer_3.setMap(null); layer_4.setMap(null); was thus in general the…
-
0
votes2
answers45
viewsA: Possible problems with logical operators
The operator ! is already basically a === false. He does the operation for example: if(!isset($varx)){... would mean: If the $varx is not arrow... Or: If the $varx is exactly the same the fake...…
phpanswered Daniel Costa 416 -
3
votes1
answer2080
viewsA: HTACCESS - Subdomain
You’re gonna need to put this on .htaccess of the subdomain folder: RewriteEngine on RewriteCond %{HTTP_HOST} ^subdominio.site.com.br$ [OR] RewriteCond %{HTTP_HOST} ^www.subdominio.site.com.br$…
-
2
votes4
answers5110
viewsA: How to upload images using Ckeditor?
There is a plugin for CKE called Upload Image, take a look at his documentation and install it in your project, it solves everything from uploading images.…
-
0
votes1
answer61
viewsA: Using Data API youtube v2 (Error No longer available)
Really the API V2 has already been discontinued, you can migrate to V3 using the Migration Guide theirs…
-
0
votes1
answer974
viewsA: Search for content inside a file
You can make a foreach using the glob() searching for all the .txt in a certain folder, and within this one foreach use the file_get_contents() for vascular each file .txt to find word occurrences.…
phpanswered Daniel Costa 416 -
0
votes2
answers580
viewsA: Error consuming Webservice SOAP in php
This error means that some method/attribute is returning Null and Voce is trying to access the attribute NodeValue of it. Try to verify the nulls of the WS responses.…
-
0
votes2
answers3969
viewsA: How to create a link to run a ". bat" file that is inside the PHP directory?
Try something like that: system("cmd /c C:[caminho para o arquivo]"); The function System serves to run command on the application server.…
-
0
votes1
answer114
viewsQ: Updating of several Models and a single Cakephp 3.x form
I’m having trouble upgrading more models in the same form in cakephp, I’ve done several different modes and in all the main model is inserted/updated but the related model is not. My controller is…
-
2
votes1
answer98
viewsA: I am not receiving the data sent by the user in the email I should receive. Any tips how to resolve?
Put the code below in place of the From:$email $headers = 'From: '$email . '\r\n' . 'Reply-To: '. $email . '\r\n' . 'X-Mailer: PHP/' . phpversion(); leaving the code like this mail($Destinatario,…
phpanswered Daniel Costa 416 -
1
votes1
answer210
viewsA: Wordpress post preview without the link "read more"
Add this piece of code to your functions.php: add_filter( 'the_content_more_link', 'bacon_more' ); function bacon_more() { return ''; } It adds a filter to return nothing instead of read more…
-
0
votes2
answers53
viewsA: Site malfunction after change in . htaccess
All that’s missing is the RewriteBase / leave your code like this: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]…
-
1
votes2
answers2529
viewsA: Remove record in database without giving refresh
You will do so: $(".deletaUser").on('Click', deletarUsuario); function deletarUsuario(e){ e.preventDefault(); dados = { id : $(this).data('id') }; $.ajax({ url : "deleta-item.php", type : "POST",…
-
0
votes2
answers361
viewsA: Count friends in common using LEFT JOIN
Puts u.user to be the result of the first query SELECT u.pnome, u.snome, u.foto, u.usuario, COUNT(c.id) as comum FROM amizades a INNER JOIN usuarios u ON (u.usuario = a.amigo1 AND a.amigo1 <>…
-
1
votes1
answer158
viewsA: Problem copying an html block when clicking a button
Add a class to the action button: <button class="add">Adicionar + campos</button> And modify the function to work with this class: <script> $(function(){ $('.add').on('click',…
-
1
votes1
answer206
viewsA: Problem with textarea in fluid layout
Replace the css of the class . contact . contact: .contatoEsquerdo, .contatoDireito { display: inline; vertical-align: top; padding: 0; margin: 0 auto; } then just set the right size jHtmlArea field…
-
0
votes1
answer26
viewsA: Post URL duplication adds numerical value
wordpress does not assume the category as a single post key (as it uses Slug [or house-a]). So even if from different categories, he will continue to do so. You can solve this by creating custom…
-
1
votes1
answer86
viewsA: How to create a rewrite rule to read a repository from a website subdirectory
You could do more or less like this on . htaccess at the root of www : RewriteRule ^rio/(.+) /repo-rio/$1 [NC] In this rule he will take whatever is after the bar and direct completely to the…
-
0
votes2
answers118
viewsA: Save form data without obligation to update image
Separates the insertion of the image in the database and only executes the update if the user has uploaded something.
-
0
votes1
answer97
viewsA: Custom Taxonomy inside another Custom Taxonomy in Wordpress
You can make the products as custom posts and create the taxomonias and terms for it. EX: Category -> subcategory -> post Category -> product line -> product Both running in parallel and…
-
0
votes1
answer53
viewsA: Highlight "Blog" menu when accessing a category or post
By default wordpress puts the class ". Current-menu-item" in the item that is selected in the menu, try styling that class in your css. But if I understand the question correctly, you need the…
-
1
votes2
answers125
viewsA: Recover scandir images from PHP and print incrementing according to the number of occurrences
You can make it easy by saving the partial path in the bank and avoiding a folder loop that is more costly for code to execute, save "/Assets/Images/image001.jpg" in the bank and recover with a:…
phpanswered Daniel Costa 416 -
1
votes1
answer1994
viewsA: How to Get Data from a Mysql Database from id
Use the "WHERE" clause in your select, example: $query = mysql_query("SELECT * FROM frases WHERE id = "'.$id.'" ORDER BY id DESC" ); Where $id is the id of the "Ana" recovered the way you think best…
-
1
votes1
answer1122
viewsA: How do I use GPS Location in my WEB application?
You can do this with JS, it would be something like this: http://codepen.io/FuckingLunatic/pen/LNQqjm (see working here) var x = document.getElementById("demo"); function getLocation() { if…
-
1
votes1
answer551
viewsA: List custom post type of various taxonomies
Make a loop of categories where you insert the category header, within this loop you will get the ids of all categories, use this to make one more loop of posts, creating a pair of nested loops,…
-
1
votes1
answer830
viewsA: How to load an FTP server image from the URL?
Normally accessing only the "111.11.111.11/photo.jpg" would be enough, if you need permission to read, leave the folder in question with permission 644 in ftp, that so, all groups will have safe…