Members   Search      Help    Register    Login    Home
Home » Support Forums for PMBT 2.X » Feature Request for 2.X » Customizing login (change login page)
Customizing login [message #3649] Sun, 14 February 2010 14:53 Go to next message
seedmaster is currently offline seedmaster  South Africa
Messages: 2
Registered: February 2010
Location: South africa
Leecher
How to Customize log in page phpmybittorrent
Re: Customizing login [message #3650 is a reply to message #3649] Sun, 14 February 2010 15:08 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
open include/functions.php and find
function loginrequired($level, $guickclose = false) {
        global $user, $gfx_check, $autoscrape;

and add after
        echo "<meta http-equiv=\"refresh\" content=\"0;url=login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]).">";
        include'footer.php';

then add to root
login.php
<?php
/*
*----------------------------phpMyBitTorrent V 2.0-beta4-----------------------*
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent Management System) ---*
*--------------   Created By Antonio Anzivino (aka DJ Echelon)   --------------*
*-------------               http://www.p2pmania.it               -------------*
*------------ Based on the Bit Torrent Protocol made by Bram Cohen ------------*
*-------------              http://www.bittorrent.com             -------------*
*------------------------------------------------------------------------------*
*------------------------------------------------------------------------------*
*--   This program is free software; you can redistribute it and/or modify   --*
*--   it under the terms of the GNU General Public License as published by   --*
*--   the Free Software Foundation; either version 2 of the License, or      --*
*--   (at your option) any later version.                                    --*
*--                                                                          --*
*--   This program is distributed in the hope that it will be useful,        --*
*--   but WITHOUT ANY WARRANTY; without even the implied warranty of         --*
*--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          --*
*--   GNU General Public License for more details.                           --*
*--                                                                          --*
*--   You should have received a copy of the GNU General Public License      --*
*--   along with this program; if not, write to the Free Software            --*
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA --*
*--                                                                          --*
*------------------------------------------------------------------------------*
*------              ©2005 phpMyBitTorrent Development Team              ------*
*-----------               http://phpmybittorrent.com               -----------*
*------------------------------------------------------------------------------*
*-----------------   Sunday, September 14, 2008 9:05 PM   ---------------------*
*/
if (defined('IN_PMBT'))die ("You can't include this file");
define('IN_PMBT', true);
require_once("include/config.php");

echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo"<script type=\"text/javascript\" language=\"JavaScript\" src=\"$siteurl/bbcode.js\"></script>";
echo "<!--[if lt IE 7]>
<script defer type=\"text/javascript\" src=\"$siteurl/pngfix.js\"></script><![endif]-->";
echo "<title>".$sitename."</title>\n";
$reason = "";
if (is_banned($user, $reason)) {
echo "<meta http-equiv=\"refresh\" content=\"0;url=ban.php?reson=".urlencode($reason)."\">";        die();
}
if (is_readable("themes/$theme/style.css")) {
        echo "<link rel=\"StyleSheet\" href=\"$siteurl/themes/$theme/style.css\" type=\"text/css\">\n<script type=\"text/javascript\" src=\"$siteurl/global.js\"></script>\n";
}
echo "</head>";
echo "<body>\n";
$returnto="";
    if (!empty($_GET["returnto"]) OR !$returnto =="") {
      $returnto = "?returnto=".$_GET["returnto"];
      }

        $loginbox = "<br><br><form method=\"POST\" action=\"user.php".$returnto."\">\n<input type=\"hidden\" name=\"op\" value=\"login\" />\n
        <p align=\"center\">"._btusername."<br><input type=\"text\" name=\"username\" size=\"20\" />\n<br>"._btpassword."<br><input type=\"password\" name=\"password\" size=\"20\" />\n<br>Remember Me<br><input type=\"checkbox\" name=\"remember\" value=\"yes\" /></p>\n";
        if ($gfx_check) {
                $rnd_code = strtoupper(RandomAlpha(5));
                $loginbox .= "<p align=\"center\">"._btsecuritycode."<br><img src=\"gfxgen.php?code=".base64_encode($rnd_code)."\" alt=\"Security Code\"><br>\n<input type=\"text\" name=\"gfxcode\" size=\"10\" maxlength=\"6\">";
                $loginbox .= "<input type=\"hidden\" name=\"gfxcheck\" value=\"".md5($rnd_code)."\">\n\n";
        }
        $loginbox .= "<p><input type=\"submit\" value=\""._btlogin."\" /></p></form>\n";
        $loginbox .= "<a href=\"user.php?op=lostpassword\">"._btlostpassword."</a></p>\n\n";
        OpenTable(_btlogin);
        OpenErrTable('login');
                        echo "<p>"._btdenuser."</p>";
                        echo $loginbox;
        CloseErrTable();
        CloseTable();
echo '</body>
</html>';
?> 

You can customize it to how you want it


http://a.imageshack.us/img831/5562/mybikes.png

[Updated on: Fri, 04 June 2010 00:25]

Report message to a moderator

Re: Customizing login [message #3654 is a reply to message #3650] Tue, 16 February 2010 12:53 Go to previous messageGo to next message
seedmaster is currently offline seedmaster  South Africa
Messages: 2
Registered: February 2010
Location: South africa
Leecher
Hi there Joe

Im getting this error in IE when I log out and in again.

<meta http-equiv="refresh" content="0;url=login.php?returnto=%2F>

could you tell me how to fix this and where can i find a original copy of login.php i have looked through the phpmybittorrnet downloaded folder cant find it.

thanks firefly
Re: Customizing login [message #3655 is a reply to message #3654] Tue, 16 February 2010 14:47 Go to previous messageGo to next message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

seedmaster wrote on Tue, 16 February 2010 12:53
Hi there Joe

Im getting this error in IE when I log out and in again.

<meta http-equiv="refresh" content="0;url=login.php?returnto=%2F>

could you tell me how to fix this and where can i find a original copy of login.php i have looked through the phpmybittorrnet downloaded folder cant find it.

thanks firefly


there is no login.php, that is only for customized login. all files concerning reg etc. is in user directory.


Re: Customizing login [message #3656 is a reply to message #3655] Tue, 16 February 2010 16:15 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
change
        echo "<meta http-equiv=\"refresh\" content=\"0;url=login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"])">";
        die();

to
        echo "<meta http-equiv=\"refresh\" content=\"0;url=login.php?returnto=" . urlencode($_SERVER["REQUEST_URI"])">";
        include'footer.php';


http://a.imageshack.us/img831/5562/mybikes.png
Re: Customizing login [message #4758 is a reply to message #3656] Fri, 27 August 2010 18:32 Go to previous messageGo to next message
firefly007 is currently offline firefly007  
Messages: 79
Registered: May 2010
Seeder
I managed to customize the login page by changing the setting user.php so when I logout it takes me to the customized login page and then change .htacess to make login.php my default page it works fine.

But im having one problem and that is once I register it takes me to index.php instead of my htacces set file login.php.





icon14.gif  Re: Customizing login [message #4759 is a reply to message #4758] Fri, 27 August 2010 22:33 Go to previous messageGo to next message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

ok tested and working.

open user.php

find
if(!$returnto)header("Location: ".$siteurl."/user.php?op=loginconfirm");
										else
										header("Location: ".$siteurl."/user.php?op=loginconfirm&returnto=index2.php");
										#header('location: ' . $returnto);
                                        die();


chnge index2.php with the file you want users to go to when login is confirmed.


Re: Customizing login [message #4898 is a reply to message #4759] Mon, 20 September 2010 09:40 Go to previous messageGo to next message
firefly007 is currently offline firefly007  South Africa
Messages: 79
Registered: May 2010
Seeder
Hey Where do I find the the code that controls this.

login

The area you are trying to Access is Restricted to Registered Users.
Please provide your Access Credentials and try again. If you're not Signed Up yet, you can DO SO for FREE.


Thanks


Re: Customizing login [message #4899 is a reply to message #4898] Mon, 20 September 2010 13:01 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
pft language


http://a.imageshack.us/img831/5562/mybikes.png
Re: Customizing login [message #4900 is a reply to message #4899] Mon, 20 September 2010 13:10 Go to previous messageGo to next message
firefly007 is currently offline firefly007  South Africa
Messages: 79
Registered: May 2010
Seeder
what .php file is it in

Re: Customizing login [message #4901 is a reply to message #4900] Mon, 20 September 2010 13:29 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
what language are U using?

http://a.imageshack.us/img831/5562/mybikes.png
Re: Customizing login [message #4902 is a reply to message #4901] Mon, 20 September 2010 13:47 Go to previous messageGo to next message
firefly007 is currently offline firefly007  South Africa
Messages: 79
Registered: May 2010
Seeder
english

Re: Customizing login [message #4903 is a reply to message #4902] Mon, 20 September 2010 14:22 Go to previous messageGo to next message
firefly007 is currently offline firefly007  South Africa
Messages: 79
Registered: May 2010
Seeder
ok sorted out.

Oh on my login page I heed it to take me straight to the index if logged in or ready ho do i do that I have attached the file.
  • Attachment: login.php
    (Size: 5.22KB, Downloaded 69 times)


Re: Customizing login [message #4904 is a reply to message #4902] Mon, 20 September 2010 14:29 Go to previous messageGo to next message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

erm well, i guess, if you wanted to change the language, it would be in language/ and if your using English, i guess it would be english.php Rolling Eyes

Edited:. i have officially given up on helping you mate, your site is once again a big mess. Evil or Very Mad


[Updated on: Mon, 20 September 2010 14:32]

Report message to a moderator

Re: Customizing login [message #4905 is a reply to message #4904] Mon, 20 September 2010 15:49 Go to previous message
firefly007 is currently offline firefly007  South Africa
Messages: 79
Registered: May 2010
Seeder
I have fixed the mess Daffy

Previous Topic:Wait time indicated it torrent list.
Next Topic:torrent editng
Goto Forum:
  


Current Time: Wed Feb 08 21:06:47 GMT 2012

Total time taken to generate the page: 0.00856 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software