Google

NukeCoder


View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Flood




Joined: Apr 10, 2007
Posts: 16

PostPosted: Mon Jul 09, 2007 8:45 am
Reply with quote

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?
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Tue Jul 10, 2007 7:05 pm
Reply with quote

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)
 
View user's profile Send private message Visit poster's website
Flood




Joined: Apr 10, 2007
Posts: 16

PostPosted: Tue Jul 10, 2007 7:43 pm
Reply with quote

U reckon sticking in mod rewrite/google tap and then having the menu direct to the converted URL would work?
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Tue Jul 10, 2007 7:46 pm
Reply with quote

i would think rewriting modules/Forums/index.php to forums.html would be better but that may screw up your layout.
 
View user's profile Send private message Visit poster's website
Flood




Joined: Apr 10, 2007
Posts: 16

PostPosted: Tue Jul 10, 2007 7:58 pm
Reply with quote

Fancy sending me whatever you've used for this forum? LOL Cool
 
View user's profile Send private message
Flood




Joined: Apr 10, 2007
Posts: 16

PostPosted: Thu Jul 12, 2007 8:04 am
Reply with quote

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 Sad
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?
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Fri Jul 13, 2007 4:16 pm
Reply with quote

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 Smile
 
View user's profile Send private message Visit poster's website
Flood




Joined: Apr 10, 2007
Posts: 16

PostPosted: Tue Jul 17, 2007 12:08 pm
Reply with quote

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.
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Tue Jul 17, 2007 1:32 pm
Reply with quote

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")Wink

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.
 
View user's profile Send private message Visit poster's website
Flood




Joined: Apr 10, 2007
Posts: 16

PostPosted: Tue Jul 17, 2007 3:09 pm
Reply with quote

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
Code:
$index = 1;


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.....
 
View user's profile Send private message
Flood




Joined: Apr 10, 2007
Posts: 16

PostPosted: Thu Jul 19, 2007 9:11 pm
Reply with quote

Never mind, I've changed my theme and got it all working the way I wanted. Cool
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours
Forums ©