Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

PHP Help!

Status
Not open for further replies.
Joined
Dec 15, 2005
Posts
1,782
Reaction score
66
Thanks to grant the problem with the button is identified the problem now is fixing it.

Here's the code for the menu buttons.

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

echo '<div id="tabs6">';
echo '<ul><li><a href="', $scripturl, '"><span>'.$txt[103].'</span></a></li>';
echo '<li><a href="', $scripturl, '?action=help" ><span>', $txt[119], '</span></a></li>';

// How about the [search] button?
if ($context['allow_search'])
echo '<li><a href="', $scripturl, '?action=search"><span>', $txt[182] , '</span></a></li>';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin']){
echo '<li><a href="', $scripturl, '?action=admin"><span>', $txt[2], '</span></a></li>';
}

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a href="', $scripturl, '?action=profile"><span>', $txt[467], '</span></a></li>';

// The [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar"><span>', $txt['calendar24'], '</span></a></li>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'], '</span></a></li>';


the highlighted value is not retrieving the text for the button so the button is not showing properly(see post http://www.acorndomains.co.uk/website-design/10205-smf-help.html)

all the other $txt values retrieve the relevant text for their corrosponding button.

I have been tryin 8 hours to fix this, i like a challenge but it's getting rediculous!!

Please help:???:
 
D

Not sure this is your answer but:

Should their be a _ underscore? 'pm_short' or sould it be 'pmshort'...

Also does the request match the thing your wanting it to look for?
 
Thankd DN but not that, it's funny all the other $txt values have a number that triggers text, but this one has text, if i replace the [pm_short] with one of the number in the other $txt commands it works but with that buttons text.

Where are the numbers retrieving the text from!!!!:confused:
 
D

Okey dokey

Possibly the space in code line:

<li><a href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'], '</span></a></li>';

Possibly should be:

<li><a href="', $scripturl, '?action=pm"><span>', $txt['pm_short'],'</span></a></li>';

Between:

"><span>'and, $txt['pm_short'],

('and' being the space)
 
Last edited:
Den, your first option is just to hard code the text in there in place of the variable. Did you search all your files for pm_short as I suggested, that should highlight the area where the variable is being given its value whicj I guess is currently set to "".

Grant
 
Just read your other bit....

Also check your images for the actual gif too... maybe the gif is a different number as you appear to have them numbered and it works but shows a different gif when you use numbers... (make sense?)

IF NOT, least I tried, sure someone will be along to answer it...
 
in template_menu() after your global line place this:

print_r($txt);

Then post what the output is... It'll be something like:

Array (
...
...
)

Jee
 
Also, do you have the PM function turned on for logged in users?

Grant
 
Right Den, these values are defined in :

Themes/default (*or maybe your theme name here instead*)/languages/index.english.php

There are a load of files in the languages folder so it may be in another one. If the pm_short value isnt in there you just need to add it in yourself and set it to eqaul 'PM' or whatever.

Grant
 
Right Den, these values are defined in :

Themes/default (*or maybe your theme name here instead*)/languages/index.english.php

There are a load of files in the languages folder so it may be in another one. If the pm_short value isnt in there you just need to add it in yourself and set it to eqaul 'PM' or whatever.

Grant


Cheers grant but this is the only thing in the languages folder
<?php
// Version: 1.1 RC3; Settings

$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'Black Rain by crip<br /><br />Thanks to Mr. Bloc and the SMF team! ';

?>
 
Do you have the themes/default/languages folder on there, that should have loads of files in it containing stuff like this:

$txt['newmessages0'] = 'is new';
$txt['newmessages1'] = 'are new';
$txt['newmessages3'] = 'New';
$txt['newmessages4'] = ',';

$txt[2] = 'Admin';

$txt[10] = 'Save';

$txt[17] = 'Modify';
$txt[18] = $context['forum_name'] . ' - Index';
$txt[19] = 'Members';
$txt[20] = 'Board name';
$txt[21] = 'Posts';
$txt[22] = 'Last post';

$txt[24] = '(No subject)';
$txt[26] = 'Posts';
$txt[27] = 'View Profile';
$txt[28] = 'Guest';
$txt[29] = 'Author';
$txt[30] = 'on';
$txt[31] = 'Remove';
$txt[33] = 'Start new topic';

$txt[34] = 'Login';
$txt[35] = 'Username';
$txt[36] = 'Password';

$txt[40] = 'That username does not exist.';

$txt[62] = 'Board Moderator';
$txt[63] = 'Remove Topic';
$txt[64] = 'Topics';
$txt[66] = 'Modify message';
$txt[68] = 'Name';
$txt[69] = 'Email';
$txt[70] = 'Subject';
$txt[72] = 'Message';

Grant
 
Wahoo!

Thanks Grant!:D :D :D :D

I never looked in that file as i am not using the default theme, but my new theme is set as default, so i guess i am.

The value was not in the file so i just added it and it worked!

You have just saved me another frustrating day tommorrow and probably my eyesight and monitor!

Rep Added!

Thanks to everybody who tried to help!
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom