vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   VB3-Style admin-login (https://vborg.vbsupport.ru/showthread.php?t=46137)

rylin 11-26-2002 10:00 PM

VB3-Style admin-login
 
Right..
Just for fun (well, for the looks, really ;)) I took a few minutes to re-write the vb2.2.8 admin-login screen to look like the vb3 preview one.

Note: the code does use images that are copyrighted to jelsoft, so you're *supposed* to use your own, unless jelsoft allow us all to use them :p

Step 1, download the hack (attachment to this post)
Step 2, unzip all the files to your admin/ directory
Step 3, open up global.php (in the admin dir!)
Step 4:
Look for
PHP Code:

if ($bbuserinfo[userid]==and $checkpwd) { 

Delete *everything* below it, and paste:
PHP Code:

  include 'vb3login.php';
  
cpfooter();
  exit;
// end of if ($bbuserinfo[userid]==0 and $checkpwd)
  
?> 

anyway.. have fun, and enjoy ;)

11/28: Made the username (if it was ever set) appear in the username box automatically.

CeleronXL 11-26-2002 11:11 PM

Thanks!

Btw, that URL should be http://www.vbulletin.com/forum/modcp , not just mod.]

Posting the HTML in the files creates a parse error. O_o

Erwin 11-26-2002 11:18 PM

Hehe...

I don't the images should be a problem, since we are using it with a licensed vB.

Post a demo or screenshot for the ones who would surely ask for one...

Erwin 11-26-2002 11:21 PM

To avoid parse errors when you place HTML in PHP files, make sure you put a \ slash behind every " like this:

<img src\"http://test.com/test.gif\">

Edit: Actually, this doesn't apply to global.php I've just had a look at it, as the HTML is not within php tags.

CeleronXL 11-26-2002 11:31 PM

The parse error is on the line that contains naught but <html>

Erwin 11-26-2002 11:49 PM

Cool... it worked for me. :) Your instructions need to be a bit clearer - what to copy, what to replace etc. But it looks nice. :)

It works for both the Admin and Mod CP logins - for the mod one, just edit the mod global.php in the same way. :)

CeleronXL 11-26-2002 11:51 PM

Eh? Can you post exactly what you have from
PHP Code:

if ($bbuserinfo[userid]==and $checkpwd) { 

and down?

I was adding "echo "";" tags all the way down and it was working until I got to


echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"submitrow\">";

Whereupon it still gives a parse error.

Erwin 11-26-2002 11:59 PM

No, no need to put echo - just cut and paste the HTML code UNCHANGED - no need echo, no need backslash - that bit is not within PHP as the PHP tags have ended. :)

CeleronXL 11-27-2002 12:03 AM

So what does yours read then? Even without the echo's, it does not work. Without the backslashes, it does not work. O_o
Mine reads like this:

PHP Code:

if ($bbuserinfo[userid]==0 and $checkpwd) {
echo "<html>";
echo "<head>";
echo "<link rel=\"stylesheet\" href=\"../controlpanel.css\" />";
echo "<title>vBulletin Administrator Control Panel</title>";
echo "</head>";
echo "<body onload=\"document.forms.submitrow.loginusername.focus()\">";
echo "<p>&nbsp;</p><p>&nbsp;</p>";
echo "<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" width=\"450\" align=\"center\" class=\"tborder\"><tr><td>";
echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td class=\"tcat\" align=\"center\"><b>Please Log In:</b></td>";
echo "</tr>";
echo "</table>";
//    <!-- logo and version -->
echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"navbody\">";
echo "<tr valign=\"bottom\">";
echo "<td><img src=\"../images/cp/cp_logo.gif\" width=\"160\" height=\"66\" alt=\"cplogo\" title=\"vBulletin &copy;2000-2002 Jelsoft Enterprises Ltd.\" border=\"0\" /></td>";
echo "<td><b><a href=\"../index.php\">Forum Sector</a></b><br />vBulletin v<?php echo $template version ?><br />&nbsp;</td>";
echo "</tr>";
echo "</table>"
//    <!-- /logo and version -->
echo "<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"submitrow\">";
echo "<tr>";
echo "<td width=\"100\" align=\"right\" class=\"button\"><u>U</u>sername</td>";
echo "<td><input type=\"text\" name=\"loginusername\" value=\"StarCraftSector\" size=\"40\" accesskey=\"u\" /></td>";
echo "</tr>";
echo "<tr>";
echo "<td align=\"right\" class=\"button\"><u>P</u>assword</td>";
echo "<td><input type=\"password\" name=\"loginpassword\" size=\"40\" accesskey=\"p\" /></td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=\"2\" align=\"center\">";
echo "<input type=\"submit\" value=\"  Log In  \" accesskey=\"s\" />";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td></tr></table>";
echo "</form>";
    
echo "</body>";
echo "</html>";
<p align="center"><font size="1">vBulletin v<?php echo $templateversion ?> Administrator Control Panel</font></p>
<?php
  cpfooter
();
  exit;
}

?>

EDIT: Aight, you're not browsing this thread anymore, I take it you did not want to post your code.... O_o

LOD-squa 11-27-2002 12:36 AM

can someone post a way I can understand it better I'm confused and i wanna get this.


All times are GMT. The time now is 12:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01051 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete