TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 201
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 109
  • Total: 109

Cannot open the smilies pop-up, in shoutbox. I get the following code....

Started by Deadairdave, October 22, 2009, 12:45:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Deadairdave

Hi,

I posted the following over on the SMF forums this afternoon; and in part managed to solve the topic/post issue:

QuoteHi, this is concerning me a little.

I went to my forum this morning and was faced with the following:



and every new topic or replying to the topic shows the following:



Does anyone know how I go about removing the above code; and restoring the smilies pop-up box, please?  I have no idea where to look to locate the code, if it can be removed.

I tried looking at google before posting here; and was left with a bucket load of forums all showing the same code attached to their smilie sections.

Someone on Joomla posted that it was affecting them, but had something to do with SMF.

Any help would be apprreciated, as I've locked down my forums in maintenance mode until the matter is resolved.

Dave.

.....The problem I have is locating the code to restore the shoutbox.  Can anyone point me in the right direction, please??

An SMF member told me to look for the following code in 'post.template.php' to resolve the topic/post issue, which it did:

// Now start printing all of the smileys.
if (!empty($context['smileys']['postform']))
{
echo '
<tr>
<td align="right"></td>
<td valign="middle">';

// Show each row of smileys ;).
foreach ($context['smileys']['postform'] as $smiley_row)
{
foreach ($smiley_row['smileys'] as $smiley)
echo '
<a href="javascript:void(0);" onclick="replaceText(\' ', $smiley['code'], '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;"><img src="', $settings['smileys_url'], '/', $smiley['filename'], '" align="bottom" alt="', $smiley['description'], '" title="', $smiley['description'], '" /></a>';

// If this isn't the last row, show a break.
if (empty($smiley_row['last']))
echo '<br />';
}

// If the smileys popup is to be shown... show it!
if (!empty($context['smileys']['popup']))
echo '
<a href="javascript:moreSmileys();">[', $txt['more_smileys'], ']</a>';

echo '
</td>
</tr>';
}

