MyBB Community Forums

Full Version: How to disable portal?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have just discovered about portal.php and tried it on mine.
It makes all contents visible. I set and installed plugins that guest can't view threads but via portal, everything is visible. Sad

Plugin's and custom settings are useless if viewed via portal. Sad
open portal.php

find everything btween <?php and ?> and replace it with.

// this line needs to exist to avoid blank page errors.

Or you could redirect portal.php to index.php
This one I think is what you are looking for

http://mods.mybb.com/view/disable-portal
(2011-06-02, 12:59 AM)Lopalong Wrote: [ -> ]Or you could redirect portal.php to index.php
this is what I'm trying to do, via .htaccess but I don't know how to.
I tried but doesn't work.

@fea
I tried that one, uploaded the files but when I open the plugin page, i got this error:
/inc/languages/english/admin/DisablePortal_plugin_admin.lang.php does not exist
I have tried 404.php redirection with my other sites but it doesn't work on myBB.
There's no 404.php or, I can't find it. I want to rename portal.php and when a user tries to access it, it should open 404.php where the file will redirect to my main forum.

I just can't find 404.php, and If I'm to create one, I don't know where to store the file and I'm not sure whether myBB will even read 404.php if the page does not exist.
I have tried 404.php redirection with my other sites but it doesn't work on myBB.
There's no 404.php or, I can't find it. I want to rename portal.php and when a user tries to access it, it should open 404.php where the file will redirect to my main forum.

I just can't find 404.php, and If I'm to create one, I don't know where to store the file and I'm not sure whether myBB will even read 404.php if the page does not exist.
@KenWeiLL

Our board is using that plugin.

board url:
http://shift.privatesub.net/portal.php

Maybe you missed something in the upload.
Go to: ACP > Configurations > Portal > and empty the "Forum IDs to pull announcement from" option field. Also Set "Show Latest Discussions" to "No".

This'll disable portal threads/posts. Wink
Just delete the portal.php file if you don't need it.
~problem solved~
I renamed portal.php (just for a backup) to some random names then create a new portal.php file containing:

<?php

header("HTTP/1.1 301 Moved Permanently");
header("Location: http://mymaindomain.com");

exit();

?>

Now, when portal.php is opened, it redirects to my main domain.
Thanks for all your help. Smile

@sama34
I've tried deleting it and it just ends up with the 404 error of my web hosting.
I have found another solution.
I deleted/renamed portal.php to some random name. So in theory, portal.php does not exist anymore.
After that, I created a file named 404.php with the content:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://mymaindomain.com");
exit();

Then after that, I added this line to .htaccess
ErrorDocument 404 /404.php

The effect of this is, all 404 error is now redirected to my main domain. With these, I won't get broken links as it would redirect all non existent page or .php page to my main domain instead of displaying the 404 error page of my web hosting.
Sorry for bumping a very old thread, just wanted to share an easy alternative way for those who are searching for the same thing:

Open:
ACP > Templates & Styles > Templates > {Your theme} templates > Portal Templates > Portal

Replace entire code with the following.

<html>
<head>
<title>Goodbye!</title>
<SCRIPT language="JavaScript">
<!--
window.location="{$mybb->settings['bburl']}/index.php";
//-->
</SCRIPT>
</head>
<body>
No Portal, goodbye ...
</body>
</html>

Save it. Done.