Vscode open classes reference in New tab - php

You suppose we used some class in current class and now wen I want to open class reference by holding ctrl and pressing left click I expect class reference should be opened in new tab but that show in bottom of class like with below screen shot. However that's not bad but I want to show that in new tab

Please check whether “Preview Mode” is in effect.
For VScode, to stop files from going into preview mode, and always open a new tab go to File -> Preferences -> Settings (or Ctrl + ,)
And try adding the following to “Users Settings”
"workbench.editor.enablePreview": false
Please include a comma if there’s other settings as it has to be a valid json

Related

laravel return View::make in new tab

How can I return a View::make (from "route") to be displayed in a new tab using Laravel? I have tried to achieve this with the following code however it is not opening the view in a new tab:
return View::make('reports.cars')->with('cont', $u);
You do not need to modify controller code, just use target="_blank":
example.com
_blank opens the linked document in a new window or tab
https://www.w3schools.com/tags/att_a_target.asp
There is no way to to what you are asking from the server side. Tab controls are client side only and handled by the browser.
You can do for example:
Open in a new tab

Find In Folder not showing all expected results Sublime Text 2

I've got a project containing over 30,000 files. When I want to find something within those files, I right-click the project and use Find in Folder (or press CTRL+SHIFT+F), enter my search term and make sure the 'WHERE' is my project then click Find. This opens up the Find Results tab and shows me every file where that search term exists. This normally works fine but there's one search it won't show all results for.
I've got 4 PHP files that all have the variable of $findthis. When I try and search for that variable, it only brings back 3 out of the 4 files and I'm not sure why. It's spelt correctly in each file and when I open the 4th file and do a find within it, it can find it perfectly, just not when using the Find In Folder option. I've even gone into the file, copied the variable name and pasted that value into Find In Folder and it still only shows me 3 files and not 4!
The only settings I've changed in the preferences 'Settings - User' file are the following:
{
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme",
"detect_slow_plugins": false,
"font_size": 9,
"file_exclude_patterns": ["/*.jpg","/*.jpeg","/*.gif","/*.png","/*.tif*","/*.bak*","/*.sql","/*.tar*","/*.ttf","/*.jar","/*.swf"],
"ignored_packages":
[
"Vintage"
],
"word-wrap": false
}
Look at the search options in the dialog:
you may have set the "Regular expression" option in search (the left button in the search dialog, with ".*"). So the $ sign is interpreted as an end of line.
or you have the "whole word option" which is set (the button with double quotes);
Update
I made some tests and the results are rather surprising when looking for a string starting with a $ symbol if any of these options are activated. Even for a basic search in the current tab.
$test is not found whatever is its context if the "whole word" option is activated.

How do I resolve link problems mask PHP /"////"//"/"

I have a website, using tiny_mce backoffice.
My website works well on my server, but I have to change the host server and suddenly I see this problem:
For example:
If I want to save text with links, for wikipedia.org for example... And I save on backoffice (with open new window propertie _target)
-Then in website interface, I click on wikipedia text link
and and instead of opening a new window, I have somethinfg like this :
mysite.com//"//"////"http://wikipedia.org/"////"//"/"
Is that normal?
Last server never happen that
And in this new server he creates somethink like a mask
anyone knows how to resolve that?
thanks
best regards
You should use stripslashes();
http://php.net/manual/en/function.stripslashes.php
EXAMPLE
<textarea class="tiny_mce"><?php echo stripslashes(); ?></textarea>

image upload buttons are missing in magento in back end

I am new to Magento...Installed 1.7 community Edition.
I have heard great deal about it and so far I was not impressed..anyway I am trying to add images to a Product but 'Browse files' and 'Upload' buttons are missing from the backend.
I have tried several solutions from online like:
-copying 'media' folder from 'adminhtml' folder to 'frontend',
-clearing caches,
-reforming indices,
-upgrading to latest flash player.
Nothing seems to work. If any one found solution to this problem please let me know.
These buttons are coming from flash.So check your media folder on following location
design/adminhtml/default/default/template/media
if there is no media folder then copy from fresh magento
This will solve your problem :)
Magento image uploading issue is related to flash. You need to change the settings of your browser. If you are using chrome,
Go chrome settings, or by typing chrome://settings/content
Go to Content settings => flash
Turn on Allow site to run flash
Turn off ask first
And in Firefox, you don't need to do anything, if your flash player is outdated, you need to update it
Go to
chrome://settings/content/flash
Add you website url in allow tag
Then refresh your admin panel
if git is used It's also a good to check .gitignore. it's easy to ignore "media/" instead of "/media/". Deeper media directory contains swf upload buttons.
The upload button is not displayed if JavaScript Variables
maxUploadFileSizeInBytes and maxUploadFileSize are not properly configured in the following files:
/app/design/adminhtml/default/default/template/media/uploader.phtml
/app/design/adminhtml/default/default/template/media/cms/browser/content/uploader.phtml
The variables are declared as follows:
maxUploadFileSizeInBytes = <?php echo $this->getDataMaxSizeInBytes() ?>;
maxUploadFileSize = '<?php echo $this->getDataMaxSize() ?>';
You can directly edit:
maxUploadFileSizeInBytes = 10485760; /* 10.48576 MB */
maxUploadFileSize = '104857600';
The getDataMaxSizeInBytes() and getDataMaxSize() are defined in the file:
/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php
If your server is running with HHVM, the parameters PHP post_max_size and upload_max_filesize are available under the names hhvm.server.max_post_size and hhvm.server.upload.upload_max_file_size.
For this he will have to modify the appeal of these parameters in the php file Uploader.php, here's how:
Copy the file in the Local Uploader.php architecture:
/app/code/local/Mage/Adminhtml/Block/Media/Uploader.php
replace the following lines:
public function getPostMaxSize()
{
return ini_get('post_max_size');
}
public function getUploadMaxSize()
{
return ini_get('upload_max_filesize');
}
by the following:
public function getPostMaxSize()
{
$post_max_size = ini_get('post_max_size');
return $post_max_size ? $post_max_size : ini_get('hhvm.server.max_post_size');
}
public function getUploadMaxSize()
{
$upload_max_filesize = ini_get('upload_max_filesize');
return $upload_max_filesize ? $upload_max_filesize : ini_get('hhvm.server.upload.upload_max_file_size');
}
Cordially.
G
I had problem updating to magento 1.9.1, the problem was solved by copying the folder /app/design/adminhtml/default/default/template/dull
into the new magento instance.
Image upload button is a flash button so you have to download Flash Player.
You can download flash player from following link :
http://get.adobe.com/flashplayer/otherversions/
After installing flash player just need to restart your browser, now you can see the image upload button.
I found this issue in admin area. First Enable the Flash of Browser then Recheck.
These buttons use FLASH.
So if your browser does not support flash - then they will not appear.
Ensure that the app/design/adminhtml/default/default/template/media folder exists and that there are 2 files within it.
editor.phtml
uploader.phtml
Ensure that the skin/adminhtml/default/default/media folder exists and that there are 3 files within it.
flex.swf
uploader.swf
uploaderSingle.swf
If you have created your own theme (ie Theme: "mytheme" and Package "mypackage") then ensure the above applies for:
app/design/adminhtml/mytheme/mypackage/template/media
skin/adminhtml/mytheme/mypackage/media
I hope this helps.
I had the same issue and sorted by doing the following settings in Google Chrome:
Go to menu in the right corner > settings > Advanced > Privacy and Security > Content Settings > Flash > In the allow section click 'ADD' button and type your website URL.
You can check the following URL if any problem:
http://www.alvipixels.co.uk/blog/magento-product-image-upload-button-not-showing.php
I had this problem after emptying all my caches in Opera. I just added the exception of my site to the flash setting. Just make sure it is the complete url starting with http(s). I one case I opened the flash player properies and first deleted all content using the delete all button on the advanced tab.
If it is working in one browser it is usually NOT a magento code error in another browser.
Google Chrome is blocking these buttons because they are flash. follow these steps:
Open Google Chrome
Click on the three dots in the top right hand corner of the browser
Click on settings
Scroll down to advanced and click expand
Scroll down to Privacy and security and click on content setting
Click on flash
Under allow click on add
Copy the homepage link to the website
Here's a tutorial on fixing Magento upload buttons in more details

How to attach php documentation in eclipse

Is there any way to attach PHP docs in eclipse, so that if I hover over any function I could get all the details and the related description.
Something on similar lines to javadocs.
Using:
Eclipse: helios
php5.
OS: Ubuntu 12.04
Here is step for configure PhpDoc into eclipse :
1. Open eclipse IDE
2. Then select Window Menu & Select Preferences
3. Then navigate through php menual
4. After Cliking on New You will get this Window :
Here specify latest .chm File Give Name and Press Ok.
5. Set it to default & press Ok [ It will display in bold letter]
6. After Setting it to default you will get your local help will highlighted with bold letter
7. When you want to see doc for php function then press Shift + F2
Note : You can also change help option from Window -> Preferences
You can try:
Create a new PHP Project (File->New->PHP Project)
Switch to the PHP perspective (Window->Open Perspective->PHP)
Create a PHP file
If you now write something like
<?php phpinfo(); ?>
and hold your mouse over "phpinfo" you should get a popup with the information.
Hold CTRL to jump directly into it.
If you want to documentate your own code use the following:
/**
* Some text here
* #param string $str input
* #param array $arr data
* #return boolean
*/
hope that will help you.
Cheers

Categories