Screwy   10-03-2024, 06:03 PM
#1
When I activate the theme and enter the site, it gives an http 500 error. What is the reason?
Matty   10-03-2024, 06:07 PM
#2
Hi Screwy,

Go into Admin CP > Templates & Style > Templates > (select theme) > Navigation Templates > nav

Find this code:
PHP Code:
<if $_SERVER['REQUEST_URI'] != '/' then>
<
div class="navigation">
{
$nav}{$activesep}{$activebit}
</
div>
</if> 

And replace with this:
Code:
<div class="navigation">
{$nav}{$activesep}{$activebit}
</div>

It's an error I made in the previous version but I haven't been able to release a patch for it yet.
Hazel   10-03-2024, 10:22 PM
#3
(10-03-2024, 06:07 PM)Matty Wrote: Hi Screwy,

Go into Admin CP > Templates & Style > Templates > (select theme) > Navigation Templates > nav

Find this code:
PHP Code:
<if $_SERVER['REQUEST_URI'] != '/' then>
<
div class="navigation">
{
$nav}{$activesep}{$activebit}
</
div>
</if> 

And replace with this:
Code:
<div class="navigation">
{$nav}{$activesep}{$activebit}
</div>

It's an error I made in the previous version but I haven't been able to release a patch for it yet.

Do you need a plugin or a higher PHP version to use PHP syntax and variables in MyBB themes?
Matty   10-03-2024, 10:33 PM
#4
You can do it without a plugin but it was an erroneous copy and paste from another project I was working on.

You can also use Template Conditionals as well.
Hazel   11-03-2024, 09:45 AM
#5
Hmm interesting. I couldn't use themes that used these features on my forum, I had to delete these tags or else the forum would break.
Matty   11-03-2024, 01:52 PM
#6
It’s definitely not ideal to use conditionals but if it’s for your own site it can be great for customization.
  
Users browsing this thread: 1 Guest(s)
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by Curves UI.