Errors after change theme

Started by MarkoKg, May 25, 2010, 02:14:11 PM

Previous topic - Next topic

MarkoKg

Hello there.
SMF version is 1.1.11
I have just installed new theme - Clean Blue, and set it as default.

I insert codes for all mods that i have installed to custom theme.
Now i have this error in error log when reading private messages.
Quote
8: Undefined index: can_report_moderator
Datoteka: /home/samoopu/public_html/forum/Themes/CleanBlue/PersonalMessage.template.php
Linija: 462

What is more...
Quote
8: Undefined variable: windowcss
Datoteka: /home/samoopu/public_html/forum/Themes/CleanBlue/PersonalMessage.template.php
Linija: 425

Quote
8: Undefined variable: windowcss
Datoteka: /home/samoopu/public_html/forum/Themes/CleanBlue/PersonalMessage.template.php
Linija: 366

Quote
8: Undefined index: can_view_profile
Datoteka: /home/samoopu/public_html/forum/Themes/CleanBlue/PersonalMessage.template.php
Linija: 359

Quote
8: Undefined index: current_topic
Datoteka: /home/samoopu/public_html/forum/Themes/CleanBlue/PersonalMessage.template.php
Linija: 319

Quote8: Undefined index: first_new
Datoteka: /home/samoopu/public_html/forum/Themes/CleanBlue/PersonalMessage.template.php
Linija: 256

I dont know how to fix this errors.
Can someone help me please?

Allusion

Which installed mod deals with personal messages?

MarkoKg

I have no mods installed that effects personal messages i belive.
I just installed Clean Blue theme on clean smf 1.1.11, and i have this errors too :/
I tried to add strings for can_report_moderator to modifications.english.php, but i still got error. Should i add it somewhere else?

In PersonalMesaage.template.php i have this code at line 462:

// Show the report.

if ($context['can_report_moderator'])

echo '

<a href="', $scripturl, '?action=reporttm;topic=', $context['current_topic'], '.', $message['counter'], ';msg=', $message['id'], '"><img src="' . $settings['images_url'] . '/buttons/rmoderator.gif" alt="' . $txt['rtm1'] . '" border="0" /></a>';



So, maybe i should change if ($context['can_report_moderator']) to some valid function? But i dont know which.

Regards.

Allusion

Can you post the link where you downloaded the theme?


Allusion

Those are issues with the Clean Blue theme. You should ask in the theme's support topic:
http://www.simplemachines.org/community/index.php?topic=253041.0

MarkoKg

Right, i posted problem there, but i dont think that someone will answer there.
I just wanna know if there is some strings missing, and where can i add them (in which file)?

Adish - (F.L.A.M.E.R)

Quote from: MarkoKg on May 27, 2010, 02:15:52 PM
Right, i posted problem there, but i dont think that someone will answer there.
I just wanna know if there is some strings missing, and where can i add them (in which file)?

Yup! Normally when it is Undefined variable: it means that language strings are missing.

MarkoKg

Ok, but where to add them in this case?

Adish - (F.L.A.M.E.R)

As you see it is related to PersonalMessage.template.php, the language strings should be missing in PersonalMessage.english.php under /Themes/CleanBlue/languages/

If it doesn't exist, then go to /Themes/default/languages/ and search for the language string. Here is some help with it: http://huw.org.uk/smfstrings/?version=1.1.x&language=english&filterfile=PersonalMessage.english.php

mashby

Another option is to delete the Themes/CleanBlue/PersonalMessage.template.php file altogether and let the default theme's file take over. The default theme's file will take on the look and feel of the Clean Blue theme.
Always be a little kinder than necessary.
- James M. Barrie

flapjack

Quote from: mashby on May 27, 2010, 10:21:23 PM
Another option is to delete the Themes/CleanBlue/PersonalMessage.template.php file altogether and let the default theme's file take over. The default theme's file will take on the look and feel of the Clean Blue theme.
thats not very clever to do. the fact that this file is there means it's been modified, and removing it might lead to different parts of the forum looking nothing alike

mashby

Interesting observation, but I have to say this. Themes/CleanBlue/PersonalMessage.template.php is a custom file. If it didn't exist, then Themes/default/PersonalMessage.template.php would take over and would still retain the display of the CleanBlue theme. Perhaps you need to understand the fundamental theming system of SMF before you start saying I'm not clever. While I'm not clever, I at least understand the basic principles of SMF theming.
Always be a little kinder than necessary.
- James M. Barrie

flapjack

if that would be as simple, we wouldnt be using custom themes, but only change the .css file, right? the fact that someone actually made an effort to create this file should tell you that changes introduced are rather more substantial than some styling changes, right? oh, and I've never said anything about you being not clever, have I? I simply pointed out that this is not the best way to go

mashby

Here's the simple truth.
Themes/CleanBlue/PersonalMessage.template.php is throwing errors.
Themes/default/PersonalMessage.template.php is very likely not (if it is, I'm sure there would be a lot of threads about it).

Which one would you choose to use?
Always be a little kinder than necessary.
- James M. Barrie

flapjack

I pointed out the simple truth in my previous reply. What you are trying to do is very shortsighted and will lead to more problems in long term. I am not saying it won't work. I am saying this is unproffesional and should be avoided.

mashby

I'll just have to be blunt here then. Using a custom theme is a very common practice but you have to understand the implications of doing so. You are relying on the theme's designer to understand and adhere to the coding of SMF (which obviously the author of CleanBlue didn't do). If anything, the author of the CleanBlue theme is shortsighted. Attempting to say my try is shortsighted is rather misguided and fundamentally flawed.

The underlying issue is with the theme's templates. They are flawed. Yes, the author could fix them (and should), but the author should never have gotten this theme in the system if it has flaws with it. What should be avoided is custom themes with flaws in them as this one seems to have.
Always be a little kinder than necessary.
- James M. Barrie

flapjack

You cannot seem to understand that I am talking about general principles, and keep pointing out that there's a flaw in this theme. I never said there isn't, what I'm saying is your suggestion of how to fix it is unproffesional, regardless of the fact whether it will help in that case or not. Can't you understand that? I am not going to argue with you any further, you are wrong and don't want to admit that.

OP: if you will not fix it by tommorow, I will look into it, need to go now.

mashby

I'm not sure how you are a Beta Tester and cannot understand the basic principles of theming. It's unprofessional to release a theme with flaws in it. I'm not entirely sure you understand that simple fact. You are very combative and not entirely helpful. I'm sure you'll continue to argue with me and not offer any fixes. I've at least offered a simple fix. Delete a flawed file.
Always be a little kinder than necessary.
- James M. Barrie

Niall Ramar

Here is a link to a thread that contains the updated files that you can upload to fix this problem.

http://www.simplemachines.org/community/index.php?topic=396445.0

Advertisement: