News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Custom Copyright

Started by Dream Portal Team, August 04, 2008, 07:49:52 PM

Previous topic - Next topic

CPOMorty

Worked perfect.  Thanks again!

Murray

LinK187

Sorry I don't have time to read all 7 pages, but here's my error:

Quote
****   Today at 11:16:27 AM 
*.*.*.*     4a8b468c25a74ee90cf8f94dcc45b991 
http://****/forum/index.php?action=theme;sa=settings;th=5;sesc 
8: Undefined index: custom_copyright
File: /home/****/public_html/****/forum/Themes/default/Settings.template.php (eval?)
Line: 115

Bulakbol

Make sure that the following snippet of code was added to your default/Settings.template.php.
array(
'id' => 'custom_copyright',
'label' => $txt['custom_copyright'],
'description' => $txt['custom_copyright_desc'],
'type' => 'text',
),
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

LinK187

Quote from: Bulakbol on January 25, 2009, 08:32:01 PM
Make sure that the following snippet of code was added to your default/Settings.template.php.
array(
'id' => 'custom_copyright',
'label' => $txt['custom_copyright'],
'description' => $txt['custom_copyright_desc'],
'type' => 'text',
),


It's not there. At what line do I place it?

Bulakbol

According to the mod, you have to find
$context['theme_settings'] = array(
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),


and replace.
$context['theme_settings'] = array(
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),
array(
'id' => 'custom_copyright',
'label' => $txt['custom_copyright'],
'description' => $txt['custom_copyright_desc'],
'type' => 'text',
),
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

LinK187

Quote from: Bulakbol on January 26, 2009, 03:05:34 PM
According to the mod, you have to find
$context['theme_settings'] = array(
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),


and replace.
$context['theme_settings'] = array(
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),
array(
'id' => 'custom_copyright',
'label' => $txt['custom_copyright'],
'description' => $txt['custom_copyright_desc'],
'type' => 'text',
),


Actually sorry, my bad, the proper code was on that file the whole time, I must have missed it the first time.

Bulakbol

ah ok. Check also languages/Modifications.english.php for the txt string.
$txt['custom_copyright'] = 'Enter custom copyright:';
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

LinK187

Quote from: Bulakbol on January 26, 2009, 07:17:39 PM
ah ok. Check also languages/Modifications.english.php for the txt string.
$txt['custom_copyright'] = 'Enter custom copyright:';

it does exist.

Bulakbol

If you are still getting the undefined index error, then you are probably checking the wrong Settings.template.php. The only thing I can do is look at your Settings.template.php.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

LinK187

Quote from: Bulakbol on January 26, 2009, 08:25:44 PM
If you are still getting the undefined index error, then you are probably checking the wrong Settings.template.php. The only thing I can do is look at your Settings.template.php.

Here it is:

Bulakbol

Line 115 is this.
'label' => $txt['custom_copyright'],
so it is missing the txt string. If that string is already in your languages/Modifications.english.php, then try adding that string in languages/Settings.english.php.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

LinK187

Quote from: Bulakbol on January 26, 2009, 08:49:08 PM
Line 115 is this.
'label' => $txt['custom_copyright'],
so it is missing the txt string. If that string is already in your languages/Modifications.english.php, then try adding that string in languages/Settings.english.php.

Could you be specific: "Find select" "replace/before/after select" :P

Bulakbol

Hmnn, I thought everyone knows that txt strings are added at the end of a language file before the php closing tag (?>). :)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

LinK187

Quote from: Bulakbol on January 26, 2009, 08:56:09 PM
Hmnn, I thought everyone knows that txt strings are added at the end of a language file before the php closing tag (?>). :)

I'm also stoned. lol :P

Word Life

I did what you said for Custom Themes. I have SMF 2B4, and I did that thing because I have a custom thing, and it Didn't work. When I switch to the defaul theme, it works, but when I switch to the Custom Theme, I see no box to type my Custom Copyright. Whats wrong?

Pics: Default Theme:
        Custom Theme:
Some people say no, some people say yes, I thought if this in like 5 seconds so say yes. :D

Bulakbol

You have to edit your custom theme's Setting.template.php.
Quote
According to the mod, you have to find
$context['theme_settings'] = array(
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),


and replace.
$context['theme_settings'] = array(
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),
array(
'id' => 'custom_copyright',
'label' => $txt['custom_copyright'],
'description' => $txt['custom_copyright_desc'],
'type' => 'text',
),

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Word Life

How do I edit my Settings.template.php...? It won't let me, only the index.template.php
Some people say no, some people say yes, I thought if this in like 5 seconds so say yes. :D

Bulakbol

Use FTP program to download Settings.template.php to your PC, edit it and then upload it back.

How do I use FTP? / What is FTP?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Word Life

#138
Thanks. (Hopefully)

::EDIT:: I don't know where to download the Settings.Template.Php
Some people say no, some people say yes, I thought if this in like 5 seconds so say yes. :D

Bulakbol

Themes/{your_custom_theme}/Settings.template.php.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Advertisement: