MyBB Community Forums

Full Version: Unknown location
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So I changed portal.php to index.php and the actual index.php to forums.php how can i make it so the "Who's online" shows forums instead of Unknown Location?
Bump.
Well when I look at the code of mine it goes like this:

<tr>
<td class="trow1"><a href="http://gabbleforums.com/User-spazmatic"><span style="color: red;"><strong><em>Spazmatic</em></strong></span></a><!-- start: online_row_ip -->
<br /><span class="smalltext">IP: 173.245.48.112 <a href="modcp.php?action=ipsearch&amp;ipaddress=173.245.48.112&amp;search_users=1">[lookup]</a></span>
<!-- end: online_row_ip --></td>
<td align="center" class="trow2">02:05 AM</td>
<td class="trow1" width="50%">Viewing <a href="online.php">Who's Online</a></td>

I'm pretty sure you would just edit the code so that the new link displays a new name. I know that's what you're trying to do, so I will try and figure it out. Am I correct?
(2011-05-18, 02:07 AM)Spazmatic Wrote: [ -> ]Well when I look at the code of mine it goes like this:
<tr> 
<td class="trow1"><a href="http://gabbleforums.com/User-spazmatic"><span style="color: red;"><strong><em>Spazmatic</em></strong></span></a><!-- start: online_row_ip --> 
<br /><span class="smalltext">IP: 173.245.48.112 <a href="modcp.php?action=ipsearch&amp;ipaddress=173.245.48.112&amp;search_users=1">[lookup]</a></span> 
<!-- end: online_row_ip --></td> 
<td align="center" class="trow2">02:05 AM</td> 
<td class="trow1" width="50%">Viewing <a href="online.php">Who's Online</a></td> 
I'm pretty sure you would just edit the code so that the new link displays a new name. I know that's what you're trying to do, so I will try and figure it out. Am I correct?
I would imagine it would need a file edit such as global.php since I have edited the url and edited index.php

you need to edit /inc/functions_online.php and rework the portal/index filename and locations to index/forums
(2011-05-18, 02:36 AM)pavemen Wrote: [ -> ]you need to edit /inc/functions_online.php and rework the portal/index filename and locations to index/forums
How would I edit this?
// index.php functions
		case "index":
			$location_name = $lang->sprintf($lang->viewing_index, $mybb->settings['bbname']);
			break;
Like this?
// index.php functions
		case "forums":
			$location_name = $lang->sprintf($lang->viewing_index, $mybb->settings['bbname']);
			break;


it depends on if you also change the THIS_SCRIPT constant in the actual files as well.

check the database to see if it is showing forums.php or index.php, then adjust accordingly
(2011-05-18, 05:47 AM)labra Wrote: [ -> ]http://wiki.mybb.com/index.php/Help:Unknown_location
That didnt help, any one eles?

(2011-05-25, 01:06 AM)blake Wrote: [ -> ]
(2011-05-18, 05:47 AM)labra Wrote: [ -> ]http://wiki.mybb.com/index.php/Help:Unknown_location
That didnt help, any one eles?

Did you try the edit in the functions_online.php that you posted above. Try that, changing index to forum in the switch statements. It should work.
Pages: 1 2