Sphere's coding problems
Posted 27 January 2009 - 12:07 AM
I call this calendar: INFINITE!
Yes, I was complaining at Google Services about Googlebot downloading over 300mb in 3 days...
Got that coming right!
At least fixed it to indeed exactly the period between the opening of my home, and now...
But, do you know a way of preventing GoogleBot from following only those marked as don't follow?
rel="nofollow" appearantly doesn't mean the bot won't follow the links, for some reason it'll only prevent the link from being ranked (which is odd imo)
That's it for now, my worldmap is almost done and my exam will not go well tomorrow!
Posted 08 February 2009 - 01:46 AM
has a problem again!
I can't seem to get my PHP-mod-rewrite to work.
It either works too good (thus, if a 404 is needed, it just goes to the main page)
Or it doesn't work at all (everything is a 404)...
I'll post my code tomorrow for the interested people.
I'm writing this code, to give people who are not familiar with Apache's .htaccess the opportunity to use some sort of mod-rewrite feature on their site.
Posted 18 February 2009 - 03:44 AM
Here's something, just a try:
(please replace the number with anything you like!)
That link working for you guys?
It should, but somehow, it only works at random for me!
Posted 14 August 2009 - 11:33 PM
I want my posting-members to do the following:
[poll=Question here]Answer 1
to output (0 == radiobutton):
0 - Answer 1
0 - Answer 2
0 - Answer 3
Well, mainly, what I run into, is that I can make the poll work visible, but the problem is storage. I can't find a way to store the stuff into a database without messing something up.
What I want is the database ONLY storing the post-number (as my site works by numbering, not titles) and the vote-count.
the idea is something like the database looks like this:
ID - Post# - Answer count
1 - 100 - 0;0;5
Something like that. But I just run stuck in how it works to the database. I can't post it without a full reload, which kinda resets all data for unknown reasons.
Anyone got a clue?
basecode is PHP/MySQL/AJAX
Posted 15 August 2009 - 06:06 AM
I would create three new tables. Something like this...
- polls - id | post_id | poll_text - options - id | poll_id | option_text - votes - id | option_id
option_id is a foreign key to the option chosen by someone (each row is a single vote)
poll_id is a foreign key to the poll that contains the option
post_id is a foreign key to the post that contains the poll
To get the current total for each option in a poll, you might do something like this psuedocode...
SELECT COUNT(*) FROM votes INNER JOIN options ON options.id = votes.option_id INNER JOIN polls ON polls.id = options.poll_id INNER JOIN posts ON posts.id = polls.post_id WHERE votes.option_id = $someOptionID
If I got the syntax correct, it should work. There is probably a better way to get the totals though. It might be better to just get all the votes for the poll in the current post and use PHP to calculate the totals.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users