Posts: 535
Threads: 31
Joined: Jul 2010
Here is the 'tip of day' code:
PHP Code:
<b>Tip of the Day</b>:
<br />
<?php $tip_of_day = file('../includes/words/tip_of_day.txt');
echo $tip_of_day[(intval(date('d'))-1) % sizeof($tip_of_day)]; ?>
<p />
put it after the statistics section (though it doesn't matter). The only thing you need is a text file "comments/includes/words/tip_of_day.txt" With all of the tips, each one on a new line.
Now, to work on the layout.
I'm giving you three guesses...
Posts: 535
Threads: 31
Joined: Jul 2010
I've finished the work on the new layout. I have tested it in various browsers and it works in all of them (older browsers just won't have the text "centered" because of lack support for the "inline-block" display). Check it out. It comes with the 'tip of the day' code already implemented, but without the tips. Unfortunately, there is one major flaw for the 'tip of day' code: you can only have as many entries as the length of the month (28-31).So, unless you want to be limited to ~30 tips, then you'll have to wait for me to release a better version.
CSS which needs to be modified in "admin/css/panel.css" near the end:
Code:
.news {
position: relative;
width: 90%;
padding: 3px;
margin: auto;
border: 1px solid #EFE1B9;
background-color: #FEF6E0;
overflow: auto;
color: #555;
text-align:center;
}
.centered_content{
display:inline-block;
width:auto;
text-align: left;
}
.left-column{
width:50%;
float:left;
text-align:center;
}
.right-column{
width:50%;
float:right;
text-align:center;
}
The new 'dashboard.php' is attached below. Don't forget to create the tips file, or comment out this:
PHP Code:
<b>Tip of the Day</b>:
<br />
<?php $tip_of_day = file('../includes/words/tip_of_day.txt');
echo $tip_of_day[(intval(date('d'))-1) % sizeof($tip_of_day)]; ?>
<p />
Proceeding with tips fix.
EDIT: Updated attachment with new 'tip of the day' code.
I'm giving you three guesses...
Posts: 535
Threads: 31
Joined: Jul 2010
I'm giving you three guesses...
Posts: 535
Threads: 31
Joined: Jul 2010
Screenshot of how the custom layout looks like.
I'm giving you three guesses...
Posts: 535
Threads: 31
Joined: Jul 2010
For anyone who is interested, here is a sample tip_of_day.txt file.
I'm giving you three guesses...