Settings page wwwroot

Settings page wwwroot

by Mark Brand -
Number of replies: 5

Hello Everyone,


I have a query, How can i put this code "<?php echo $CFG->wwwroot ?>" into settings.php page? see below picture.Because if we use direct url image not showing offline default.Please give some suggestion.



Thanks,Advance.

Average of ratings: -
In reply to Mark Brand

Re: Settings page wwwroot

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mark,

Ok, firstly what version of Moodle are you running as the answer depends on it?  Secondly given the wording of the question I'm concerned that you don't know enough PHP to get by and complete the task and thus will only bump into more issues, therefore I recommend doing a PHP course first, like https://www.w3schools.com/php/default.asp.

Gareth

In reply to Gareth J Barnard

Re: Settings page wwwroot

by Mark Brand -

Thank you for your reply Gareth.

My moodle version is 3.3. Yes you are right, i have no knoledge into php and development.

I have done this, can you please check this code? This is the right process ?or any suggestion for me?




Thank you.

In reply to Mark Brand

Re: Settings page wwwroot

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi, instead of the code you added try this Instead...

$default = new moodle_url('theme/mytheme/pix/slides/slider1.jpg');

In reply to Mary Evans

Re: Settings page wwwroot

by Mark Brand -

Hello Mary,


Thank you for your reply. yes this is working fine.



Thank you Again.