kanaku 60 Posting Whiz

First, make sure that your site allows you to use php and gives you database access (usually mySQL).

When you finished making the files as instructed here, you have to upload those files to your site using FTP or whatever filemanager comes with your hosting package.

kanaku 60 Posting Whiz

Ok. So it's the bottommiddle.gif that's extending over the rounded corners.

You can do two things. One is to remove the bottommiddle.gif background and just add a border-bottom: 1px solid #575c72; line in the classes/IDs belonging to the elements or boxes I've highlighted in green in the attached file. (I can't figure out which classes belong to which box in your code, sorry)

The other solution is to change your .gif files. Add a solid color outside the rounded corners. (So the bottommiddle.gif won't show through) But this will make your design less 'portable' --- so try adding a border to your boxes first.

kanaku 60 Posting Whiz

I'm using a blog hosted at wordpress and for really long posts, I'm trying to add a "cut-the-crap" link to something else in the page.

Now for plain html, I know you can do it with this:

<p>Blah blah blah, this is going to be a long post so you can <a href="#endcrap">skip the crap</a> and avoid a lot of...
...
...
*very long text here*
...
...

<span id="endcrap">Still reading? Good.</span> blah blah blah again.

However, when I try to save the post, wordpress strips the id="endcrap" attributes in my posts. I've 'googled' this already and even in the wordpress forums, all the tutorials are on how to add a link to another post or a link off-site.

Since the blog is hosted at wordpress, I can't change the template so no php hacks allowed. =(

I'm hope someone can help me with this. Thanks!

kanaku 60 Posting Whiz

what u mean with ''Create a new file and name it dbConfig.php" ??

Open a text editor (like notepad) and copy the code into it. Then save the file as dbConfig.php.

kanaku 60 Posting Whiz

Isn't that the same screencap in your first post?
Do you have a screencap of what happens when you set

.BL
{
background-repeat: no-repeat;
}

Just to know if it's the bottommiddle.gif that's causing it.

Other solutions I could think of is to remove the transparency outside the rounded corners of your .gif backgrounds. But that would cause problems when you have a darker background... =0

First, please post a screencap of your page when bottommiddle.gif is set from repeat-x to no-repeat. You can just post an unlabeled screencap (one without the red markers or labels).

kanaku 60 Posting Whiz

I was thinking you could do it by joining the table to itself. But then you have the problem of not knowing if the page you're looking up is in the 3rd or 4th level of 'childhood'.

Anyway, this is the article on joining tables and this is the article on joining a table to itself.

If you decide to work with joins, you'll end up with a query similar to this:

SELECT
 t1.filename AS file,
 t2.filename AS parent1,
 t3.filename AS parent2 FROM files AS t1
INNER JOIN
 files AS t2
 on t2.fileID = t1.parentID
INNER JOIN
 files AS t3
 on t3.fileID = t2.parentID
WHERE
 a1.fileID = 'the file you are looking for';

You'll get a table that looks like this:

FILE | PARENT1 | PARENT2
--------------------------------------------------------------------
corridor_data | bia_walden_point | alaska

*EDIT #2*
This query will work only if there are 2 parent folders... I don't know how to dynamically change the query depending on the level of the file... sorry.

kanaku 60 Posting Whiz

Try:

<form>
<table border="0" width="100%">
<tr>
<td align="right" width="60%">
<select name="cmbcategory" size="1" onChange="submit();">
<option value="0">Select <?php if (isset($_GET['cmbcategory'])) {echo $_GET['cmbcategory'];} else echo "category"; ?></option>
<? $sql1=mysql_query("select name from categories") or die(mysql_error());
  while($row=mysql_fetch_array($sql1))
 {
	$category = $row['name'];
?>
 <option value="<?php echo $category; ?>"><?php echo  $category; ?></option>

 <?     
     }
  ?>
  </select>
   <?     
	    echo "<p>You are selected: '".$_GET['cmbcategory']."'</p>\n"; 
  ?>
 </td>		
</tr>
</table>
</form>
kanaku 60 Posting Whiz

You don't have to reopen the php tags in a heredoc (heredoc is the EOT thing you're using).

So if $ad_row['url'] contains the url, you can just include it as you would any other variable in php:

// HOORAY! SUCCESS!
echo <<<EOT
window.location= "{$ad_row['url']}";
EOT;
destroy();
?>

The curly braces are for the array value.
My source for heredoc info is http://www.hudzilla.org/php/2_6_3.php.

(Tell me if this worked.)

kanaku 60 Posting Whiz

I just googled this:
http://www.gridinsoft.com/protect.php

