Site www.ga-squad.com
SMF 1.1.6
TP 1.0.5
Theme Helios_ Multi_tp
Mod Name Version
1. SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update 1.0 [ List Files ] [ Delete ]
2. TinyPortal 1.052 [ Uninstall ] [ List Files ] [ Delete ]
3. Treasury 2.11 [ Uninstall ] [ List Files ] [ Delete ]
4. SMF Gallery Lite 1.8.3 [ Uninstall ] [ List Files ] [ Delete ]
5. Auto Embed Video Clips 2.2 [ Uninstall ] [ List Files ] [ Delete ]
6. SMF Arcade 2.0.14 [ List Files ] [ Delete ]
7. Global Announcements 1.0 [ Uninstall ] [ List Files ] [ Delete ]
8. FlashChat Integration 1.0 [ Apply Mod ] [ List Files ] [ Delete ]
9. Googlebot & Spiders Mod 2.0.3 [ Uninstall ] [ List Files ] [ Delete ]
10. SMF 1.0.14 / 1.1.6 Update 1.0 [ Uninstall ] [ List Files ] [ Delete ]
11. Users Online Today Mod 1.4.0 [ Apply Mod ] [ List Files ] [ Delete ]
12. Unique Hit Counter 1.0 [ Apply Mod ] [ List Files ] [ Delete ]
Error:
http://www.ga-squad.com/index.php
Apply Filter: Only show the errors with the same message
8: Undefined index: ID_MEMBER
File: /home/xxx/xxx/ga.ga-squad.com/Themes/default/languages/TPShout.english.php (tp_below sub template - eval?)
Line: 129
Apply Filter: Only show the error messages of this URL http://www.ga-squad.com/index.php
Apply Filter: Only show the errors with the same message
8: Undefined index: frontbar
File: /home/xxx/xxxr/ga.ga-squad.com/Themes/default/languages/TPShout.english.php (main sub template - eval?)
Line: 30
So I went to SMF for help. I believe I started here, then was directed over there, now I'm back again.
You can see what they had me do at this topic: http://www.simplemachines.org/community/index.php?topic=254440.0 (http://www.simplemachines.org/community/index.php?topic=254440.0) starting at post #9.
So, now I'm back here.
I'm figuring I need to uninstall the mods, upload some frsh files, and re-install the mods one at a time to what happens.
So I go into my FTP and start comparing the files on the server, to the TP 1.05 package.
I have found a bunch of extra files in there, seemingly left over from TP 9.8 install.
For example, I have a TPortalBlocks.template.php file showinf Version: 0.9; TPortalBlocks.
I also have a TPBlocks.template.php file,Version: 1.0; TPBlocks
1. Do I need to get rid of the 0.9 files?
2. Are these old files possibly causing my errors?
3. When I uninstalled TP 9.8 and installed TP 1.05, are these files supposed to be left over?
4. Do these files have nothing to do with my error.
5. I have uploaded all fresh files of SMF and reinstalled the mods after. Same errors.
6. I also have some blocks calling ID-Member but I see no problem with the code in the block.
OK,...pheeewww..where do I start?
Uninstall all mods and turn off blocks, then upload fresh TP files?
Answer Z? Forget it, and start over with a new forum install and insert the old database.
Thanks for any help in advance.
B-Lute
Any block code snippet that uses any of the SMF variables need to have them in the global call.
global $ID_MEMBER, $scripturl;
Otherwise you'll get the error you stated.
If you do a clean install as a test you can see what files are needed. If I remember right, the TPortalBlocks.template.php is not needed in TP 1.x, however they should not have any affect as they are not being used in TP 1.x.
Okee dokee, I'll have a look see. :laugh:
OK,....I looked at all the php blocks, and they all seem to be coded right but who knows, I'm a code dummy. So I turned them all off. That gets rid of error #1, the ID_Member error. So it must be 1 of those blocks.
I still have error #2, the frontbar error. Is that calling for an image? Maybe it's mispelled or not there,..don't know.
And it's not in the shoutbox as I have the shoutbox turned off.
I found the culprit for error number 1. The top stats block. Way to much code for me to see if something is wrong, but I'll post it here if you wanna have a look.
Edit: After looking again, it doesn't appear to have the global ID_Member thingy.
global $db_prefix, $scripturl, $sourcedir, $temp_array, $temp_array2;
$max_length = 16; // Maximum length of each item. Any more characters will be truncated and ... added
$number_to_list = 5; // Number of items to list
/*
This is for the top referrers mod
If you set $referrer_mode = 1, It is for Top Referrers by referrals
If you set $referrer_mode = 2, It is for Top referrers by link hits.
*/
$referrer_mode = 1;
echo '<table width="100%">
<tr>
<td width="33%"><font color="#FFFFFF" face="Verdana" size="1"><b>Top Reputation</b></font></td>
<td width="34%"><font color="#FFFFFF" face="Verdana" size="1"><b>Hottest Threads</b></font></td>
<td width="33%"><font color="#FFFFFF" face="Verdana" size="1"><b>Most Viewed Threads</b></font></td>
</tr>
<tr>';
// Top Karma
$query = db_query("SELECT realName, (karmaGood - karmaBad) as Karma, ID_MEMBER, onlineColor
FROM {$db_prefix}members as mem
LEFT JOIN {$db_prefix}membergroups as grp
ON grp.ID_GROUP = mem.ID_GROUP
ORDER BY Karma
DESC LIMIT $number_to_list", __FILE__, __LINE__);
while( $row = mysql_fetch_assoc($query) )
{
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color:' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';
$temp_array[] = $link;
$temp_array2[] = $row['Karma'];
}
mysql_free_result($query);
display_data();
// Hottest Threads
$array = ssi_topTopics('replies',$number_to_list,'return');
foreach ($array as $item) {
(strlen($item['subject']) > $max_length) ? $subject = substr($item['subject'],0,$max_length) . '...' : $subject = $item['subject'];
$link = '<a href="' . $item['href'] . '" title="' . $item['subject'] . '">' . $subject . '</a>';
$temp_array[] = $link;
$temp_array2[] = $item['num_replies'];
}
display_data();
// Most Viewed Threads
$array = ssi_topTopics('views',$number_to_list,'return');
foreach ($array as $item) {
(strlen($item['subject']) > $max_length) ? $subject = substr($item['subject'],0,$max_length) . '...' : $subject = $item['subject'];
$link = '<a href="' . $item['href'] . '" title="' . $item['subject'] . '">' . $subject . '</a>';
$temp_array[] = $link;
$temp_array2[] = $item['num_views'];
}
display_data();
// Second row
echo ' </tr>
<tr>
<td><font color="#FFFFFF" face="Verdana" size="1"><b>Newest Members</b></font></td></td>
<td><font color="#FFFFFF" face="Verdana" size="1"><b>Top Posters</b></font></td></td>
<td><font color="#FFFFFF" face="Verdana" size="1"><b>Top Topic Starters</b></font></td></td>
</tr>
<tr>';
// Newest Members
$query = db_query("SELECT ID_MEMBER, realName, dateRegistered, onlineColor
FROM {$db_prefix}members as mem
LEFT JOIN {$db_prefix}membergroups as grp
ON grp.ID_GROUP = mem.ID_GROUP
WHERE is_activated = 1
ORDER BY ID_MEMBER DESC
LIMIT $number_to_list", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query)) {
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color:' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';
$temp_array[] = $link;
$temp_array2[] = date("d-m",$row['dateRegistered']);
}
mysql_free_result($query);
display_data();
// Top Posters
$query = db_query("SELECT ID_MEMBER, realName, posts, onlineColor
FROM {$db_prefix}members as mem
LEFT JOIN {$db_prefix}membergroups as grp
ON grp.ID_GROUP = mem.ID_GROUP
ORDER BY posts DESC
LIMIT $number_to_list", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query)) {
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color:' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';
$temp_array[] = $link;
$temp_array2[] = $row['posts'];
}
mysql_free_result($query);
display_data();
// Top Topic Starters
$query = db_query("SELECT ID_MEMBER_STARTED, COUNT(ID_MEMBER_STARTED) as COUNT, realName, onlineColor
FROM {$db_prefix}topics, {$db_prefix}members as mem
LEFT JOIN {$db_prefix}membergroups as grp
ON grp.ID_GROUP = mem.ID_GROUP
WHERE ID_MEMBER_STARTED = ID_MEMBER
GROUP BY ID_MEMBER_STARTED
ORDER BY COUNT DESC
LIMIT $number_to_list", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query)) {
if (!empty($row['onlineColor']))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" style="color:' . $row['onlineColor'] . ';">' . $row['realName'] . '</a>';
else
$link = '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>';
$temp_array[] = $link;
$temp_array2[] = $row['COUNT'];
}
mysql_free_result($query);
display_data();
// Finish it off
echo '</tr></table>';
function display_data()
{
global $temp_array, $temp_array2;
echo '<td><table width="100%"><tr><td align="left">';
echo implode('<br />', $temp_array);
echo '</td><td align="right">';
echo implode('<br />', $temp_array2);
echo '</td></tr></table></td>';
$temp_array = array();
$temp_array2 = array();
}
THen just add $ID_MEMBER in the global line in the same format. As for the frontbar error, that is a known error, and hopefully fixed in the next beta.
Well..I added it as: $ID_MEMBER
Still the same error, so I tried: $id_member
So it looks like this:
global $db_prefix, $id_member, $scripturl, $sourcedir, $temp_array, $temp_array2;
Same results. Seems I may have to just ditch this one.
Edit: On the other hand, it seems some other blocks I use that call ID_MEMEBER don"t work on this site.
Maybe somethin' else goin on.
Edit 2. Maybe a fresh TP install will help out.