I'm working along in the code and come across this line:
<?php echo $menu ?>
So, I understand we're getting the contents of the $menu variable. I am having a hard time finding my way around to which file implements the functionality to populate the $menu variable. I need to go and alter styling on this item.
What are some best practices for finding my way around the moodle vars like this / debugging / tracing???
Thanks for any tips.
The recommended practise in these forums is that, if you ask a question and later on find the solution yourself you should post your solution. This may help other participants with the same problem.
Thanks
Joseph
It wouldn't be <div class="logininfo">, would it?
RLE
And thanks as well for the link to PHPref. The other day I was commenting to an associate about the lack of code-insight enabled PHP editors (at least on my computer)...
Is there a good OS PHP editor with code completion / insight? I have Dreamweaver. The function I miss from the Borland/MS IDE I am used to is the ctrl-click in to a class or function, property etc...
I don't even care if it's OS. Something good would be great and likely save a lot of time.
Thanks again for the link to phpXRef. That thing is very cool.
(I really ought to update that document for Eclipse 3.3 and PDT. The summary is that PDT is better than PHPeclipse if you have lots of memory. Eclipse 3.2 + PHPeclipse used to use about 100Mb ram on my computer. Eclipse 3.3 + PDT is now using 500Mb, but is in many way better and I have enough memory to cope.)
I am using Eclipse 3.2.1 and would like to use it with PHPEclipse but I don't know which url to set in the "Edit Remote Site". Since you mention that you had been working with it in Eclipse 3.2 you may know the proper URL? I have been searching for it but got quiet confused now.
All the links I find are only compressed once - but no xml-file-link like in your link.
See e.g. download_phpeclipse-1.1.9-cvs-20060920
You may see my related post here.
If I change the URL, do I need to go through all the steps again mentioned in your above linked link or are there some differences?
I hope you could help me somehow?!
Now I am on that stage that there is a manual installation possible:
manual_installation_guide
My problem though is that I have been working with phpeclipse-1.1.9-cvs-20060424 so far. In the manual there is also a part writing about having two versions - just like it is in my case. But I don't understand if in this case I should just copy the extracted files into the appropriate folder (which is the place where to find 'eclipse.exe' and a folder called 'plugins') without deleting the old version.
Reading the manual doesn't match the downloaded and extracted files though. I can find only a plugins file which seem to have all the files from the older version inside but there is not a features-folder.
Or am I on the wrong track and should really extract the files directly into the folder where eclipse.exe can be found and it will do what is needed correctly?
And what about the clean-option - would it leave my moodle-files untouched?
I don't want to break my currently working phpeclipse-version and want to make sure to be able to switch back to my older version in case the newer one won't make the debugger get working.
Does anyone has a clue or a more detailed page about this issue - I would really appreciate!
So I am out of touch with PHPEclipse.
You can always install two copies of Eclipse on your hard disc, so you can try out the new code before risking updating your main install.
finally - since I couldn't get PHPEclipse working with debugging - I have decided to install Eclipse 3.3 with PDT.
Firstly, I am missing so far the feature where I could go to a used function, double clicking on it and by using Strg and clicking with the mouse at the function I could go directly into the file where the function is defined. Can you use this functionality? If yes, do you know where to turn it on?
Secondly, in Eclipse below Help-> Software Updates -> Find and Install -> new features
I have a remote site with the link http://download.eclipse.org/tools/pdt/updates/ and
a second one for zend http://downloads.zend.com/pdt.
As far as I understood I need the second one in order to be able to debug. Did you use also zend?
I have also been through the steps "Configuring for Mysql" to find here.
I have tried it out but couldn't get it working as it should.
E.g. while trying out debugging edit_multichoice_form.php the debugger terminates way before my breakpoint already in the first line of code giving a debug error in the console:
Debug Error: /moodleSue/moodle/question/type/multichoice/edit_multichoice_form.php line 14 - Class 'question_edit_form' not found
Maybe you or anybody else have an idea of what I have forgotten?
I really would love to set the debugger and the above mentioned function in order to get more into the code and understanding it better.
I have put my new "workspace_3.3.2" into the same folder of my old "workspace".
I guess I will have to correct following paths found in phpinfo:
DOCUMENT_ROOT
SCRIPT_FILENAME
session.save_path
But where to find?
In config.php I find dirroot and dataroot that should be renamed. wwwroot may be changed as well maybe? At the moment there is written "http://localhost:8080/moodle". Should and can I easily just rename e.g. "*/moodle" to "*/moodle1.8" in order to refer to the new workspace in the browser? This way I would get to my old workspace through "http://localhost:8080/moodle" and to the new workspace through "http://localhost:8080/moodle1.8".
That is what I did.
I just followed your suggestions. But now after converting the project to pdt project it has the red x almost everywhere in the moodle folder where there is a html-file saying sth. like "no start tag XXX" or "start tag not closes" or "invalid character used in string..."
Do you have any idea how to get rid of the errors and warnings? Maybe somewhere in the preferences?
I was not able to get rid of all the red Xs in moodle, because there are some library files that it does not like, but we can't change them. I have having red Xs around, but I have learned to live with it because I think Eclipse is being too strict here.
I have followed the steps in order to get rid of the Xs to find under http://docs.moodle.org/en/Setting_up_Eclipse_for_Moodle_development
but they are still there...
"Under General -> Content Types, select PHP Source File, and add *.html to the box at the bottom.
Under General -> Editors -> File Associations, if it is not already there, add *.php to the top box. With *.php selected in the top box, make sure PHP Editor is set to default in the bottom box. With *.html selected in the top box, select PHP Editor in the bottom box and click the Default button to change it, because in Moodle, most HTML files actually contain PHP code."
So did you get rid of the red Xs in your html-files? How?Are you talking to live with those red Xs in your html-files or in other files?
I do remember that getting HTML parsed as PHP was one of the changes I did to get rid of some of the red Xs. I can't remember the rest. Here at home, I am still on 3.2 because my laptop does not have that much memory. So I will have to check other settings at work tomorrow, if I remember.
I can't see it yet, maybe someone knows, where to configure it properly?
In Window -> Preferences -> General -> Editors -> Text Editors -> Annotations -> Annotations types: Occurrences
following is set in "Show in":
Text as Highlighted - checked and Highlighted
Overview ruler - checked
Color: yellow
I am glad to give you a little info back after I have read so many helpful eclipse infos from you:
Select a word and move to the next occurrence with CTRL-k and to the previous with SHIFT-CTRL-k
Urs
Second, I have never tried to use he Zend debugger. Sorry.
Same with me, using Eclipse SDK Version: 3.3.0, nothing happens when double-clicking a function name, but as you say, holding down CTRL key (this changes all the function names to hyperlinks) and clicking on the desired function name to get sent to that function's definition in the file where it resides.
Maybe this is configurable and Süreç has customized her keyboard shortcuts?
Joseph
sorry, first I have written Strg which is the German word of Ctrl
then second I am using it the same way you do - sometimes I double click on the functions first and do the same following procedure, but it is not needed at all. My mistake.
So if I get you right you are using the same first link I mention above (http://download.eclipse.org/tools/pdt/updates/) and that is all in order to use the debugger?
I had tried debugging right after this installation and couldn't get it working. Maybe now using the old workspace it should work. I will try again as soon as I got rid of the defects and warnings.
Or are you automatically using XDebug? In the Run->Open run dialog->PHP Script-tag I can select between XDebug and Zend Debugger - but I don't remember having installed XDebug. So I presume that it got installed automatically through the PDT installation.
Disabling Zend in the "Manage configurations" and opening "Open run dialog" throws a pop-up saying "No PHP executables locations are defined. Define a PHP executable location before continuing." Do you know what I have to type in there?
Tim, maybe you could send me your php.ini. I could compare my settings and get the XDebug running.
I have tried out also using zend and it doesn't seem to work as well. with some reason I don't have a folder to the ZendDebuggerInstallation I have to set in the php.ini:
zend_extension_manager.debug_server_ts="/full/path/to/ZendDebuggerInstallation"
e.g.
zend_extension_manager.debug_server_ts="C:\Programme\Zend\ZendDebugger-5.2.10"
Is anyone using zend and could tell me where to find the proper file?
I am trying to follow the instructions listed here.
With some reason there has not been installed the above needed folder in order to use the debugger.
At this point I am really frustrated and am looking forward for some enlightment!
Tim, maybe you could send me your php.ini. I could compare my settings and get the XDebug running.
As I said above, I don't use any debugger for PHP, so I can't really help.