News:

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

Main Menu

Mod text

Started by botty1963, December 18, 2013, 05:41:36 PM

Previous topic - Next topic

botty1963

I've just been installing a few mods in one of my forums as a test, and notice that strings of text appear at the top of the page, and in addition the board text increases in size. How can I remove these annoyances? http://yorkshirerugby.net/index.php

Arantor

That sounds like you have a damaged Themes/default/languages/Modifications.english.php file - check that there is only one ?> in the file and it is at the end of the file.

botty1963

#2
There were 2 files, one had a tilde at the end. I've deleted that one and the problem is still the same. The test shown is as below and is all linked to the mods that I installed.

$txt['pm_popup'] = 'You have new PMs'; $txt['pm_popup_close'] = 'Close'; $txt['costa_topico_fixo'] = 'Sticky Topics'; $txt['costa_topico_normal'] = 'Normal Topics'; $txt['date_registered'] = 'Join Date'; $txt['display_join_date'] = 'Show join date in topic view:'; // OneAll Social Login (https://docs.oneall.com/plugins/) $txt['oasl_title'] = 'OneAll Social Login'; $txt['oasl_config'] = 'Configuration'; $txt['oasl_settings_descr'] = 'OneAll Social Login Settings'; $txt['oasl_user_does_not_exist'] = "This social network has not yet been linked to an account.

Please use the registration form to create a new account. If you already have an account, open your profile settings to connect the social network to it.";    $txt['pm_popup'] = 'You have new PMs'; $txt['pm_popup_close'] = 'Close'; $txt['costa_topico_fixo'] = 'Sticky Topics'; $txt['costa_topico_normal'] = 'Normal Topics'; $txt['date_registered'] = 'Join Date'; $txt['display_join_date'] = 'Show join date in topic view:';

margarett

You seems to have missed what Arantor said...

The file with the tilde is an automatic backup made by SMF when you installed a MOD. So, you deleted a backup file, it's quite normal that nothing changed because that file isn't really used for anything :P

As for what Arantor said, a PHP file has an opening tag:

<?php

and a closing tag:

?>

So check that your file has only one of each (or that it doesn't miss any of them)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

kat

The one with a tilde was a backup...

As Arantor said, make sure there's a line, at the top, which is this and JUST this:

<?php

Make sure, too, that this only exists once.

It might just be worth checking that you have this, as the last line, too:

?>

Ninjad by the weirdly named one! :P

botty1963

Ah, see what you mean. It is:

<?php
// Version: 2.0; Modifications

$txt['botscout_mail_subject'] = 'Bot Attempt Stopped';
$txt['botscout_mail_body'] = 'A bot tried to register, but was stopped from doing so.' . "\n\n" . 'Bot Name: %s' . "\n" . 'Bot Email: %s' . "\n" . 'IP Address: %s';

$txt['display_facebook_like'] = 'Show Facebook like icon in posts';
$txt['display_facebook_like_all'] = 'Show Facebook Like icon in all posts, Note Display Facebook Like has to be checked.';

$txt['tweet_this']               = 'Tweet';
$txt['display_twitter_tweet']       = 'Show the Twitter Tweet button in posts?';
$txt['display_twitter_tweet_all']    = 'Show the Twitter Tweet button in all posts, note the Show Twitter Tweet Button has to be enabled';

$txt['whois_ip2location'] = '<b>IP 2 Location (all regions)</b>';
$txt['display_google_plus']    = 'Show google plus icon in posts';
$txt['display_google_plus_all'] = 'Show google plus icon in all posts, Note Display Google Plus has to be checked.';

$txt['display_google_plus']    = 'Show google plus icon in posts';
$txt['display_google_plus_all'] = 'Show google plus icon in all posts, Note Display Google Plus has to be checked.';

?>

margarett

Is that Modifications.english.php? It doesn't have the strings that show up in your forum...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

botty1963


kat

Can you tell us which mods you've installed?

We might get some clues, then.

You have some social networking thing. Which one, along with which others?

It might help, too, if you can attach that file, just to be sure, coz that mod definitely adds that part about the registration form to that file.

Kays

Hi, file_check.php should be able to identify the language file in question.

What is file_check.php?

But just for the heck of it, do check the index.english.php file first. Since that's the next likely file it would be happening in.

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

botty1963

Still struggling with this. I have uninstalled all the mods that I had installed and deleted them completely. However, I still get some random text displaying at the top of the page relating to a couple of the mods that I did have installed, and the font size of the boards is still displaying at the increased size http://yorkshirerugby.net/index.php

Kindred

and we told you what the problem was!   It is still the same problem.
  the ?> is included somewhere other than the very end of the file in your language file(s) (probably modifications.english.php)

and what do you mean by "font size of the boards"?  You need to be very specific when you point to a page.
Specifically WHICH text do you feel is too large?
If you mean the board description text (under the board title, above the moderators' names) then that is because something has over-powered the standard "body" text definition.  It might be solved by fixing the text issue...   or you might have something else which is screwing up your CSS.


Basically, it looks like - when you uninstalled the mods, you ignored several errors.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

The text that shouldn't be there forces everything else to get bigger.

But the problem does indeed remain: there's still a rogue ?> in the file, and uninstalling mods would not actually have fixed that.

botty1963

Quote from: Kindred on January 05, 2014, 11:15:38 AM
  the ?> is included somewhere other than the very end of the file in your language file(s) (probably modifications.english.php)

and what do you mean by "font size of the boards"?  You need to be very specific when you point to a page.
Specifically WHICH text do you feel is too large?

There are 3 language files relating to english: Modifications.english.php Modifications.english-utf8.php Modifications.english_british-utf8.php

For each one the ?> is at the end of the file and nowhere else in it.

The Modifications.english.php is as below:

// Version: 2.0; Modifications
$txt['botscout_mail_subject'] = 'Bot Attempt Stopped';
$txt['botscout_mail_body'] = 'A bot tried to register, but was stopped from doing so.' . "\n\n" . 'Bot Name: %s' . "\n" . 'Bot Email: %s' . "\n" . 'IP Address: %s';

$txt['display_facebook_like'] = 'Show Facebook like icon in posts';
$txt['display_facebook_like_all'] = 'Show Facebook Like icon in all posts, Note Display Facebook Like has to be checked.';

$txt['tweet_this']               = 'Tweet';
$txt['display_twitter_tweet']       = 'Show the Twitter Tweet button in posts?';
$txt['display_twitter_tweet_all']    = 'Show the Twitter Tweet button in all posts, note the Show Twitter Tweet Button has to be enabled';

$txt['whois_ip2location'] = '<b>IP 2 Location (all regions)</b>';
$txt['display_google_plus']    = 'Show google plus icon in posts';
$txt['display_google_plus_all'] = 'Show google plus icon in all posts, Note Display Google Plus has to be checked.';

$txt['display_google_plus']    = 'Show google plus icon in posts';
$txt['display_google_plus_all'] = 'Show google plus icon in all posts, Note Display Google Plus has to be checked.';
?>


With reference to the text size, if you look at the front page of the forum, the text size in each category > League Rugby/General Rugby/General Chat is larger than the rest of the page, ie Recent Posts/Forum Stats/Users online. Before I installed the mods that started the problem, the font size across the whole of the forum was the same as Posts/Forum Stats/Users.

Arantor

So what about the Modifications.english-utf8.php file?

margarett

No opening
<?php
?

Modifications is usually the culprit, but it might not be the case here (the file pointed by Arantor or other). Search for the files where the strings that show up are:

$txt['pm_popup'] = 'You have new PMs'; $txt['pm_popup_close'] = 'Close';$txt['costa_topico_fixo'] = 'Sticky Topics'; $txt['costa_topico_normal'] = 'Normal Topics';

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

Also, if you have truly uninstalled all mods - then the modifications.english.php file(s) should essentially be empty  --- with only the opening <?php a comment line and the closing ?>
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

botty1963

Quote from: Kindred on January 06, 2014, 12:14:23 PM
Also, if you have truly uninstalled all mods - then the modifications.english.php file(s) should essentially be empty  --- with only the opening <?php a comment line and the closing ?>

The original mods are still installed, they have worked ok for many months and not not have any negative effect on the forum. They are:

1.   Anti Bot: Are You Human/Bot?    3.0             [ Uninstall ] [ List Files ] [ Delete ]
2.   SMF 1.1.19 / 2.0.6 Update    1.0             [ Uninstall ] [ List Files ] [ Delete ]
3.   SMF 2.0.4 Update    1.0                                                [ List Files ] [ Delete ]
4.   Simple Image Upload    1.1.0                     [ Uninstall ] [ List Files ] [ Delete ]
5.   SMF 2.0.2 Update    1.0                                                [ List Files ] [ Delete ]
6.   RSS Feed Icon    1.1                                     [ Uninstall ] [ List Files ] [ Delete ]
7.   Tapatalk SMF 2.0 RC5/Final Plugin    3.9.1     [ Uninstall ] [ List Files ] [ Delete ]
8.   SMF 2.0.5 Update    1.0                                                [ List Files ] [ Delete ]
9.   SMF 2.0.3 Update    1.0                                                     [ List Files ] [ Delete ]

The Modifications.english-utf8.php file has the same content as the Modifications.english.php file.

I'll have a search for the strings that are showing at the top of the page.

Kindred

Well, from the strings in your modifications.english.php file

you had a facebook mod installed - this did not uninstall
you had a twitter mod installed - this did not uninstall
you had a google plus mod installed TWICE - this did not uninstall

From the error displaying at the top of your screens.
you had some mod referenced by costa_topico... installed - this did not uninstall from whatever file it got put into...   and this is the file that is causing your problems.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Storman™


Arantor

Anti Bot is a well known cause of this.

botty1963

Quote from: Kindred on January 06, 2014, 03:31:32 PM
Well, from the strings in your modifications.english.php file

you had a facebook mod installed - this did not uninstall
you had a twitter mod installed - this did not uninstall
you had a google plus mod installed TWICE - this did not uninstall

From the error displaying at the top of your screens.
you had some mod referenced by costa_topico... installed - this did not uninstall from whatever file it got put into...   and this is the file that is causing your problems.

I uninstalled the FB/Twitter/Google Plus mods which no longer show in the list of Mods, yet the buttons still appear in the individual posts; and if you click on them they work???

And yes the 'Costa' will be from the Separate Sticky's as that was a Mod that I installed and then uninstalled once I started having this problem.

I ran a search in my cPanel File Manager for the strings of text (and partial strings) and searched 'All Your Files', 'only public_html' and 'Current Directory' and it came up with nothing. I'm assuming that the search looks at the text in files and not just file names, but I'm no expert (as you've probably gathered) so it may not.

Storman™

Check:

/Themes/default/MessageIndex.template.php

and see if all this code exists:

$stickybar = false;
$normalbar = false;
foreach ($context['topics'] as $topic)
{
if ($topic['is_sticky'] && !$stickybar)
{
echo '
<tr class="titlebg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong>', $txt['costa_topico_fixo'], '</strong>
</td>
</tr>
';
$stickybar = true;
}
elseif (!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo '
<tr class="titlebg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong>', $txt['costa_topico_normal'], '</strong>
</td>
</tr>
';
$normalbar = true;
}


If it does then remove it and replace with:

foreach ($context['topics'] as $topic)
{



...or post the file here as an attachment and we'll check it  ;)

Kindred

which adds to modifications.english AND modifcations.engligh-utf8
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

botty1963

Quote from: Storman™ on January 06, 2014, 03:52:30 PM
Check:

/Themes/default/MessageIndex.template.php

and see if all this code exists:

$stickybar = false;
$normalbar = false;
foreach ($context['topics'] as $topic)
{
if ($topic['is_sticky'] && !$stickybar)
{
echo '
<tr class="titlebg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong>', $txt['costa_topico_fixo'], '</strong>
</td>
</tr>
';
$stickybar = true;
}
elseif (!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo '
<tr class="titlebg">
<td colspan="', empty($options['display_quick_mod']) ? '7' : '8', '">
<strong>', $txt['costa_topico_normal'], '</strong>
</td>
</tr>
';
$normalbar = true;
}


If it does then remove it and replace with:

foreach ($context['topics'] as $topic)
{



...or post the file here as an attachment and we'll check it  ;)

I can't find it in the file so here it is :)

margarett

With that amount of uninstalled-but-not-really mods, I would advise you to at least consider the chance to start with fresh files and reinstall your themes and mods after. You shouldn't loose any data
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

botty1963

How do you means "start with fresh files?"

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: