moodle theme stucked, new theme not working

moodle theme stucked, new theme not working

by sam salt -
Number of replies: 9

i m using moodle 2.2 version. and problem is that when ever i m trying to change theme. theme does'nt works or not changed, it will remain the previous one, and even if i delete that theme from themes folder then, theme was not there bt over all layout just spoiled and moreover new theme selection still an issue. bt it shows msg that theme succefully changed, bt no impact of new theme shown, i already clear theme cache. many things i had tried

Average of ratings: -
In reply to sam salt

Re: moodle theme stucked, new theme not working

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

Well deleting themes out of the theme folder won't help at all as you may have deleted the main parent themes for all I know.

Here is what you need to do...

  1. First of all make sure ALL the missing themes have been restored.
  2. In theme settings scroll down the page to where it says Enable mobile device detection, and un-check the box this means NO you don't want to detect mobile device.  You will find out why in a moment.
  3. Next go to Site Administration > Development > Purge all caches
  4. Next go to Theme selector and it should look different. Can you see the theme you want to change to? If so select it.
  5. If you selected your theme and it works that's Good!
  6. You can go back and change the setting for Detect Mobile device option

HTH

Mary

In reply to Mary Evans

Re: moodle theme stucked, new theme not working

by sam salt -

sad didnt work, i already follow that steps bcz mary you also posted that in another disscussion topic. i dont know exactly why its not working. it remain on that theme,

pls give any other solid solution

In reply to sam salt

Re: moodle theme stucked, new theme not working

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

I would turn Debuggin on if I were you.

Site Administration > Development > Debugging (set this to Developer Mode)

While on that page click Purge all caches before you set debugging.

If that does not clear things or return any Errors, then you could always send me a link to your site and set me up with User ID/ Password and  Admin permissions and then I can see what a mess it really is in!

In reply to Mary Evans

Re: moodle theme stucked, new theme not working

by sam salt -

mary, half of the problem I solved, actually in config.php this code is written:

require_once(dirname(__FILE__) . '/config.multi.php');
 and if  I remove that line then all will going good, but the problem is that I also want that file (config.multi.php).

u can say that still I am facing the problem.

In reply to Mary Evans

Re: moodle theme stucked, new theme not working

by sam salt -

heres code of that file

<?php
/**** MULTI DOMAIN ****/
$CFG->subdomain = "main";
// $serversetup = array(.<subdomain>'=>array(<categoryid>,.templatename.));
//$serversetup = array('interxiondub1'=>array(2, 'mmulti'), 'eircom1'=>array(3, 'mmulti'), 'sungard1' => array(4, 'mmulti'));

$host_exp = explode('.', $_SERVER['HTTP_HOST']);
if(count($host_exp) == 3)
    $subdomain = $host_exp[0];
//if(isset($serversetup[$subdomain])) {
//$rootcatid = $serversetup[$subdomain][0];
$CFG->rootcatid = 0;
if(!empty( $subdomain ) &&  $subdomain != "www"){
$CFG->subdomain = $subdomain;
$CFG->usersubdomainsql = " id IN (SELECT userid FROM {user_info_data} uid WHERE uid.fieldid = '1' AND uid.data = '$CFG->subdomain') ";
}
else
$CFG->subdomain = "main";
if($domain = get_domain( $subdomain ))
{
    if(!empty($subdomain))
        $CFG ->wwwroot   = 'http://'.$subdomain.'.dcprocedures.com';
        $CFG -> theme = "mmulti";
        $CFG->rootcatid = $domain["rootcatid"];
    $CFG->account_type = $domain["account_type"];
        $CFG->company    = $domain["company"];
        $CFG->domainid = $domain["id"];
        $CFG->params = unserialize($domain["params"]);
    $CFG->ccatid = $CFG->params["ccatid"];
        $CFG->contractor_roleid= 10;
        $CFG->employee_roleid = 9;
        $CFG->clientadmin_roleid = 1;
        $CFG->accesskey = substr(md5($CFG->subdomain.'@#$@%!^%DG'), 4, 5);
}

//$CFG ->wwwroot   = 'http://'.$subdomain.'.moodlemultisite.com';
//$CFG->rootcatid = $rootcatid;
//$CFG -> theme = $serversetup[$subdomain][1];
//}
/**** MULTI DOMAIN ****/

function get_domain($domain)
{
global $CFG;
mysql_connect($CFG->dbhost, $CFG->dbuser , $CFG->dbpass );
mysql_select_db($CFG->dbname);
$sql = "SELECT * FROM ".$CFG->prefix."subdomain WHERE status = '1' AND domain = '".mysql_real_escape_string($CFG->subdomain)."'";
$result = mysql_query($sql);
return mysql_fetch_array( $result );
}

?>

In reply to sam salt

Re: moodle theme stucked, new theme not working

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

Moving this to Instalation Problems as this is NOT theme related.

Thanks

Mary

In reply to Mary Evans

Re: moodle theme stucked, new theme not working

by sam salt -

hello mary,

I am once again here facing a problem, waht actually i want is that a block having no. of links on that for example let I have a block with city names on it,

I wana ask that is there any  existing plugin for that, or we have any option in moodle?

plz reply

regards

ashwani

In reply to Mary Evans

Re: moodle theme stucked, new theme not working

by Prashanth Akunuri -

Although your first method didn't help me, your tip to debug did help me. It was my typing mistake at 2 lines in the config.php of the theme (I was actually trying out the "create a theme" tutorial of moodle), so I can't really blame you. Thank you very much. 

In reply to sam salt

Re: moodle theme stucked, new theme not working

by Nelson Moller -

It is the customary behavior of Moodle: anything setted in config.php can not be overriden.

This is what you are trying to do.