I'm working on a project on localhost. Its kind of a company management application based on some php framework. Basically I'm a front-end developer and I've to fix some pages, their alignments and color scheme. I'm using firefox. Every single time when I've to change the settings of any page I've to go the php dev who built the app and they located file for me in the project, obviously they knew the file structure of the whole project. So is there any possible way, tool, addon or plugin that can identify the specific file (which is currently open in my browser) for me? so that I can reach the file on localhost directly and edit it right away rather than bothering the php developers all the time. Firefox inspect element can identify the css files though. Any help would be appreciated. Thanks
Related
First off sorry for being a complete newb and if this is a something I shouldn't be bothering people with, but I am fairly new to PHP and I have been tasked by my employer to make a couple of changes to a website that seems to be written primarily in PHP.
The website is ems-uk.co.uk
I have been asked just to check the location on the maps that display on the pages but I can't for the life of me find the file to edit within the file manager. I can find exactly what I need to change when I "inspect element" in Chrome but cannot find anything even close in the index.php file and there appears to be no other files for separate pages.
Hope someone can direct me in the right area and sorry again if this is the wrong arena for a question like this.
A bit of inspection suggest this is an OpenCart powered CMS/ecom site with the Kuler Moment theme (skin 3). I'm not familiar with the OpenCart dashboard but you may be able to log in and configure the google maps module from there. Failing that I would look in the theme files for the location map section.
You're looking to it wrong. PHP is server sided, you're trying to edit things client side.
You will need access to the webserver and edit code there. If you're asking this I'm not sure if its good if you're editing pages on that website though.
So I have this app, just deployed on Heroku: http://jobsboardd.herokuapp.com/
And as you can see, instead of some fancy icons there are some strange symbols(rectangle)? I know it's a common thing with ruby apps, and I couldn't find anything related to php.
And according to the html code, every css file is loaded as it should. So what can be causing it and how i can fix it?
As I've check in the site's code, you are using HTML Kickstart Toolkit. The Icons that you are looking for belongs to another plugin called font-awesome. See if all the files in the css and fonts are accessible and mapped correctly. I've noticed when I check in the browser's developer console that this image is missing so its possible others are not accessible as well.
We have a website containing a page http://www.openehr.org/downloads/modellingtools whose link "Download and Help Pages" in the first table row just goes to more PHP content - the documentation of a tool, in the same visual style as the main website, including top panel, menu and bottom menu.
Ideally this sub-tree of pages for the tool would live in the GitHub repo for that tool (rather than being directly part of the website), and the main website would proxy the content from GitHub - that way we would achieve two goals:
tool doc is maintained by those who work on the tool
but it is visually integrated into the central website.
I've messed around with various Apache proxy & rewrite rules on the main site server to do this, but no luck so far. I can't be the only one who wants to do this, so hopefully there is a known strategy out there.
I am new to PHP (have been a Java guy all my years :-) but understand the basics of it. For an existing application on which I need to fix some bugs, I need to import it into XAMPP.
I tried putting all the application folders (and files) into the htdocs folder of XAMPP. However, that does not work. The server does list the new project when I navigate to "http://localhost" but when I click on my project (that I copied), the index.php page fails to come up. It simply says page not found.
I would like to know a couple of things as listed below...
1) Is there something wrong I am doing for the project to be hosted on XAMPP?
2) One peculiar thing that I noticed was that when the application browses to http://localhost/MyProject/index.php , it gets redirected to http://www.localhost/index.php . Is there a URLRewriter (or kind) which is doing this? If yes, where I can find the same within my project?
3) How can I identify the framework that the existing code is using? I can see M-V-C named class.php files
Any pointers would be much helpful for me to start debugging and learning PHP.
Thanks!!
I have been struggling with a stupid situation. A customer has asked me to alter his 'advanced search' page to add a few options. The URL of this page is like http://www.domainname.com/index.php/catalogsearch/advanced/
This is a Magento store and I have no experience with this framework. I tried to learn it but found the learning curve too steep to gain enough knowledge to finish the project on-time.
So I first made a small PHP tool that searches in all source files for a search term and reports back te number of hits. I used this tool to look for unique strings that appear on the advanced search page. But the text is nowhere to be found!
My next attempt was looking at the database to find the string. So I exported all DB data and copied the resulting queries into my code editor and searched again, and found nothing!
This is very awkward and is driving me mad. I cannot find the block of code that outputs the advanced search options!
'ANY' help would be MUCH appreciated.
Thanks,
Majid
So far I've been using the following tactics on a local dev box - don't try this on a live store obviously!:
Turn on Template Path Hints + Block Names in System -> Config -> Developer. This will get you to the phtml file that does the final render and also the block object type that it uses. Unless you've IP limited this, every visitor will see these!
Then in the phtml files to dig further you can easily Zend_Debug::dump($var) to inspect the variable/object in question and find the object type etc.
Search in your editor or grep through /app/code directories to find which files define the object type you've just found - although as it based on Zend the correct file path can be worked out most of the time from the object class.
Also
A handy trick is to deliberately insert an error in a php/phtml file, Magento gives you a nicely formatted error screen with a call stack which is interesting reading
echo() statements in the core files normally work pretty well, in the Magento set up they don't normally trigger the html headers to be sent at the wrong time
Use an IDE like Netbeans/Eclipse/Zend studio etc and put all the Magento code into your project, the resulting phpdoc information, 'open declaration' and code assist will save you hours of searching
Spend the time to get Xdebug working on your test server with an IDE that allows you to make use of it. The easiest one I've found to setup from scratch (on a Mac) is a local Mamp install with Netbeans as the IDE - the Netbeans site will walk you through this, once you've got this working well you can forget about most of the other tricks!
These are just the things I've tried so far - more suggestions please!
I've still not found a technique to debug config problems from XML issues in the multitude of XML files that Magento uses, problems here tend to fail silently and are really hard to track down as a result + the xml documentation is awful.
The URLs in Magento tell you where the template files are for a certain module.
For example, when you're looking for catalogsearch/advanced/, all template files are location in app/design/frontend/default/your-theme/.
Look inside that folder and it should be obvious. You will have a folder called catalogsearch and inside that a folder called advanced; inside which there are two files:
form.phtml
result.phtml