[QUOTE=jaybuz;22476759]Guys, guys... helppppp
[url]http://pastie.org/997217[/url]
(fucken bb tags)[/QUOTE]
[php]
<?php
// if sent is not set then checked will equal false otherwise true
$checked = !empty($_POST['sent']); // if it's true you set it to true, if not you set it to false. why not just set it to the value. also use empty() instead of isset()
$sent = !empty($_POST['sent']) ? $checked : false;
if ($checked){
// if email was sent
if ($sent){ // use curly bracket things
?>
<div id="formResult" class="sent">Your email has been sent, thanks for taking your time to talk to us!</div>
<?php
// if email wasn't sent
}else{
?>
<div id="formResult" class="error">There was problem sending the email. Please try again later.</div>
<?php
}
}
?>
[/php]
[editline]01:04AM[/editline]
For some dumb reason FP replaces "empty" with "emptyempty". Replace it back.
Which would be better for storing badges per user:
1. table with userid, badge name & image
2. table of pre-defined badges, and a linking table (badge_id, user_id)
Second option is more standard/configurable, but the first would be a less 'intense' query, and easier to have 'unique' badges per user. Standard repeat badges will be sorted by a cron of functions, so either method works for that.
I would be inclined to say have a table of pre-defined badges and have a linking table.
Best way to 'strongly-type' your badges if you get what I mean.
[QUOTE=sseug;22477164][php]
<?php
// if sent is not set then checked will equal false otherwise true
$checked = !empty($_POST['sent']); // if it's true you set it to true, if not you set it to false. why not just set it to the value. also use empty() instead of isset()
$sent = !empty($_POST['sent']) ? $checked : false;
if ($checked){
// if email was sent
if ($sent){ // use curly bracket things
?>
<div id="formResult" class="sent">Your email has been sent, thanks for taking your time to talk to us!</div>
<?php
// if email wasn't sent
}else{
?>
<div id="formResult" class="error">There was problem sending the email. Please try again later.</div>
<?php
}
}
?>
[/php]
[editline]01:04AM[/editline]
For some dumb reason FP replaces "empty" with "emptyempty". Replace it back.[/QUOTE]
Thanks man, I will try it later. It was 2AM when I was doing that and I haven't done any PHP for a while, so, that didn't really help.. :P
I'm just fiddling around with Jquery at the moment, nothing special.
Ugh, I'm horrible on javascript so I'm doing some extremely ugly coding at the moment.
The thing is that I don't really know how to check the state of a slidetoggle.
So I just used hide on everything expect the div the button opens.
It works, but It's quite ugly and it doesn't work if you press buttons fast, anyone want to help a newbie? :3:
[CODE]<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".content").hide();
jQuery(".content2").hide();
jQuery(".content3").hide();
jQuery(".content4").hide();
jQuery(".content5").hide();
jQuery(".content6").hide();
jQuery("#fest1").click(function()
{
jQuery(".content2").hide();
jQuery(".content3").hide();
jQuery(".content4").hide();
jQuery(".content5").hide();
jQuery(".content6").hide();
jQuery(".content").slideToggle(600);
});
jQuery("#fest2").click(function()
{
jQuery(".content").hide();
jQuery(".content3").hide();
jQuery(".content4").hide();
jQuery(".content5").hide();
jQuery(".content6").hide();
jQuery(".content2").slideToggle(600);
});
jQuery("#fest3").click(function()
{
jQuery(".content").hide();
jQuery(".content2").hide();
jQuery(".content4").hide();
jQuery(".content5").hide();
jQuery(".content6").hide();
jQuery(".content3").slideToggle(600);
});
jQuery("#fest4").click(function()
{
jQuery(".content").hide();
jQuery(".content2").hide();
jQuery(".content3").hide();
jQuery(".content5").hide();
jQuery(".content6").hide();
jQuery(".content4").slideToggle(600);
});
jQuery("#fest5").click(function()
{
jQuery(".content").hide();
jQuery(".content2").hide();
jQuery(".content3").hide();
jQuery(".content4").hide();
jQuery(".content6").hide();
jQuery(".content5").slideToggle(600);
});
jQuery("#fest6").click(function()
{
jQuery(".content5").hide();
jQuery(".content4").hide();
jQuery(".content3").hide();
jQuery(".content2").hide();
jQuery(".content").hide();
jQuery(".content6").slideToggle(600);
});
});
</script>[/CODE]
Try adding a moving variable then when slideToggle starts. Then when it finishes have it change the variable back to false. And have it check when you click.
[QUOTE=RaDiVaX;22485188]I'm just fiddling around with Jquery at the moment, nothing special.
Ugh, I'm horrible on javascript so I'm doing some extremely ugly coding at the moment.
The thing is that I don't really know how to check the state of a slidetoggle.
So I just used hide on everything expect the div the button opens.
It works, but It's quite ugly and it doesn't work if you press buttons fast, anyone want to help a newbie? :3:[/quote]
[CODE]<script type="text/javascript">$(document).ready(function() {
var $contents = 6
// Hide all contents
for ($i = 1; $i < $contents; $i++)
{
$(".content"+$i).hide();
}
$("#fest1").click(function()
{
hideContents($contents, 1);
});
$("#fest2").click(function()
{
hideContents($contents, 2);
});
$("#fest3").click(function()
{
hideContents($contents, 3);
});
$("#fest4").click(function()
{
hideContents($contents, 4);
});
$("#fest5").click(function()
{
hideContents($contents, 5);
});
$("#fest6").click(function()
{
hideContents($contents, 6);
});
function hideContents($contents, $shown)
{
for ($i = 1; $i < $contents; $i++)
{
if ($i == $shown) continue;
$(".content"+$i).hide();
}
$(".content"+$shown).slideToggle(600);
}
});</script>[/CODE]Not sure if this will work as I planned it would but I hope it does. :)
[QUOTE=jaybuz;22487001][CODE]-code-[/CODE]Not sure if this will work as I planned it would but I hope it does. :)[/QUOTE]
Actually I got it to work thanks to you, thanks! :3:
The way you're doing it seems kinda silly. How about...
[code]
<div class="fest" id="1"> </div>
[/code]
[code]
$(".fest").click(function()
{
hideContents($contents, $(this).attr('id'));
});
[/code]
...?
[QUOTE=sseug;22477164][php]
- code -
[/php][editline]01:04AM[/editline]
For some dumb reason FP replaces "empty" with "emptyempty". Replace it back.[/QUOTE]
It was actually fine apart from the fact I used POST instead of GET. Thanks anyway.
[editline]05:17PM[/editline]
[QUOTE=sseug;22487273]The way you're doing it seems kinda silly. How about...
[code]
<div class="fest" id="1"> </div>
[/code][code]
$(".fest").click(function()
{
hideContents($contents, $(this).attr('id'));
});
[/code]...?[/QUOTE]
That's better. I need to learn some of the main stuff in jquery.
I've got this annoying bug on my theme in IE where, if you click on any of the portfolio images the full image is only displayed in the size of the thumbnail version, GAHHH!
[url]http://rewindstudios.com/portfolio/BlackAndWhite/portfolio.html[/url]
It even happens on IE 8, this is fail.
[QUOTE=jaybuz;22495384]I've got this annoying bug on my theme in IE where, if you click on any of the portfolio images the full image is only displayed in the size of the thumbnail version, GAHHH!
[url]http://rewindstudios.com/portfolio/BlackAndWhite/portfolio.html[/url]
It even happens on IE 8, this is fail.[/QUOTE]That is sexy nonetheless.
[QUOTE=KSI;22495561]That is sexy nonetheless.[/QUOTE]
Do they appear the wrong dimensions for you because I was just messing around with them and one of them actually started opening the right size so I thought it might actually be some really weird cache problem.
[img]http://yipoorg.lg1x8.simplecdn.net/d63573.download[/img]
:D It's coming together slowly!
I see what you're going for with the text in the lower left, but you should add at least a bit of padding on that.
Im working on my first website, and its actually coming along quite nicely.
The buttons just need to size from the middle and then i'll be happy.
[URL]http://viksko.webng.com/index.html[/URL]
[QUOTE=jmazouri;22503842]I see what you're going for with the text in the lower left, but you should add at least a bit of padding on that.[/QUOTE]
Bleh, I didn't bother saving the .psd's, I'll do it eventually :P
I originally had screenshots randomly sliding in/out across all the games, looked a bit messy though.
Overall my current aim is to spice up the pages I've finished on the code side, to make them more visual and exciting.
So I heard turb is working on a Linux AnyHub client. :v:
Fizzadar, what you do reminds me of what some guy I know did: [url]http://www.modmywhat.com/[/url]
I somewhat want to create a new page for myself, just tried out pagelime yesterday and seems like what I needed.
[QUOTE=chill_dude;22503962]Im working on my first website, and its actually coming along quite nicely.
The buttons just need to size from the middle and then i'll be happy.
[URL]http://viksko.webng.com/index.html[/URL][/QUOTE]
You may need to look into some design tutorials. It's bland and I'd highly recommend that you remove the ad on the page.
Damn that's coming along nicely fizz.
[QUOTE=EDDY TT;22510423]Damn that's coming along nicely fizz.[/QUOTE]
Thanks :)
Rewrote my thumb script to avoid stupid white crap on sides of thumbnails:
[url]http://yipoorg.lg1x8.simplecdn.net/b395e7.download[/url]
into >>
[url]http://yipoorg.lg1x8.simplecdn.net/685c0a.download[/url]
[QUOTE=andersonmat;22509920]You may need to look into some design tutorials. It's bland and I'd highly recommend that you remove the ad on the page.[/QUOTE]
The ad is because of the host, so i cant change that. But i'll check out the rest.
[QUOTE=chill_dude;22512160]The ad is because of the host, so i cant change that. But i'll check out the rest.[/QUOTE]
You should really pay for hosting then, or find proper free hosting.
Do valve & steam provide XML feeds for individual news categories, because all I can find is a global news feed, which is useless.
If not I've no idea what to put on the sidebar of item listing on game pages, except for a nice advert and possibly some basic game info (genre, etc).
[editline]05:30PM[/editline]
nevermind this stuff, merging game & category pages since they're almost identical
Sorry, you need to Log In to post a reply to this thread.