Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: gecitli on March 01, 2019, 05:51:17 AM

Title: Looking for help
Post by: gecitli on March 01, 2019, 05:51:17 AM
Hello, I am redirecting to the subject opened with this code gives error.
SMF 2.1 RC1
<button type="button" class="close">
<a href="', $board['last_post']['href'], '">
<i class="fas fa-chevron-right t-muted" aria-hidden="true"></i>
</a>
</button></div>';


Quoteroot
Today at 10:47 am
::1
5f8a0f44c22df7020414bd832185863f
Type of error: General
8: Array to string conversion
http://localhost/ozel/index.php?
D:/xampp/htdocs/ozel/Themes/Gray/BoardIndex.template.php (Line 124)

root
Today at 10:47 am
::1
5f8a0f44c22df7020414bd832185863f
Type of error: Undefined
8: Undefined index: last_post
http://localhost/ozel/index.php?
D:/xampp/htdocs/ozel/Themes/Gray/BoardIndex.template.php (Line 124)

Title: Re: Looking for help
Post by: WebSwinger on March 02, 2019, 05:43:43 PM
It looks to me like the theme you are using has problems supporting SMF 2.1. Try visiting your forum and then put ?theme=1 on the end of your URL and see if you still get those errors. If so (which I doubt) then you should post this in SMF 2.1 support so it can get addressed by the developers.
Title: Re: Looking for help
Post by: Arantor on March 03, 2019, 01:59:56 AM
Given that the OP makes themes, it's not particularly surprising to encounter things broken along the way.

Where exactly did you try to add that code? There's several things wrong with it, from the fact you're trying to put an a tag inside a button tag, but more than that, $board doesn't contain the last details wherever you're trying to use it.

Where are you trying to use that code?