But basically what it does is just 'muck up' or confuse the code to make it hard for others to edit the source. =( The download is just a trial version.

kanaku 60 Posting Whiz

By "corner is destroyed" did you mean that a line extends past your rounded corners?

I know that you need repeat-x but have you tried hiding the background, just to test the result? Can you post a screencap of the page if the bottommiddle.gif is hidden?

kanaku 60 Posting Whiz

Your last class, at the bottom of the css file:

.BM
{
/*filter:progidXImageTransform.Microsoft.Alpha(Opacity=0, FinishOpacity=100, Style=3);*/
/*filter:progidXImageTransform.Microsoft.Gradient(startColorStr='#F6FCE6', endColorStr='#A0BB54', gradientType='1');*/
background-image: url(BottomMiddle.gif);
background-repeat:repeat-x;
height : 10px;
width: auto;
}

I don't know what the .gif background files looked like, but I take it that the repeat-x for bottommiddle is the culprit. Try changing the repeat-x to no-repeat.

kanaku 60 Posting Whiz

I'd say it's safe to start now with something around 700-800. Or what you can make a base of 800px but place the important elements at the center... then have the edges be 'open' to tiling so screens wider than 800px won't get a blank boring canvas.

kanaku 60 Posting Whiz

First, check out the competition by googling "dating site".

That should give you loads of ideas on how it's done. Most likely, you'll be needing photos of real people (unless you can draw from scratch or already have some graphics in mind) so you can search free stock photo sites for using "love" or "date" or "people" keywords. Be sure to check with the artist/photographer first if you can use their photo on your site...

The actual layout (columns? tabs? menu placement? etc) will depend on you. But you can try smashingmagazine for their showcase of design inspiration.

Other things you might want to plan are color schemes and JS effects for a more 'interactive' site design. From experience, web-geeks might shun the 'uselessness' of too much JS effects but 'the masses' love them --- so unless that's a geeky-dating site...

kanaku 60 Posting Whiz

Eep. I think that javascript is the only way to go.

PHP is (I don't know the formal term) but it only works when you 'submit' or 'send' the data. From experience, it's Javascript that handles browser events like onMouseOut, onChange, onClick, etc... (AJAX is still Javascript + PHP) so you're really going to need javascript.

Can you tell us why you can't use javascript? So we can think of a workaround.

(A question for the more informed people... can she use DHTML instead? Or does DHTML also use javascript?)

kanaku 60 Posting Whiz

Hide it in a sea of confusing code... hehe

But the only way I can think of is to scare them off with legal terms in your license or readme.txt file... because I think that as long as they can understand the code, they can probably remove it. (sorry it didn't help that much)

kanaku 60 Posting Whiz

I'm trying to make a membership system where users can 'approve' or 'disapprove' another member only once. If they have approved the member previously or disproved the member previously, I want to be able to detect it.

I also want to display the average user approval for each member on their profile. (# of approvals/ # of approval+disapproval received)

I'm thinking of having 2 tables:
1. The `members` table - basic user info
2. The `ratings` table - each row is an entry for when user#1 votes (+ or -) for user#2.

My concern is this:
1. Is this the most efficient way to implement such a system? If not, can you please suggest a better way to do it?
2. Will it take up too much resources if I have to query the ratings table everytime I have to fetch the average rating?

Thanks for helping me. *in advance haha*

kanaku 60 Posting Whiz

Eep. That's a load. Have you tried toggling the bottommiddle.gif on or off? It's the only thing with repeat-x that I could see in your code...

kanaku 60 Posting Whiz

If you're making a backup copy of your site, then you have access to the server? cpanel? FTP?

Why not just transfer your whole site structure using cpanel or FTP?

kanaku 60 Posting Whiz

If you liked WoW you'll also like runescape. It's free and you don't have to download a huge file. (Just a Java platform you download once).

Basically what you do in Runescape is level up your character's combat (ranging, defense, strength, attack) and/or skills (smithing, cooking, fishing --- and loads more), kill monsters, do quests, join clans for clan wars or enter worlds where you can engage in player-killing.

--- is it obvious I'm a fan?

kanaku 60 Posting Whiz

The most popular way of centering your content is to put your whole body in one div with and id (ie container) and add this in your css code:

div#container
{
margin: 0 auto;
width: (the width you want, could be in %, px, or em)
}

The margin attribute can have 2, 3, or 4 values. If it contains just 2 values (like in the example above), the first value is for the top and bottom margins and the second value is for the left and right margins.

When you specify 'auto' whatever space is not used by your width gets divided into two. So if your layout is 800px and the screen width is 1000px, the 'auto' value makes a 100px margin on the left and right side.


FOR CURIOSITY'S SAKE...
Just for reference, the html's body looks like this:

<body>
<div id="container">

... all the content stuff here...

</div>
</body>

When you use 4 values in your margin attribute, they are specified in the following order: top, right, bottom, left (clockwise from the top). I can't remember what's the 3-value for. hehe

kanaku 60 Posting Whiz

I didn't know where else to put this thread *sorry if it's in the wrong forum*

I want to go an a hiatus, and I found this .htaccess tutorial where you can redirect users from an old file or directory to a new file or directory...

I was wondering if I can do this for the whole site. (ie) Can I put this line in the .htaccess file?

Redirect / http://mysite.com/hiatusmessage.html
kanaku 60 Posting Whiz

If you're the only one that needs access, I'd say put the file in a separate directory and use an htaccess file.

OK. Thanks, I think this is the one I need. :cheesy:

kanaku 60 Posting Whiz

I'm using an html form to add to a list, specifically a flatfile database called demo3.txt. The add.php file is this:

<?php

$name = $_POST['name'];
$nickname = $_POST['nickname'];
$motto = $_POST['motto'];

$fp = fopen("demo3.txt","a");

if(!$fp) {
    echo 'Error: Cannot open file.';
    exit;
}

fwrite($fp, "\r\n".$name."|".$nickname."|".$motto);


echo 'The data has been added to the database. <a href="form.html">Add more?</a>';

fclose($fp);
?>

The form code looks like this:

<form action="add.php" method="post">
<label>Member name:</label><input type="text" name="name" size="20"><br>
<label>Nickname:</label><input type="text" name="nickname" size="20"><br>
<label>Motto:</label><textarea name="motto" rows="5" cols="50"></textarea><br>
<input type="submit" value="Add to List"> <input type="reset" value="Clear Form">
</form>

I haven't uploaded the codes to the site yet because I was thinking that people might be able to access the form.html page and they might mess up the flatfile database. Is there anything I can do to secure the form.html page so that only people with a password can access it?

For example, if I want to set-up an admin login page, how do I code that with php? Do I need to work with a MySQL database? If there's a way to do it without using MySQL, I'd really appreciate it.

Thanks to people who'll help, if the question isn't clear, please tell me so I could clear things up, I'd really appreciate help on this. Thanks!

kanaku 60 Posting Whiz

I don't like cauliflowers and brocolli. Sometimes some worms get stuck between the little tree branches and when you bite on them.. :blech:

As for insects, it depends on my mood. But there was one time when I brought back a roly-poly to our dorm, because my roommate was really scared of them, I told her: I have a surprise for you, it's in your desk.

When she opened the box, the insect wasn't there! I was the one who got scared, because I have this fear of insects crawling into my ear and eating my brain (I think I happened to watch an episode of X-files where the worms enter your body but that was years ago.. maybe when I was 4 or 6?).

Good thing my other roommate found the roly-poly in her shoe. HAHA.. From then on, I limited my practical jokes to the non-insectopia category.

kanaku 60 Posting Whiz

Well, aside from that weird thing, nothing else has happened. I'll just take your advice but ask someone older, maybe my neighbor, to do it. Now I'm scared to touch the pc. hehe.. But thanks so much for the reply.

kanaku 60 Posting Whiz

Well, I'm not terrified of clowns because the only clown I got to see up close failed his magic trick.. mainly because my friends and I figured out what he was doing.. so you could say that we had the power over the clown. hehe..

I'm still a child. So I find it weird that this thread is "childhood phobias"..

Anyway, I hate the dark too. But what really scares me are sudden, scary sounds IN the dark. That's when I really start to freak out and bolt. Shadows don't help too.. I'd rather have pitch-black than shadowy kind of dark. Imagination can kill you. X|


But what really scares me worse than anything.. is having to go to a place without a decent toilet! Hurr.. public toilets are scary.. haha..

kanaku 60 Posting Whiz

My dad had this Japanese friend who stayed with us for some time and she taught us how to cook KOLOKE (or is it KOROKE?)


It's simple and good if you're a kid. Or if you're lazy and have lots of kids to help you out.


Just boil 6 medium-sized potatoes until they're so soft, when you poke them with a fork and try to lift them, they slide off the fork and fall back into the boiling water (uh, you might want to be careful with the hot water).

While you're boiling the potatoes, chop 2 large white onions and heat them in oil together w/ 1/2 kilo of ground pork or beef. When the meat is cooked, drain the extra oil.

Now, get back to those mushy potatoes. Peel them and mash them up. Mix in the meat (it's actually up to you to determine the potato-meat ratio, the girl who taught me used less pork.. but I love meat so I increase the pork ratio) and season with salt and pepper (again, you decide how much salt and pepper to use).


Ask the kids (hehe..) to make oblong-shaped potato-meat mixtures (it's like letting them play with clay but make sure they wash their hands first).


Roll the oblong stuff in flour, then in beaten egg and in bread crumbs (you might want to make sure that it's the japanese brand from the grocery, …

kanaku 60 Posting Whiz

I'm using Windows XP.

I got a new flash disk and I used it outside in an internet cafe. When I got home, there was this weird file that suddenly popped out so I supposed that it was a virus or some malicious file because I haven't seen it before. The filename was AUTORUN, I think the extension was .dll. Anyway, I deleted it.

Now when I open my computer, and double click on the icon for drive C, nothing happens. I can still open the other folders (like the documents folder of my sister etc..) and the drive A, and also drive H (for the cd) but if I want to open drive C, I still have to right-click and choose explore.

Is there a way to fix things so I could make the "double-click to open" still work for drive C?

Thanks to anyone who'll help. :cheesy: