| Author |
Message |
Flood

Joined: Apr 10, 2007
Posts: 16
|
Posted:
Mon Jul 09, 2007 8:45 am |
|
Hi guys,
on my phpnuke site I have a phpBB forum. This forum opens up inside the nuke structure (as module) however I'd like it to be accessible to anyone by browsing to the Forums/index.php directly. I know it's something to do with;
| Quote: |
if ( !defined('MODULE_FILE') )
{
die("You can't access this file directly...");
} |
at the start of the pages but simply removing this doesn't have the desired effect. Can anyone enlighten me? |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Tue Jul 10, 2007 7:05 pm |
|
I don't think you will be able to accomplish this without doing a bunch of work. The easiest way to do this would probably with mod rewrite (similar to what google tap uses) |
| |
|
|
 |
Flood

Joined: Apr 10, 2007
Posts: 16
|
Posted:
Tue Jul 10, 2007 7:43 pm |
|
U reckon sticking in mod rewrite/google tap and then having the menu direct to the converted URL would work? |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Tue Jul 10, 2007 7:46 pm |
|
i would think rewriting modules/Forums/index.php to forums.html would be better but that may screw up your layout. |
| |
|
|
 |
Flood

Joined: Apr 10, 2007
Posts: 16
|
Posted:
Tue Jul 10, 2007 7:58 pm |
|
Fancy sending me whatever you've used for this forum? LOL  |
| |
|
|
 |
Flood

Joined: Apr 10, 2007
Posts: 16
|
Posted:
Thu Jul 12, 2007 8:04 am |
|
Wel, after a bit of looking about I managed to stick a htaccess in the root directory with this;
| Code: |
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*).html modules.php?name=$1 |
So in theory Forums.html should link to the Forums.
But it doesn't
Info so far from http://www.phpnuke-database.com/content/view/1146/40/
So, looked about a bit more and here;
http://www.cnpop.net/index.php?action=show&id=317
There's mention of changing links elsewhere (index.php etc) but it's not very clear. So, is there something else I should be changing here? |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Fri Jul 13, 2007 4:16 pm |
|
I think what you want to do is install googleTap(which is outdated).
Fortunately, http://montegoscripts has a newer version that he keeps up to date called "Short Links". And while you are at it, get his Dynamic Titles hack too. Google will love it  |
| |
|
|
 |
Flood

Joined: Apr 10, 2007
Posts: 16
|
Posted:
Tue Jul 17, 2007 12:08 pm |
|
Right, managed to install the tap script and my forums are at site.com/forums.html
BUT,
they still open as 'inside' the nuke layout, whereas I want them to open in a page of their own (as these forums do).
Tried linking to forums.html, forums/index.html & forums/index.php, none working like I'm wanting them to lol. |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Tue Jul 17, 2007 1:32 pm |
|
Ok, I see now, my theme has some javascript that shows/hides the left blocks, they are still there but just hidden. I think what you want to do is this...
Open themes/your_theme/theme.php and look under the function themeheader. You will first add $name to the global scope.
| Code: |
global $banners, $sitename, $name; |
Then you will need to find the place where the blocks are called. for example(this comes from raven nuke. regular nuke would call blocks("left")
| Code: |
.'<tr valign="top">'."\n"
.'<td><img src="themes/DeepBlue/images/pixel.gif" width="6" height="1" border="0" alt="" />
</td>'."\n"
.'<td width="138" bgcolor="#d3e2ea" valign="top" align="left">'."\n";
blocks('l');
echo
'</td>
<td><img src="themes/DeepBlue/images/pixel.gif" width="10" height="1" border="0" alt="" />
</td>';
// td not closed
echo '<td width="100%">'."\n";
} |
would be changed to...
| Code: |
.'<tr valign="top">'."\n";// close the echo
if ($name != "Forums"){// added if
echo '<td><img src="themes/DeepBlue/images/pixel.gif" width="6" height="1" border="0" alt="" />
</td>'."\n"
.'<td width="138" bgcolor="#d3e2ea" valign="top" align="left">'."\n";
blocks('l');
echo
'</td>
<td><img src="themes/DeepBlue/images/pixel.gif" width="10" height="1" border="0" alt="" />
</td>';
}//endif
echo '<td width="100%">'."\n";
} |
This will basically hide the little spacer columns along with the left blocks in the forums only. Your theme will most definitely be different so you'll have to use your own judgment on that. If you get stuck just post your themeheader function here and we'll help you out. |
| |
|
|
 |
Flood

Joined: Apr 10, 2007
Posts: 16
|
Posted:
Tue Jul 17, 2007 3:09 pm |
|
| Code: |
if(!defined('NO_LEFT_BLOCKS')) {
blocks('left');
//echo "</td><td valign=\"top\" align=\"center\" width=\"100%\">";
//}
echo " </td>\n";
echo " <td style=\"width: 10px;\" valign =\"top\"><img src=\"themes/evasion-v2/images/spacer.gif\" alt=\"\" width=\"10\" height=\"1\" border=\"0\" /></td>\n";
echo " <td width=\"100%\">\n";
} else {
echo " </td>\n";
echo " <td style=\"width: 1px;\" valign =\"top\"><img src=\"themes/evasion-v2/images/spacer.gif\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" /></td>\n";
echo " <td width=\"100%\">\n";
}
}
|
That'll be the culprit I imagine, followed the HOWTO on phpnuke to hide left blocks but adding in;
| Code: |
if ($name=='Forums') {
/* Don't display it. */
}
else {
blocks(left);
} |
just fucks up the page. Then hiding the right blocks
Doesn't appear in forums module from what i can see but the right blocks are appearing anyway. Possibly because of this in the themefooter;
| Code: |
if ((! defined (“NO_RIGHT_BLOCKSâ€) &&! defined (“ADMIN_FILEâ€)) || (blocks_visible (“rightâ€) &&! defined (“ADMIN_FILEâ€))) {
echo"</td><td width=\"200\" valign=\"top\">\n";
blocks(right);
}
echo"</td>\n"
."<td width=\"72\" valign=\"top\" background=\"themes/evasion-v2/images/sb_rt.gif\"><img src=\"themes/evasion-v2/images/sb_rt.gif\" width=\"72\" height=\"100\" border=\"0\"></td>\n"
."</tr>\n"
."</table>\n\n\n"; |
Damn themes..... |
| |
|
|
 |
Flood

Joined: Apr 10, 2007
Posts: 16
|
Posted:
Thu Jul 19, 2007 9:11 pm |
|
Never mind, I've changed my theme and got it all working the way I wanted.  |
| |
|
|
 |
|
|