News:

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

Main Menu

Aligned and Bilateral Child Boards

Started by hhy89, March 23, 2009, 02:53:18 PM

Previous topic - Next topic

Amoreitalia


dwd2000

Quote from: Amoreitalia on April 01, 2009, 08:44:11 PM
Quote from: Antechinus on March 31, 2009, 08:04:00 AM
Those need to be edited in MessageIndex.template.php, not BoardIndex.template.php. The code is much the same, it's just in another template.

I could use some help.. i did as you said and put it manually in the MessageIndex.template.php file. It works perfectly, However now im getting an error reading:

8: Undefined index: viewer_text
Line 69.

I know its because of me adding this mod manually. maybe i missplaced something? This is my only error in all of my forums i hope you can help me =(

Attach your MessageIndex.template.php file.
Are you using the default theme?
I have an extra mod mixed with my MessageIndex.template.php file. (Images on Board)
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Amoreitalia

hey dwd i was going to try to get ahold of you last night on yoru forums but didnt have time.

i manually edited that index page like you had to. but im getting that error now and dont know how to fix it. What do you need from me? a code link of that whole section?

im not using the default theme.

dwd2000

Quote from: Amoreitalia on April 01, 2009, 11:57:08 PM
hey dwd i was going to try to get ahold of you last night on yoru forums but didnt have time.

i manually edited that index page like you had to. but im getting that error now and dont know how to fix it. What do you need from me? a code link of that whole section?

im not using the default theme.

Attach your MessageIndex.template.php to a reply to this message.
Look for "Additional Options" at the bottom left on the "Reply" page.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games


dwd2000

30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Amoreitalia

ok awesome. i appreciate it.  :D I Hope i can get rid of that error lol. like i said before it works perfect for my grandchild boards lol. but throws up that error.

dwd2000

Quote$child['viewer_text']

This is part of the code that you installed, as per the instructions, which is in this part:

Quoteforeach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts']. $child['viewer_text'] . ')">' . $child['name'] . '</a>';

All this means is that viewer_text has not been defined. I can't find it mentioned anywhere else on the page.

It is possible that it was erased somehow, defined somewhere else in another file, or not included in your theme.

Check your version of the default theme and see if it is defined in its MessageIndex.template.php.

I've been using SMF 2x for a few months now and I'm concentrating on learning that system.

Personally, if it is working, don't worry about it so much. If you have time, search the SMF 1.1.8 support boards for exact error and see what shows up.

30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Amoreitalia

uh oh i think the problem is i added that to the default theme...

should i have done the mod on my php file in my actual custom theme?

dwd2000

Quote from: Amoreitalia on April 02, 2009, 02:54:10 AM
uh oh i think the problem is i added that to the default theme...

should i have done the mod on my php file in my actual custom theme?

I would think you would have to install it on every theme you use, unless the new theme reverts to the default. To be safe, I would install it on every theme you use.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Amoreitalia

but then again its all worked so far... i only have like 4 0r 5 simple mods. ive always added it to the default theme and it works just fine. thats the first time i tried altering another area.

Id liek to ignore it but every user that goes to that certain section gets like 2 or 3 errors each time. Kinda annoying. What can you recommend oh wise one? lol

i also didnt back that file up... so im kinda pissed at that..

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

dwd2000

#52
Quote from: LexArma on April 02, 2009, 10:39:38 AM
Just my 2 cents on this issue here

Thanks.
It looks like that part can be taken out.

Quotein ./Themes/default/MessageIndex.template.php I would try finding this

Code: [Select]
$txt[21] . ': ' . $child['posts']. $child['viewer_text'] . ')">' . $child['name']

and changing it to this

Code: [Select]
$txt[21] . ': ' . $child['posts']. ')">' . $child['name']
But I can't promise you it will work, so if you didn't backup already - then atleast take a copy of the file now, before trying.

30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Aleksi "Lex" Kilpinen

That seemed to solve Amoreitalia's problem at least, and yeah, I actually missed the fact that the edit wasn't in boardindex.php afterall, but messageindex.php instead, but Amoreitalia pointed that out, and the same solution seemed to work still. :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

dwd2000

#54
Quote from: LexArma on April 02, 2009, 11:52:37 AM
That seemed to solve Amoreitalia's problem at least, and yeah, I actually missed the fact that the edit wasn't in boardindex.php afterall, but messageindex.php instead, but Amoreitalia pointed that out, and the same solution seemed to work still. :)

I just read through it very quickly, and I missed that. (not in BoardIndex.php)  :-[
I was getting ready for work.

I have modified the above post to show MessageIndex.template.php, not BoardIndex.template.php
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Aleksi "Lex" Kilpinen

#55
I'm not sure about the boardindex, as this time the error came up from messageindex only...

EDIT to add:

I went through all my theme files, and not a single hit when I searched for the $child['viewer_text']  in them, so I'm pretty confident it is not needed, nor does it belong to the 1.1.8 code at all.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

dwd2000

I think hhy89 has enough info here to put together an updated version.
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

hhy89

Version: 1.2 Date 2009-04-03
Compatibility: SMF 2.0 RC1 & 1.1.x
*Add MessageIndex.template.php
Seo4Smf 2.0 - Full Top10 Stats(full top10) - Aligned and Bilateral Child Boards(2li 3lü alt bölümler)
http://www.smfmod.com
http://destek.smfmod.com

dwd2000

Quote from: hhy89 on April 03, 2009, 04:16:38 PM
Version: 1.2 Date 2009-04-03
Compatibility: SMF 2.0 RC1 & 1.1.x
*Add MessageIndex.template.php

;D
30 years ago I was young and foolish.
Now I'm just young.

DAMMIT JIM...I'M A TWEAKER...NOT A CODER!!!

Dave's Games

Aleksi "Lex" Kilpinen

There is still an error in the mod code.

Both in ./Themes/default/BoardIndex.template.php AND MessageIndex.template.php have an unnecessary $child['viewer_text'] in them.

I would suggest changing this

$txt[21] . ': ' . $child['posts']. $child['viewer_text'] . ')">' . $child['name']

to this

$txt[21] . ': ' . $child['posts']. ')">' . $child['name']

In both of them ;) (For 1.1.8 at least... )
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: