Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Templates and Themes (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=26)
-   -   Midnight Rain (http://www.mysidiaadoptables.com/forum/showthread.php?t=2474)

Inf3rnal 10-26-2011 10:32 AM

[1.2.3] Midnight Rain
 
Alright Midnight Rain theme is done! Chibiry! is now also released!
Tested With: Mysidia Adoptables v1.2.3
Works With: Mysidia Adoptables v1.2.3

Installation:

Download and unzip Midnight_Rain.zip

Upload Midnight_Rain files to the theme directory

Now comes the file edits! These file edits are exactly the same as Chibiry's so if you have done so with Chibiry you can skip this part.
Then open inc/functions.php and around line 451 find:

Code:

function getsidebar() {
That whole function which should look like this:

Code:

function getsidebar() {

        //This function determines what shows in the side bar of the template

        $isloggedin = $GLOBALS['isloggedin'];

        $loggedinname = $GLOBALS['loggedinname'];

        if($isloggedin == "yes") {

                $msgctr = "<a href='messages.php'>Messages</a>";

                $query = "SELECT * FROM ".$GLOBALS['prefix']."messages WHERE touser='".$loggedinname."' and status='unread'";

                $result = runquery($query);

                $num = mysql_num_rows($result);

                if($num > 0) {

                $msgctr = "<a href='messages.php'>Messages <b>(".$num.")</b></a>";

                }

                $sidebar = "You have {$GLOBALS['money']} {$GLOBALS['settings']['cost']}.<br />

                <a href='donate.php'>Donate money to friends</a><br />

                <br /><strong>Your links:</strong><br />

                <ul><li><a href='adopt.php'>Adopt New Pets</a></li>

                <li><a href='pound.php'>Acquire Pounded Pets</a></li>

                <li><a href='myadopts.php'>Manage Adoptables</a></li>

                <li><a href='account.php'>Go to My Account</a></li>

                <li>".$msgctr."

                <li><a href='changestyle.php'>Change Theme</a></li>

                <li><a href='logout.php'>Log Out</a></li>";



          $query = "SELECT * FROM ".$GLOBALS['prefix']."users WHERE username='".$loggedinname."' and usergroup='1'";

                  $result = runquery($query);

          $usercancp = mysql_num_rows($result);



                if($usercancp  != 0) {

                        $sidebar .= "<li><a href='admin.php'>Admin Center</a></li><br />";

                }



        $query1 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username != 'Visitor'");

        $total1 = mysql_num_rows($query1);

        $query2 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username = 'Visitor'");

        $total2 = mysql_num_rows($query2);

                $sidebar .= "<a href='online.php'>This site has ".$total1." members and ".$total2." guests online.</a>";



               

                $sidebar .= "</ul>";

        }

        else {

                $sidebar = "<b><u>Member Login:</u></b><br />

                <form name='form1' method='post' action='login.php'>

                  <p>Username:

                        <input name='username' type='text' id='username'>

                </p>

                  <p>Password:

                        <input name='password' type='password' id='password'>

                </p>

                  <p>

                        <input type='submit' name='Submit' value='Log In'>

                  </p>

                </form>Don't have an account?<br /><a href='register.php'>Register Free</a><br /><a href='forgotpass.php'>Forgot Password?</a>";

        $query1 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username != 'Visitor'");

        $total1 = mysql_num_rows($query1);

        $query2 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username = 'Visitor'");

        $total2 = mysql_num_rows($query2);

                $sidebar .= "<br />This site currently has ".$total1." members and ".$total2." guests.";



        }

        return $sidebar;

}

Replace that with:

Code:

function getsidebar() {

        //This function determines what shows in the side bar of the template

        $isloggedin = $GLOBALS['isloggedin'];

        $loggedinname = $GLOBALS['loggedinname'];

        if($isloggedin == "yes") {

                //User Profile Link
                $welcome = "<span id='welcome' title='Welcome back, ".$loggedinname."'><a href='profile.php?user=".$loggedinname."'>".$loggedinname."</a></span>";

                //Link to My Account
                $profile = "<a href='account.php' title='My Account'>My Account</a>";

                //Link with No Messages
                $msgctr = "<a href='messages.php' title='No New Messages'>Messages</a>";
               
                //Link with Messages
                $query = "SELECT * FROM ".$GLOBALS['prefix']."messages WHERE touser='".$loggedinname."' and status='unread'";

                $result = runquery($query);

                $num = mysql_num_rows($result);

                if($num > 0) {


                $msgctr = "
                        <a href='messages.php' title='You have ".$num." new message(s)'>Messages (".$num.")</a>
                ";
                }       

                //Link to change theme
                $chngthm = "<a href='changestyle.php' alt='Change Theme' title='Change Theme'>Change Theme</a>";

                $sidebar = "
                <div id='topbar'>
                        <span id='links'>
                                ".$welcome."
                                ".$profile."
                                ".$msgctr."
                                ".$chngthm."
                ";

          $query = "SELECT * FROM ".$GLOBALS['prefix']."users WHERE username='".$loggedinname."' and usergroup='1'";

                  $result = runquery($query);

          $usercancp = mysql_num_rows($result);

                if($usercancp  != 0) {

                        $sidebar .= "<a href='admin.php' title='Admin Center'>Admin</a>";

                }

        $query1 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username != 'Visitor'");

        $total1 = mysql_num_rows($query1);

        $query2 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username = 'Visitor'");

        $total2 = mysql_num_rows($query2);

                $query3 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username != ''");

        $total3 = mysql_num_rows($query3);
               
                $sidebar .= "
                        <a href='pound.php' title='Acquire Pounded Pets'>Pound Center</a>
                        <a href='donate.php' title='You have {$GLOBALS['money']} {$GLOBALS['settings']['cost']}.'>Donate</a>
                        <a href='online.php' title='This site currently has ".$total1." members and ".$total2." guests.'>".$total3." Users Online</a>
                        <a href='logout.php' title='Securely Logout'>Logout</a>
                        </span><br /></div>
                ";
        }

        else {

                $sidebar = "
                <div id='topbar'>
                        <form name='form1' method='post' id='links' action='login.php'>
                                Username: <input name='username' type='text' id='username'>
                                Password: <input name='password' type='password' id='password'>
                                <input type='submit' name='Submit' value='Log In'>
                                <a href='register.php'>Sign Up</a>
                                <a href='forgotpass.php'>Forgot Password?</a>

";

        $query1 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username != 'Visitor'");

        $total1 = mysql_num_rows($query1);

        $query2 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username = 'Visitor'");

        $total2 = mysql_num_rows($query2);

                $query3 = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE username != ''");

        $total3 = mysql_num_rows($query3);
               
                $sidebar .= "<a href='online.php' title='This site currently has ".$total1." members and ".$total2." guests.'>".$total3." Users Online</a></form></div></span>";


        }

        return $sidebar;

}

Now save and exit.

Database Changes
Now open Phpmyadmin or whatever you use and go to [yourprefix]_themes
Click Insert and use the following data:

themename = Midnight Rain
themefolder = Midnight_Rain

The rest can be left blank then click "Go"
That will insert the theme to the database.

To use the theme:
Now open your site and go to http://yoursite.com/changestyle.php and Midnight Rain should be on the list.
Select it and you are now using the theme.

To make it the default theme: (Way #1)
Go to your Admin CP > Site Settings > View or Edit Theme and Template Settings
Use the dropdown menu and select Midnight Rain then click use this theme.

To make it the default theme: (Way #2)
If that doesn't work (I haven't got that way to work for me at all.)
Open PhpMyAdmin (Or whatever you use) and go to [prefix]_settings and the first field should be "theme"
Set theme's "value" to "Midnight_Rain" (Without the quotes.)

Now your all done. :)

Important Notes:
If you have donated to Mysidia PHP Adoptables you can remove the Powered by Mysidia PHP Adoptables
Please leave Theme by Inf3rnal intact unless you have donated to me or I have given you permission
I can accept Paypal dontation at the following email address: infertioxstudios@gmail.com
There will be an "enhanced version" of the theme that will be released to users that have donated to me

Bugs/Issues
There is quite a few issues I'm still working on such as the footer, body size, etc.
I'll try to get those issues fixed asap for both Chibiry and Midnight_Rain.

Preview
http://dl.dropbox.com/u/614379/Tutor...ainPreview.png

kitty08 10-26-2011 11:32 AM

WOOOT
 
yeah its released :D

do you know when chibiry will be released?

just perfect for my new domain that i bought today X)

PokePets 10-26-2011 11:57 AM

I think I will use this one to, thaaank you!
It's really nice

LucasA33 10-29-2011 11:17 PM

You are one CSS beast man.
Finnally glad you released this and, I swear.
If I had the money, i'd donate! ;)

Iero 01-05-2014 07:02 AM

Does this work for 1.3.4? :happyc:

LucasA33 01-05-2014 01:24 PM

Not without some heavy modifications, no.

Hall of Famer 01-05-2014 01:46 PM

Actually it wont be hard to get this to work on Mys v1.3.4, the templating system is easy to convert so the only trick is the function getsidebar() which needs to be called somewhere.

LucasA33 01-07-2014 10:53 PM

Oh really? I might try to do this then if I can get the author's permission.

Iero 01-08-2014 02:31 PM

It's cool. I got it working.

LucasA33 01-09-2014 01:24 AM

You want to share how you did it then? :usedusedused:


All times are GMT -5. The time now is 12:43 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.