I'm working with WordPress within my project. and I'm using the Netbeans 7.3.1
WordPress has a ton of includes... and the current file I'm working on ( functions.php) cannot know which other files are involved. So, when I type in say $is_IE ( which is a global) or wp_register_nav which is a wordpress function), because they are not defined within the context of the current functions.php, it cannot give me intelisense support.
In this case, what do we do?
Is there a way in NetBeans which allows me to point to a few specific PHP files in my project so that NetBeans would know about the functions and constants defined in those files and hence, it can extend its intellisense support? - just like it does to native PHP functions, even those those functions are not within the current file.
Is it possible?
You can use WordPress native functions and objects in external files on the same webserver by requiring wp_load.php in your header. Just add this at the top:
require_once('relative/path/to/wp-load.php');
Edit: Just realized I read your question completely wrong. This link details how to add intellisense support for your Wordpress project. There is also a WordPress plugin for Netbeans that may do what you want.
I also know there is a plugin for Sublime Text for WordPress snippets and autocompletions - you can find it here on Github.
Related
I'm currently working on setting up a custom admin page for a specific task I need to do and it requires some custom styling in the theme. I went to the themes/SuiteP/css folder and found admin.scss. After making a change, I had assumed that Suite would dynamically compile the asset since I am developer mode; however, that did not happen.
I decided to search the code for any place I could find that would deal with compiling those files to *.css, but found no such place.
My question involves inquiring as to where that compilation takes place and/or how it takes place. Right now it appears as if I have to manually compile those assets, which seems pointless because it is just an extra step I have to manually take, rendering using SCSS less useful in comparison with CSS.
Right now, my solution will probably have to be adding a CSS file that has nothing to do with whatever pipeline exists, but if I can leverage existing functionality, that would great.
Due to legacy issues with the SugarCRM framework, SuiteCRM loads style.css for current theme. The sass work for SuiteCRM is in a transitioning period. It is currently a manual process, but we hope to make it automated in the future.
We are using Sass as a way to allow developers to customise the SuiteP theme. I have a github project which provides a UI to generate the variables.scss for you. I am hoping that it will be accepted in a future release.
So in regards to your workflow you only need to care about the style.css.
If you want to contribute back to the SuiteCRM project, then you will need to use the sass files in themes/SuiteP/css/.
However, if this is just for your instance of SuiteCRM, then you will want to create a style.css in the custom/themes/SuiteP/css/style.css. How you change that is up to you.
I would recommend that you use Sass to generate the style.css.
You can achieve this by copying the style.scss file custom/themes/SuiteP/css and then add the following to the file
#import ../../../../themes/SuiteP/css/style.scss
Note: I may have the path slightly wrong
or use the command line tools to include the themes/SuiteP/css/ directory
See for details:
SASS: Import a file from a different directory?
SuiteCRM should pick up the rest of the work. There is a change in SuiteCRM 7.9 that deprecates the $sugarcrm_version in favour of $suitecrm_version. This will effect theme themedef.php.
See for details
https://github.com/salesagility/SuiteCRM/pull/3233/files
I hope this answers your question.
So for a project I need to check if I'm able to get code completion working for Eclipse Orion (on the IBM DevOps Services WebIDE) when coding in PHP. There's a default plugin available but it only provides syntax highlighting. Code completion is the deciding factor this time.
Just googling around I've found some plugins here and there in various git repos but they seem to be for an outdated version of Orion, hence not usable here.
So, just a quick throw out if someone is using IBM DevOps Services WebIDE (or some Eclipse Orion implementation) with a PHP plugin with code-completion? Preferably a link to installation steps since I need to educate a programming class on how to set everything up from a clean slate.
Orion's Go language plug-in provides a straight-forward example of contributing content assist via a plugin, see http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/tree/bundles/org.eclipse.orion.client.ui/web/plugins/languages/go?id=R7_0 . To make something similar for PHP you would create a plug-in with the same shape that defines at least the "orion.edit.contentAssist" service, and then install it in your Orion/WebIDE on its Settings-Plugins page (point it at your plugin's .html file).
I'm a newbie to NetBeans IDE (version 8.0.1 for PHP) and I'm trying to create a library containing the functions I'd like to use frequently (like DB connection, string manipulation and so on) so I'd be able to include it to my further projects.
The project is connected to GitHub repository and remote SFTP folder (if those notes are important).
As was described in the answer to the question Creating/accessing libraries in netbeans I tried to pick Tools ->Libraries menu item. But the button new library in the opening window is inactive.
I have no libraries in the Project navigation window as well. So I'm definitely doing something wrong.
Cound anyone point me why I'm not able to create a new library?
UPDATE TO THE QUESTION: What exactly I probably need is a tool to attach php file with library functions and classes to the project so I could just include it to the index.php file (or anyone needed this library).
I have a question about PHP projects in eclipse.
I have Aptana and PDT installed in my eclipse.
When I create PHP Project, I have something like this:
But if I add PHP nature to the project (org.eclipse.php.core.PHPNature) then I get following picture:
Is this normal at all? What are the benefits of this PHP nature?
This is absolutely normal and part of how PDT provides Code Assist in PHP projects.
Basically PHP Language Library contains what you can find in the PHP documentation. When you call a core function e.g. preg_replace() it will provide Code Assist, like autocompletion and showing you which arguments the function takes. It's just a bunch of Interfaces for core features, SPL containing phpdoc generated from the documentation.
The PHP Include Path resembles your include_path in PHP, in that you can refer to stuff outside your project, e.g. PEAR or a common folder containing shared PHP classes, which are then recognized by Eclipe's Code Assist.
is just a hierarchy view of your global namespace, similar to how you can unfold a php file and see its hierarchy directly from the explorer.
I am using the felogin system extensions. Those extensions are part of the default TYPO3 installation and they are stored in typo3/sysext. I know that I can edit them by editing its code directly but I guess it is not the best way of doing it.
How can I "overwrite" those extensions without changing their code?
Shall I create a new custom plugin and copy & paste code of a system plugin I wish to alter?
You could just modify the extension and place a copy in typo3conf/ext/. This directory (so called "local extensions") override the system extensions.
However, you will probably run into trouble when you want to upgrade TYPO3.
Did you find a bug, if so, please report it. If you know, how to fix, then it would be great, if you would push the change into the review system
If you just want to change functionality, modifying existing code is not a really could solution. There's the concept of hooks (which is a clean one) and of XLCASSes, which is somehow dirty (as it can also cause trouble with newer TYPO3 versions). So basically the same as with every other extension.
Steffen