// If there are additional smileys then ensure we provide the javascript for them.
if (!empty($context['smileys']['popup']))
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smileys = [';

foreach ($context['smileys']['popup'] as $smiley_row)
{
echo '
[';
foreach ($smiley_row['smileys'] as $smiley)
{
echo '
["', $smiley['code'], '","', $smiley['filename'], '","', $smiley['js_description'], '"]';
if (empty($smiley['last']))
echo ',';
}

echo ']';
if (empty($smiley_row['last']))
echo ',';
}

echo '];
var smileyPopupWindow;

function moreSmileys()
{
var row, i;

if (smileyPopupWindow)
smileyPopupWindow.close();

smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes");
smileyPopupWindow.document.write(\'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\');
smileyPopupWindow.document.write(\'\n\t<head>\n\t\t<title>', $txt['more_smileys_title'], '</title>\n\t\t<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css" />\n\t</head>\');
smileyPopupWindow.document.write(\'\n\t<body style="margin: 1ex;">\n\t\t<table width="100%" cellpadding="5" cellspacing="0" border="0" class="tborder">\n\t\t\t<tr class="titlebg"><td align="left">', $txt['more_smileys_pick'], '</td></tr>\n\t\t\t<tr class="windowbg"><td align="left">\');

for (row = 0; row < smileys.length; row++)
{
for (i = 0; i < smileys[row].length; i++)
{
smileys[row][i][2] = smileys[row][i][2].replace(/"/g, \'&quot;\');
smileyPopupWindow.document.write(\'<a href="javascript:void(0);" onclick="window.opener.replaceText(&quot; \' + smileys[row][i][0] + \'&quot;, window.opener.document.forms.', $context['post_form'], '.', $context['post_box_name'], '); window.focus(); return false;"><img src="', $settings['smileys_url'], '/\' + smileys[row][i][1] + \'" alt="\' + smileys[row][i][2] + \'" title="\' + smileys[row][i][2] + \'" style="padding: 4px;" border="0" /></a> \');
}
smileyPopupWindow.document.write("<br />");
}

smileyPopupWindow.document.write(\'</td></tr>\n\t\t\t<tr><td align="center" class="windowbg"><a href="javascript:window.close();\\">', $txt['more_smileys_close_window'], '</a></td></tr>\n\t\t</table>\n\t</body>\n</html>\');
smileyPopupWindow.document.close();
}
// ]]></script>';
}


Where do I go from here to correct the issue, please?

I'm currently using SMF 1.1.10 and TP version 1.0 beta 3.  I tried beta 4 when released, but ran into a few problems, I think with my mods installed and reverted back to beta 3. 

Dave.

ZarPrime

Dave,

This code is located in 2 files so you will have to check both ...
TPShout.php
TPSubs.php

More important than finding that code and correcting it though is to determine why it happened.  Did you install any new SMF Mods or make any new TP Articles or Blocks that could possibly have bad code in them that could be causing the issue?  What did you do to your Forum just before this happened?  Is it doing this in the default SMF theme or in a custom theme?  It looks like the default theme but I can't be sure.  It seems that something has changed the code, and a new Mod could very well have done that.

Let us know what happens and, in the future, Please Read and Follow the Posting Guidelines when starting a new topic.  It will help use to help you faster.

ZarPrime

Deadairdave

Sorry ZarPrime, not posted here for a while, didn't notice the cut and paste template.  I'm sat in work at the moment, so will have a look at the files you have listed when I get home.

In the meantime, I've included the template info requested:

Link to my site:
Main site: http://www.Fazakstudios.co.uk  Forums: http://www.fazakstudios.co.uk/index.php
SMF version: 1.1.10
TP version: TinyPortal v1.0 beta 3 Ã,© Bloc
Theme name and version: SMF Default theme.
Browser Name and Version: Firefox 3.5.3 and IE8
b]Mods installed:[/b]
1.     Stop Spammer      2.3      
2.    Twitter mod    1.2
3.    Invite    1.14    
4.    Limit A Guests Daily PageViews Mod    1.0    
5.    Ultimate Profile    0.9    
6.    SMF Arcade    2.0.18    
7.     SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update      1.0      
8.    SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update    1.1    
9.    Logo redirect    0.1    
10.    TinyPortal    1.075    
11.    Spoiler Tag    1.04    
12.    SMF Gallery Lite    1.9.3    
13.    Share This Topic    1.1    
14.    Registered Images    2.1    
15.    Reply Button in All Posts    1.1    
16.    Twitter Profile Field    2.2    
17.    Download and Password bbc 1.1    1.1    
18.    SMF Links    1.6.7    
19.    Xbox Live Gamer Tag    1.0    
20.    SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update    1.1    
21.    Go Up & Go Down    1.2    
22.    Aeva ~ Auto-Embed Video & Audio    6.9.99
Related Error messages: \n'); smileyPopupWindow.document.close(); } // ]]> 

The most recent mod was the 'Download and Password bbc 1.1'.  Although, searching Google for answers about the error message above, threw up page after page of forums all displaying the same code in their shoutbox and topic/post sections, so I don't think it is that mod! 

I use the default theme as the main theme, although I allow registered members' to choose their own theme.  I use the following themes on my forums:

SMF Default Theme - Core (1.1.5)
Classic YaBB SE Theme (1.1)
Babylon Theme (1.1)
yelpaze (1.1)
bevadih (1.1)
izler (1.1.4)
Musiconica (1.1)

I'll post back if I have success with TPShout.php and TPSubs.php

Dave.

ZarPrime

Dave,

WARNING

There's something going on with your site.  My intrusion software goes crazy when I access your site and it even crashed Opera, which is the browser that I'm using.

I tried it a second time just now to make sure that it was your site giving me these intrusion alarms and it was.  You might want to look through these 3 reports below and see if you have any relationship to any of the IP addresses or websites listed.  If you don't I suggest that you get with your host and ask them if they've been hacked.


Category: Intrusion Prevention
Date & Time,Severity,Activity,Status,Recommended Action,Risk Name,Attacking Computer,Attacker URL,Destination Address,Source Address,Traffic Description,Category

10/22/2009 4:18 PM,High,"An intrusion attempt by archdemon.net was blocked. Application path <path>\DEVICE\HARDDISKVOLUME1\PROGRAM FILES\OPERA\OPERA.EXE</path>",Blocked,No Action Required,HTTP Acrobat PDF Suspicious File Download 3,"archdemon.net (66.96.133.9, 80)",archdemon.net/flash/pdf.php,"YOUR-E1C77F8D14 (192.168.1.47, 2671)",66.96.133.9 (66.96.133.9),"TCP, www-http",

10/22/2009 2:37 PM,High,"An intrusion attempt by 194.154.163.44 was blocked. Application path <path>\DEVICE\HARDDISKVOLUME1\PROGRAM FILES\OPERA\OPERA.EXE</path>",Blocked,No Action Required,HTTP Acrobat PDF Suspicious File Download 3,"194.154.163.44, 80",bmpa.org.uk/flash/pdf.php,"YOUR-E1C77F8D14 (192.168.1.47, 4863)",194.154.163.44,"TCP, www-http",

10/22/2009 2:37 PM,High,"An intrusion attempt by 194.154.163.44 was blocked. Application path <path>\DEVICE\HARDDISKVOLUME1\PROGRAM FILES\OPERA\OPERA.EXE</path>",Blocked,No Action Required,HTTP Acrobat PDF Suspicious File Download 3,"194.154.163.44, 80",bmpa.org.uk/flash/pdf.php,"YOUR-E1C77F8D14 (192.168.1.47, 4865)",194.154.163.44,"TCP, www-http",


ZarPrime

This website is proudly hosted on Crocweb Cloud Website Hosting.