You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!

Author Search Results: 'Anthony-john5'

We found 134 matches.


<< < > >>

Viewing 1-30 of 134 matches. 1 | 2 | 3 | 4 | 5

1.

None

Topic: I need domain + hosting

Posted: 02/25/04 11:32 AM

Forum: Programming

I'm almost certain the cheapest (but reliable too) domain name will come from www.123reg.co.uk have a look at their hosting packages as well. Check out www.web-mania.com for the hosting.


2.

Happy

Topic: chmod

Posted: 02/23/04 02:42 PM

Forum: Programming

At 2/22/04 04:10 PM, liljim wrote:
At 2/22/04 03:25 PM, Anthony_john5 wrote: Sorry what do you mean by below? Are you saying I should create a folder at my root directory called 'includes'?
Right. Not that I understand your logic behind doing this (what exactly is inside the files that you don't want the users accessing?), another alternative would be to define a constant in the main file and check whether or not that constant is defined (using defined()) in the include file.

Well basically I've writted a simple script (dberror.php) which is called when an SQL query occurs and logs is to a text file. My problem was that if the script was run directly it added blank entries. Thanks for your help, I've added an extra few lines to ensure that the phpBB defining has taken place, which occurs at the top of my pages. :-)

- Anthony


3.

None

Topic: chmod

Posted: 02/22/04 03:25 PM

Forum: Programming

Sorry what do you mean by below? Are you saying I should create a folder at my root directory called 'includes'? If that is what you're saying what do I need to do to that to stop users running scripts inside it?


4.

None

Topic: chmod

Posted: 02/21/04 03:02 PM

Forum: Programming

1) What would the permissions be for a php script if I wish it to be allowed to be included but it cannot be directly run by the user through their browser?

2) Does anyone have a tutorial/information about chmod?

- Anthony


5.

Angry

Topic: $HTTP_REFERRER

Posted: 02/10/04 12:15 PM

Forum: Programming

Thanks a lot for youe help, it's all working as I'd hoped for now.

- Anthony


6.

None

Topic: $HTTP_REFERRER

Posted: 02/09/04 10:22 AM

Forum: Programming

Am I correct in saying that the only way to determine a referrer URL in PHP is by using $HTTP_REFERRER?

Also, is there a variable that could be used to determine the current URL, such as for this page it is http://www.newgrounds.com/bbs/post.php?fid=7 ?

- Anthony


7.

Questioning

Topic: COUNT(*)

Posted: 02/01/04 03:17 PM

Forum: Programming

From reading the page: http://www.w3schools.com/sql/func_count_ast.asp I see that it is possible to count the number of rows in a particular table. I have used the following query in phpMyAdmin:

SELECT COUNT( * )
FROM phpbb_content_jokes

and it works fine, returning the value 27 under the heading of COUNT( * ) however when it comes to returning this on a PHP page I don't know what the variable would be. Can anyone help me?

- Anthony


8.

Happy

Topic: Insert into ... from

Posted: 02/01/04 10:36 AM

Forum: Programming

It's not really anything to do with phpBB it's just the suffix for the table.

Thanks a lot for your help. I hadn't relalised that at the time. It seems to make more sense to add both the score and the votes into the table, so I've gone with that. And I've made sure that it has to have been voted on to get into the table.

INSERT INTO `phpbb_content_top` ( `oldid` , `title` , `author` , `author_id` , `warning`, `score`, `votes`, `type`, `date`)
SELECT `id` , `title` , `author` , `author_id` , `warning`, `score`, `votes`, 'jokes', '$date'
FROM `phpbb_content_jokes` WHERE `votes` > 0
ORDER BY (
score / votes
) DESC
LIMIT 1

- Anthony


9.

None

Topic: Insert into ... from

Posted: 02/01/04 08:53 AM

Forum: Programming

I've decided to have an automated script pick the highest rated joke and sms message at the end of every month. Here is the query that I have tried for the jokes part:

PHP:
---------------------------------------------------------------------------
-----

INSERT INTO `phpbb_content_top` ( `oldid` , `title` , `author` , `author_id` , `warning` , `score` , `type` , `date` )
SELECT `id` , `title` , `author` , `author_id` , `warning` , (
score / votes
) AS `score` , 'jokes', '04-04-04'
FROM `phpbb_content_jokes`
ORDER BY (
score / votes
) DESC
LIMIT 1

---------------------------------------------------------------------------
-----

However, the date, score and type are not entered (the joke does not have a warning.) If unsure see screenshot
I'm also running what I feel to be an identical query for the sms section:

PHP:
---------------------------------------------------------------------------
-----

INSERT INTO `phpbb_content_top` ( `oldid` , `title` , `author` , `author_id` , `warning`, `score`, `type`, `date`)
SELECT `id` , `title` , `author` , `author_id` , `warning`, (score/votes) AS `score`, 'sms', '04-04-04'
FROM `phpbb_content_sms`
ORDER BY (
score / votes
) DESC
LIMIT 1

---------------------------------------------------------------------------
-----

which leads to everything being added successfully.

The table types that they are both being selected from are not identical and that is the only thing that I can see that is different between the two...

phpbb_content_sms (works)

phpbb_content_jokes (does not work)

- Anthony


10.

Questioning

Topic: Table type

Posted: 01/31/04 10:31 AM

Forum: Programming

For the shoutbox I'm making, I want to record the user's IP addresses. In the past I've used mediumtext. However I was wondering if there is a more appropriate table type that I should be using. I am using MYSQL.

- Anthony


11.

None

Topic: Placing a table off-center...

Posted: 01/25/04 01:43 PM

Forum: Programming

I'm not completely sure about this, but what about using layers? Basically they're like a table but desinged for this sort of thing with one row and one column. You can define their size and positioning with either pixels or on a percentage of the user's screen basis.

<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 100; top: 100"></div>

You can replace Layer1 with an appropriate name and the width, height, left and top values with others such as 450px or 10%.

Hope that helps a little.

- Anthony


12.

Questioning

Topic: SWF Dimensions

Posted: 01/01/04 03:15 PM

Forum: Programming

Thanks for everyone's responses. I've been playing around trying to use getimagesize() for a long time. But unfortunately the only reason it wasn't working was because I was trying to upload a blank swf file!


13.

None

Topic: SWF Dimensions

Posted: 12/29/03 02:06 PM

Forum: Programming

Yeah, that's what led me to believe that it wasn't possible. But it's always worth asking anyway. When you view the properties tab in windows it's not detailed there anyway, so I'm assuming that it's coded into the swf file and then loaded by the flash player. That also explains why you have to include it's dimensions in html.

Not to worry, having two more text boxes is alright. :)


14.

None

Topic: SWF Dimensions

Posted: 12/29/03 10:32 AM

Forum: Programming

Am I right in saying that it is not possible to check an .swf file's dimensions on the server using PHP?

- Anthony


15.

None

Topic: Stylesheets

Posted: 12/21/03 06:02 PM

Forum: Programming

1) What is considered to be the best (preferably free) stylesheet editor.

2) Can anybody point me in the direction of a few stylesheet tutorials for the beginner.

3) On my site I have two stylesheets. The first is subSilver which comes as default with phpBB. The other is Aeolus which I also got off the phpBB site. On the subilver sytlesheet if the suer increases the font size the font on the screen increases whcih causes problems on windowed pages. However this is not the case on these same pages when using the Aeolus stylesheet. Is anybody able to tell me what I need to change\add to the subSilver so that the user is not able to do this. :-)

- Anthony


16.

Happy

Topic: Voting script

Posted: 12/21/03 05:03 PM

Forum: Programming

Thanks a lot for your script. When I get the chance (more than likely after Christmas,) I'll compare the two and hopefully make improvements to mine. :-)

- Anthony


17.

None

Topic: Voting script

Posted: 12/17/03 11:55 AM

Forum: Programming

Thanks, I did wonder if there was a better way of doing that. The $userdata comes from phpBB and just allows you to pull user info from the db more easily. :) Thanks a lot for your help and Merry Christmas.

The script runs fine, I just wanted to make sure that whilst I'm learning new things, I'm learning them the right way.

- Anthony


18.

None

Topic: PHP Programming Help

Posted: 12/16/03 12:12 PM

Forum: Programming

Sure, do you want me to send them to the address on your profile? Make sure it has about 2mb of free space. :)


19.

Thinking

Topic: PHP Programming Help

Posted: 12/15/03 11:38 AM

Forum: Programming

I remember my first trying to learn PHP and the struggle so, first check out the links here. Before you start be sure to get a good grasp of the syntax, operators and conditional statements before you start.

Also be sure to look at the PHP manual which should contain almost all of the information you will need.

There are numerous sites dedicated to PHP tutorials including:
www.phpbuilder.com
http://www.kirupa.com/web/server.htm
http://www.pengtot.de/php/
http://www.hotscripts.com/PHP/Tips_and_Tutorials/index.html

Forums dedicated to helping users with PHP include
www.phpbuilder.com/board/
http://www.hotscripts.com/PHP/Online_Communities/index.html
http://www.programmingtalk.com/

Also be sure to check out the
scripts and programs on hotscripts.

If you need a good PHP editor check out textpad from http://www.textpad.com/ if you do decide to download it be sure to also get PHP syntax highlighting from the add-ons page. Note textpad is offered as a fully featured, unlimited use evaluation trial and costs (offhand) about $20 to buy.

You may also need an FTP client, I would reccomend WSFTP. However there are others around such as cute ftp.

If you're interested let me know as I have several PHP ebooks that I would be willing to email to you.

Hope that helps. :)


20.

None

Topic: Voting script

Posted: 12/11/03 07:04 AM

Forum: Programming

Thanks a lot for your help I think I've managed to fix everything you suggested:

1) Sorted the first query out
2) Removed the while loop
3) Checked that $id is a numberic value
4) Checked that the vote is a numeric value
5) Checked that the vote is in the specified range
6) Added the hidden field for the id

I'd heard of using a hidden field before but I thought there was another way that I'd read about somewhere...

here's the new script:

# Check that the id passed is a number
if (is_numeric($id))
{
}
else
{
echo 'Error: That id is not a valid integer';
exit();
}

#Assign the query a variable so that it can be parsed by the custom error handler
$query = "SELECT `score`, `votes` FROM phpbb_content_sms WHERE `id` = $id";
$result = @mysql_query($query, $connection)
or ThrowError("error with query: " . mysql_error() . "\n\nQuery: " . $query);

if (mysql_num_rows($result) < 1)
{
echo 'Error: That entry does not exist';
exit();
}

# Assign a variable to the row
$row = mysql_fetch_array($result);

# If the vote from the form is numberic give the new total score a value, else the appropriate error message
if (is_numeric($vote))
{
$newtotalscore = ($row['score']+$vote);
}
else
{
echo 'Error the vote is not a valid integer';
exit();
}

# Assign the new total number of votes by adding one to the current total
$newtotalvotes = $row['votes']+1;

# Update the database with the new info
$query = "UPDATE phpbb_content_sms SET `score` = '$newtotalscore', `votes` = '$newtotalvotes' WHERE `id` = '$id'";
@mysql_query($query, $connection)
or ThrowError("error with query: " . mysql_error() . "\n\nQuery: " . $query);

# Leave outside curl brackets so that if it's the first vote the new score if establised for the user message
$newscore = ($newtotalscore / $newtotalvotes);

# If the votes is greater than zero assign appropriate user messages otherwise skip so that php does not try to divide by zero
if ($row['votes'] > 0)
{
$originalscore = ($row['score'] / $row['votes']);

if ($originalscore > $newscore)
{
$difference = ($originalscore - $newscore);
$message = ' lowered this entry by '.$difference;
}
elseif ($originalscore < $newscore)
{
$difference = ($newscore - $originalscore);
$message = ' raised this entry by '.$difference;
}
elseif ($originalscore == $newscore)
{
$message = ' helped keep this entry at '.$newscore;
}
}

# If this is the first vote (i.e $row['votes'] is zero) give the user message a value that they have not changed the score
else
{
$message = ' helped keep this entry at '.$newscore;
}

# Echo the user a message for voting
echo 'Thanks for voting '.$userdata['username'].' your vote of '.$vote.$message.' to give it a new score of '.$newscore;

I'd appreicate it greatly if you could have a quick look through to see if there are any other errors.

- Anthony


21.

Questioning

Topic: Voting script

Posted: 12/07/03 04:12 PM

Forum: Programming

I've decided to improve the jokes section on my website my including a rating system from one to five. I've added the following code to the bottom of the view page:

<br>Rate this entry:
<?php
echo'<form method="post" action="vote.php?id='.$id.'">
<select name="vote">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<input type="submit" name="Submit" value="Vote">
</form>
</p>';
?>

and the following to the actual vote.php page

# Check that the submit button has been pressed and the user has not executed script directly
if ($submit == "Submit")
{
#Assign the query a variable so that it can be parsed by the custom error handler
$query = "SELECT `score`, `votes` FROM phpbb_content_sms WHERE `id` = $id";
@mysql_query($query, $connection)
or ThrowError("error with query: " . mysql_error() . "\n\nQuery: " . $query);

$result = mysql_query($query);
while( $row = mysql_fetch_array($result) )

{
$newscore == ($row['score']+$vote);
$newvotes == $row['votes']++;

echo $newscore;
echo $newvotes;

#Assign the query a variable so that it can be parsed by the custom error handler
$query = "UPDATE phpbb_content_sms SET `score` = '$newscore', `votes` = '$newvotes' WHERE `id` = '$id'";
@mysql_query($query, $connection)
or ThrowError("error with query: " . mysql_error() . "\n\nQuery: " . $query);

}

}

The second part is probably the most horrible coding ever, and it doesn't work. I don't want anybody to write the new code for me, just to talk me through what should be happening.

Secondly I want to pass the joke id from the view.php page to the vote.php without having to have it in the URL (i.e vote.php?id=7) Could somone either, talk me through it or link me to a tutorial because I've searched the manual teim and time again and I don't get it :)

- Anthony


22.

Thinking

Topic: PHP Hosts or wat ever

Posted: 11/15/03 01:43 PM

Forum: Programming

Although in the past Lycos UK has been slow and with large amounts of downtime, I think they've taken steps to improve, so it's worth a look. Also try http://www.coolfreepages.com/

- Anthony


23.

Questioning

Topic: PHP Uploads

Posted: 11/10/03 02:22 PM

Forum: Programming

For the past few weeks I've been playing around with making an Ecard section for my site. Pretty much everything is in place, apart from the actual uploading of the files. Yes a pretty major part I know! I've checked the PHP manual and checked several other fourms, however I have yet to figure it out. All I want is a simple script that I can add to the bottom of my existing HTML form (from which the values are passed to a PHP script) to upload files, to a chosen directory and with a chosen file name. If anyone can help me I'd much appreciate it.

- Anthony


24.

Angry

Topic: Flash MX 2004?

Posted: 09/14/03 01:24 PM

Forum: Flash

Let the whole 72mb download on dial-up and now when I try to install it, it claims 'Macromedia Flash MX 2004 is not supported on this operating system. Please refer to the release notes for supported operating systems.' So basically I wasted my time. It says you can use it on Windows ME though!


25.

None

Topic: The BLAMming Club:Enemies of CRAP

Posted: 08/11/03 06:24 AM

Forum: Clubs & Crews

At 8/9/03 05:30 AM, BaKsHi wrote: ok i signed up for your forums. hey they quite nice!

Thanks ;). Welcome to the club.


26.

None

Topic: I Need PHP Help

Posted: 07/12/03 06:53 AM

Forum: Programming

At 7/12/03 05:19 AM, KrYpToNiX wrote: OooOoooOOooo I cna DEFIENTLY Help, if you want CUSTOM scripts ask me. If you want some scripts fast, access them here:

www.hotscripts.com -> PHP -> Pick A catergorie

And to the Best Web Portal System: e107, www.e107.com

Most easiest, reliable, and fast CSS config I EVER USED!!

I'm not sure which is the best portal system, I've only ever used phpNuke, but decided it was too complicated.

The link for e107 should be www.e107.org

KrYpToNiX what scripts have you written in the past and who for?


27.

Happy

Topic: Need help on watching movie on NG

Posted: 07/11/03 03:37 PM

Forum: Programming

If you have problems in future post and if I read them I'll do my best to help. :)


28.

None

Topic: I Need PHP Help

Posted: 07/10/03 04:15 PM

Forum: Programming

At 7/7/03 08:57 PM, Pinhead84 wrote: Me and my friend have a site (Dancin Manson Productions) which features our flash work. I am working on a new design (VIEW NEW DESIGN) now.

Nice design


Stuff we want that needs PHP:
-Portal System (password protected so only people on the Flash Team can use it)

http://www.hotscripts.com/PHP/...rams/Portal_Systems/index.html

-Voting system for our flash works

http://www.hotscripts.com/cgi-...D&query=voting&catid=2

-A way for everyone on the flash team to post news to the main site

http://www.hotscripts.com/PHP/...ams/News_Publishing/index.html

-Some other little things...

Hopefull that will help


29.

None

Topic: help

Posted: 07/10/03 04:05 PM

Forum: Programming

At 7/10/03 01:41 PM, X_treme wrote: Is there a way to have users login to my site, with a username and password and remain logged in until they leave the site without using MySQL.

Cookies

Right now i am just using javascript and the user and pass is stored in there, so only users can post things. But the problem is that when new users register they have to wait until i change the .js file. Can the js file be written to automaticly when a user registers, or can i do it with another language without using MySQL. Help would really be appreciated, thank you.

I'm sorry but I don't think so, the only other thing I can think of is them being written to textfile, although I've no idea of how secure this would be. If you were to decide to do it with PHP and MYSQL, which I think would be the best option, remember there's plenty of people around, on this forum and others only too willing to help you. :)

Good luck


30.

None

Topic: windoze desk bg

Posted: 07/10/03 03:57 PM

Forum: Programming

I wouldn't know much about this sort of stuff, but I seriously doubt it's possible, certainly not with PHP or without a download. Why would you want to do this anyway, can't the users change their own backgrounds?


All times are Eastern Standard Time (GMT -5) | Current Time: 12:05 AM

<< < > >>

Viewing 1-30 of 134 matches. 1 | 2 | 3 | 4 | 5