News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

$context['html_headers']; where is that generated

Started by GeofreyBiggins, May 11, 2016, 06:17:06 AM

Previous topic - Next topic

GeofreyBiggins

Hi,
We've had to change domain names and after doing so it was mostly working fine until i've just noticed that the editor scripts are not using the new url and hence failing to load.

I can't find where they are picking up the old address from. I've edited the settings.php file and even looked in the raw tables for the old url but it's not changed it.

It should be outputting here

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0" />';

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];

echo '
</head>
<body>';
}


Where the $context['html_headers']; is the editor code link etc. I can't find where this is coming from and why it is still using the old url. Edit- this is from index.template.php in my theme i created.

any ideas?

thansk



Illori

did you reset the theme paths and URLs? $context['html_headers'] can be found in many places, it is not a one place fits all solution ,mods use it.

can you provide a link to your forum where the issue is? if we see it maybe we can tell you how to fix it.

you should have used repair_settings.php to fix your paths and URLs. What is repair_settings.php?

GeofreyBiggins

thanks for that i'll have a look at repair_settings now. I would provide a link but it's being used for an internal intranet so it's not visible to the outside world.
Annoyingly had to change it quickly as our IT dept decided to change it for some reason as they couldn't get the old address to work anymore???

Deprecated

Then call the IT department and ask them to unchange it.

$context[] is one of the backbones of SMF. It is literally all over. You may laugh but when I need to find something I have a local directory with SMF source and I open the Sources directory and select all, then open with Notepad++. That's about a hundred files? Then open search and enter $context['html_headers'] and search all files. Note which ones it pops up in.

You understand the architecture, yeah? You got all the driver files in Sources that calculate all the data, then they pass that data to the template files. $context[] is one of the major ways to pass data down to the templates.

Also you can put a debug statement in your template echo "<!--", print_r($context), "-->"; then look at page source.

Advertisement: