Uutiset:

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

Main Menu
Advertisement:

language? error using ssi.php

Aloittaja gupp, maaliskuu 31, 2010, 09:04:12 IP

« edellinen - seuraava »

gupp

I've been hand coding html for a long time but I'm totally lost in php. I'm trying to use ssi.php to start better incorporating smf into the rest of my web site. So I'm starting with my main web site page. I've set up a duplicate test page to try to work things out on it before I try to go live. It seems like it should work out right but I'm getting an error code at the top of the page.

Lainaa
Notice: Undefined index: lang_locale in /home/natur9/public_html/bb/Sources/Subs.php on line 865

Notice: Undefined index: lang_locale in /home/natur9/public_html/bb/Sources/Subs.php on line 865

Notice: Undefined index: lang_locale in /home/natur9/public_html/bb/Sources/Subs.php on line 865

Notice: Undefined index: lang_locale in /home/natur9/public_html/bb/Sources/Subs.php on line 865

Any idea what I should do here? The test page is here:
http://naturalaquariums.com/testdefault.php

gupp

Sorry I should have maybe explained more. I'm just trying to put the most recent posts from the forum on my main home page of my site right now.

Kays

Hi, which language are you using?

Look in index.{language}.php in the default theme folder. Do you see this or something similar towards the top.


$txt['lang_locale'] = 'en_US';

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gupp

English, and Yes, I found the line,  sorry it took me a minute to figure out where you meant.

Kays

That shouldn't be happening then.

Can you post the code you are using?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gupp

All I've done is added this code and then switched my page from html to php, added
Lainaa<?php require("bb/SSI.php"); ?>
at the top and
Lainaa<?php ssi_recentPosts(); ?>
to show the posts, otherwise I just changed my includes to php.

Could it be from using a changed theme. Would adding the
Lainaaindex.{language}.php
to the same place in the folder of the theme I'm using help in any way. Or is there some way my css would interfere in some way?

Kays

Yes, check to see if there's a index.english.php file in the languages for that theme. But normally the language files from the default theme are used.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gupp

There was no language folder in that theme. I added it but it doesn't seem to help. At least if you're stumped I don't feel quite so bad about not being able to figure it out myself. :)

Kays

I don't know why it's happening, But one way to clear the error is add that language string before the call to ssi_recentPosts.


<?php
$txt
['lang_locale'] = 'en_US';
ssi_recentPosts(); 
?>


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gupp

Amazingly that didn't work either. I may have to finish working on this project in the morning. I'm going to try to pair it down to a test page with nothing but the basic page, and the php require and recent posts and see what that does. At least that will pin it down to either something interfering in the page or something I've messed up somewhere along the way with changing the theme in smf. I can also try to see if changing to the original default theme might help too so at least maybe I can find where to start looking for the problem.

gupp

Sigh, well I tried simplifying it. I made a page

http://www.naturalaquariums.com/test.php

with nothing but this on it

Lainaa<?php require("bb/SSI.php"); ?>
<?php
$txt['lang_locale'] = 'en_US';
ssi_recentPosts();
?>

and this was the result

LainaaNotice: Undefined index: lang_locale in /home/natur9/public_html/bb/Sources/Subs.php on line 865

Notice: Undefined index: lang_locale in /home/natur9/public_html/bb/Sources/Subs.php on line 865

Notice: Undefined index: lang_locale in /home/natur9/public_html/bb/Sources/Subs.php on line 865

Notice: Undefined index: lang_locale in /home/natur9/public_html/bb/Sources/Subs.php on line 865
[Announcements]   Re: Another new Gallery Update by EMc/   Today at 07:13:29 PM
[The Think Tank/ DIY]   Re: Vintage 75 Gallon Metaframe Aquarium restoration by austinado16   Today at 01:52:42 PM
[Chitter/ Chatter]   Re: The Adventure of Merlin by gupp   Today at 01:15:17 PM
[The Think Tank/ DIY]   Re: Vintage 75 Gallon Metaframe Aquarium restoration by gupp   Today at 01:13:55 PM
[Announcements]   Re: Another new Gallery Update by gupp   Today at 01:06:02 PM
[The Think Tank/ DIY]   Re: Vintage 75 Gallon Metaframe Aquarium restoration by austinado16   Today at 01:03:08 PM
[Chitter/ Chatter]   Re: How to turn "water" into marbles by gupp   Today at 12:58:43 PM
[The Think Tank/ DIY]   Re: Vintage 75 Gallon Metaframe Aquarium restoration by gupp   Today at 12:56:21 PM

Not sure what's going on. Any other ideas of what to do next. I'm going to have to sleep a bit, getting late here, but I'll start working on it again in the morning.

Thanks,
Rhonda

gupp

I'm still getting the error message. Even in a totally cut down page. So it must be somewhere in my version of smf and what's happened to it. I don't even know where to start looking. Does anyone else have any ideas?

Kays

If you go to ssi_examples.php does it do it there?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

gupp


Kays

Can you attach SSI.php to a post?

I wonder if the problem is there.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Arantor

Holder of controversial views, all of which my own.


gupp

Thank you so much for your help. I hope you can find it.

Arantor

* Arantor wonders why, when it's calling for an error in Subs.php, everyone wants to look at an unrelated file...
Holder of controversial views, all of which my own.


MrPhil

Your SSI.php is identical to the one shipped with SMF 1.1.11 (and earlier). How about attaching your Sources/Subs.php file? Maybe that's been corrupted somehow, such that $txt is no longer global in the timeformat() function?

gupp

Subs.php. Hopefully it's in there.  Thank you everyone again!

Advertisement: