Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2015, 08:47 AM
ilrak ilrak is offline
Goldfish Fanatic
 
Join Date: Aug 2014
Location: Utah
Posts: 57
Gender: Female
Credits: 11,615
ilrak is on a distinguished road
Default Splash Page

Hi! I have a question.

Right now, I have a splash page on my site while it's in development so that people can still go to the alpha forum and participate there without seeing any of the in progress site.

Now that I'm reinstalling Mysidia to the site (long story short, I had a programmer who has not responded to me in over a month now after some promising activity beforehand so I'm back to attempting to program it myself until I hear back from them as to whether or not I need to just find someone else), I'm wondering if there's a way to keep the splash page intact but still have the in progress site available for me to work on. Do i need to rename the mysidia index file something else so that I can navigate to it to work on things and test things or can I have two index files?

Thanks!
__________________
Auratus Ghoti - Please the gods with your school
Tumblr ~ Forum ~![/URL]
Reply With Quote
  #2  
Old 06-02-2015, 09:17 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,001
Kyttias is on a distinguished road
Default

Unfortunately, no part of your site is going to work without the index file as the entire site is routed through it. However, you can add custom content to your index page manually (rather than through the AdminCP's pages) if you read through this thread over here.

Hopefully you know some code? You should perhaps modify your page in such a way that a giant div covers the entire screen and your splash contents sits inside that, covering everything below -- but only if the person visiting is a visitor.

PHP Code:
if($usergroup == 6) { 
/*show something for visitors only*/
$document->add(new Comment(" Only visitors will be able to see this!! "FALSE));  
 } 
These are the usergroups, by number:
1 - root admins
2 - admins
3 - registered users
4 - artists
5 - banned
6 - visitors

As for suggestions to further a splash page -- make a div that's 100% the width and height of the page, and then center some content vertically and horizontally to make it appealing:

HTML Code:
<div style='min-height: 100%; background-color: orange; position: relative;'>
  <div style='position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 20px; border-radius:7px;'>
    some content
  </div>
</div>
You'll be putting the above inside the Comment shown in the php even higher up, where it says " Only visitors will be able to see this!! " -- in case you were wondering, yes, it still needs to be surrounded by quotes. When writing html inside this space, be sure to only use single quotes ( ' ) and not double quotes ( " ).

Also, for this trick to work you'll need some additional css. Make sure your stylesheet's css contains a rule that sets the height of the body/html to 100%:
Code:
body, html { height: 100%; }
You can see an example of the html I quickly put together at this link.

I would be sure to include a way for you to log in in case you get yourself logged out. It'd be the "/login" page, of course! Or, if you can just remember that, you should have no problems.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #3  
Old 06-03-2015, 12:28 PM
ilrak ilrak is offline
Goldfish Fanatic
 
Join Date: Aug 2014
Location: Utah
Posts: 57
Gender: Female
Credits: 11,615
ilrak is on a distinguished road
Default

Thanks! I had an issue where it would either error out or just show the standard log in page, but I'll tinker some more.
EDIT:
Hmm ... now I have the splash page but the page looks very strange now:



I'm not sure what to do to fix this issue but to be able to have that image even display at all (nevermind that it's only half of the splash page image), my code is now:

PHP Code:
class IndexView extends View{
 
    public function 
index(){
             
$mysidia Registry::get("mysidia");
        
$document $this->document;        
        
$document->setTitle(" Welcome to Auratus Ghoti - Opening late 2015 ");
    

$document->add(new Comment("<!DOCTYPE html>
<html>
<head>
  <meta charset='utf-8'>
  <title>Auratus Ghoti</title>
</head>
<body>
<div style='min-height: 100%; background-color: orange; position: relative;'>
  <div style='position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 20px; border-radius:7px;'>
    <center><a href='http://auratusghoti.com/forum' target='_blank'><img src='http://i134.photobucket.com/albums/q93/flippin_k_moon/splashpage2.png'/></a></center>
<center> Auratus Ghoti is an in development Goldfish Breeding Sim where the player controls a school of goldfish as they build their school and please the creatures that they believe are gods. For a <center>limited time, the alpha forums are open for new members who are interested in joining the alpha test of this game. Alpha testing is scheduled to start in late 2015.</center>
<a href='http://auratusghoti.com/forum' target='_blank'>Join the forum here!</a> <a href='http://auratusghoti.tumblr.com' target='_blank'>Follow us on Tumblr!</a> <a href='http://auratusghoti.wikia.com/' target='_blank'>View the official wiki!</a></center>
<script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>
<!-- Ad space -->
<ins class='adsbygoogle'
     style='display:block'
     data-ad-client='ca-pub-1249390240201341'
     data-ad-slot='2925505659'
     data-ad-format='auto'></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
  </div>
</div>
</body>
</html>
<!END>"
FALSE));
        
}    
}
?> 
__________________
Auratus Ghoti - Please the gods with your school
Tumblr ~ Forum ~![/URL]

Last edited by ilrak; 06-03-2015 at 01:55 PM. Reason: Fixed one issue but caused another
Reply With Quote
  #4  
Old 06-03-2015, 04:48 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,001
Kyttias is on a distinguished road
Default

I see, I see... Try this?

PHP Code:
<?php
class IndexView extends View
  
    public function 
index(){ 
             
$mysidia Registry::get("mysidia"); 
        
$document $this->document;         
        
$document->setTitle(" Welcome to Auratus Ghoti - Opening late 2015 "); 
    if(!
$mysidia->user->isloggedin){
$document->add(new Comment("
<div style='min-height: 100%; background-color: white; position: fixed;width: 100%;top: 0px;left: 0px;z-index: 9999;'> 
  <div style='position: relative; top: 50%; background-color: white; padding: 20px; border-radius:7px;'> 
    <center><a href='http://auratusghoti.com/forum' target='_blank'><img src='http://i134.photobucket.com/albums/q93/flippin_k_moon/splashpage2.png'/></a></center> 
<center> Auratus Ghoti is an in development Goldfish Breeding Sim where the player controls a school of goldfish as they build their school and please the creatures that they believe are gods. For a <center>limited time, the alpha forums are open for new members who are interested in joining the alpha test of this game. Alpha testing is scheduled to start in late 2015.</center> 
<a href='http://auratusghoti.com/forum' target='_blank'>Join the forum here!</a> <a href='http://auratusghoti.tumblr.com' target='_blank'>Follow us on Tumblr!</a> <a href='http://auratusghoti.wikia.com/' target='_blank'>View the official wiki!</a></center> 
<script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script> 
<!-- Ad space --> 
<ins class='adsbygoogle' 
     style='display:block' 
     data-ad-client='ca-pub-1249390240201341' 
     data-ad-slot='2925505659' 
     data-ad-format='auto'></ins> 
<script> 
(adsbygoogle = window.adsbygoogle || []).push({}); 
</script> 
  </div> 
</div> "
FALSE)); 
         
}     

}
?>
I changed the embedded css a bit (setting these elements positions to 'fixed' breaks them out of their 'real' location). It's also unnecessary to have an extra set of doctype/body/html elements so I removed them. They already exist.

I also somehow spaced on the whole usergroup thing from earlier... and I wrote in a check to simply see if the user is logged in or not. If they're not, they'll see this. To still access the page '/login' and not automatically be redirected to the index, make sure you don't have my mod for that installed because then you'd never be able to log in.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 06-03-2015 at 05:24 PM.
Reply With Quote
  #5  
Old 06-03-2015, 05:05 PM
ilrak ilrak is offline
Goldfish Fanatic
 
Join Date: Aug 2014
Location: Utah
Posts: 57
Gender: Female
Credits: 11,615
ilrak is on a distinguished road
Default

Much better! thank you!


I ended up having to take out the <div> but now it looks functional (I did lose the google adsense at the bottom somehow so I'll tinker with that a bit). Now I just need to disable registration somehow (or just manually reject any that happen until the site is actually functioning like I want it to) and then I'm good!

Thank you again so much! You're always a very big help! :D
__________________
Auratus Ghoti - Please the gods with your school
Tumblr ~ Forum ~![/URL]
Reply With Quote
  #6  
Old 06-03-2015, 05:25 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,001
Kyttias is on a distinguished road
Default

Alright, if you'd still like to have it full screen and only when users are logged out, then you can revisit my last post (I made some edits).

(You could always rename the /register.php and /view/registerview.php pages temporarily so they cannot be found and that'll solve half the problem.)
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #7  
Old 06-03-2015, 05:31 PM
ilrak ilrak is offline
Goldfish Fanatic
 
Join Date: Aug 2014
Location: Utah
Posts: 57
Gender: Female
Credits: 11,615
ilrak is on a distinguished road
Default

Thank so much! That worked even better! Now I can work on the site without having to worry about anyone who isn't me seeing it!
__________________
Auratus Ghoti - Please the gods with your school
Tumblr ~ Forum ~![/URL]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Making Stats Page = Click Page & Lineages? squiggler Questions and Supports 2 02-22-2014 04:42 AM
Adopt Page & Pound Page change? tahbikat Questions and Supports 3 02-14-2014 03:19 PM


All times are GMT -5. The time now is 02:26 PM.

Currently Active Users: 602 (0 members and 602 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636