|
-
Symfony
Date: 11/07/06
Keywords: no keywords
Has anybody used the Symfony framework? It advertises itself as being similar to rails so it got me curious. However, I'd be interested to hear folks' first hand experience with it.
Cheers
Source: http://community.livejournal.com/php/508869.html
-
Postscript to PDF
Date: 11/07/06
Keywords: php, software
Hi, I was hoping to program them a php script which my client can upload .ps files to their site and the script will convert the PS to a PDF for visitors to download.
My client's site is hosted at Network Solutions (I know...) and I am not sure if I can alter the PHP server software. Is there a solution? And, will I have to modify my php server software?
(Too bad the world doesnt use OS X. Preview converts PS to PDF on the fly without having to install additional software :p )
Source: http://community.livejournal.com/php/508434.html
-
Object-Relational Mapping
Date: 11/07/06
Keywords: no keywords
To anyone who has used Propel: What do you think of it? What do you like and not like about it? I've compared several ORM projects, and this one seems to best suit my needs, based on a cursory look at each project's documentation. Is there anything I should beware?
Source: http://community.livejournal.com/php/508183.html
-
know a good online voting poll script?
Date: 11/03/06
Keywords: php, google
Hello, I'm not sure if my question is valid here, but I need help. I run a seasonal pumpkin carving competition on my site, and last year for the voting I used a simple php form-mail script. I had to manually tally up all of the votes, but I chose it because the form-mail recorded the voter's computer IP address so I could weed out multiple voters who were trying to cheat.
There were over 460 votes last year, and with my site's rising popularity, the voting should be much much higher this year. I really don't think I can handle two weeks worth of counting votes again. @__@ I've looked on Google for cgi poll scripts, but none of them had what I was looking for, the sites shut down, or the scripts were way too complicated for me.
What I would like from the voting poll is unlimited choices, to block multiple votes from the same IP address (not just for 24 hours, but for as long as the poll remains open), and the ability to send in/vote up to 5 choices. Being able to put an image next to each voting choice would be great, too.
Is this even possible? I don't know much about cgi, but I've heard rumors that people can hack into sites through it. Maybe I'm better off just using the form-mail script again. -_-
Source: http://community.livejournal.com/php/508025.html
-
Ajax: Returning Data as text
Date: 11/02/06
Keywords: html
I have a question in ajaxengine if you want to take a look http://community.livejournal.com/ajaxengine/8066.html
Source: http://community.livejournal.com/php/507712.html
-
Image Preload
Date: 11/02/06
Keywords: php, css, html, web
I'm working on a web-portfolio function that cycles through a lot of large images that, even optimized for the web, take longer to load than I would like. What is the most reliable/efficient method to preload images in the background?
I am working in php with CSS and (wherever possible) standards compliant XHTML 1.0 Transitional, but I'm relatively new to php. Does php offer any clever new tricks on preloading images?
Source: http://community.livejournal.com/php/507566.html
-
CakePHP: Implementing bar gadget on every page
Date: 11/02/06
Keywords: php
This is a CakePHP question. Since CakePHP community is yet too small, I figured I'll cross-post it here, where it's much more likely to get help.
I'm trying to create a bar, which would be hanging on every page on my site. That bar should have username/password textboxes (if you're logged out), and some little useful info if you're logged in. I'm trying to implement it as a component+element, but I can't figure out how to wire things up, and how this bar will work together with other views and controllers, especially when it comes to logging in a user. I drew a quick diagram in OpenOffice Draw, to illustrate how I understand it, but even with that diagram, I'm not sure how to make it work.
The tricky part 1: When logging in through that bar there should not be any extra intermediate page. When you click "login", the bar should just switch to "welcome, user; etc". Only one page refresh should occur.
The tricky part 2: No ajax. I will implement ajax later, when I'm sure it works without it.
Any help would be appreciated.
Source: http://community.livejournal.com/php/507189.html
-
Header help
Date: 11/01/06
Keywords: php
Hi, I run a Wordpress site and I use a logo instead of text for my header. I'm having a lot of difficulty figuring out how to get the header to link back to the main page. I really don't know much about PHP so I just do what I can. Please help! The site is GameRumors.net
header.php --
---------------------------------
style.css --
/* header */ .header { background: url('img/logo.jpg') center top no-repeat; border-bottom: 1px solid #EEE; height: 104px; width: 601px; margin-bottom: 24px; } .header h1 { background: url('img/logo.jpg') center top no-repeat; color: #222; font: normal 4em sans-serif; margin-top: 40px; text-align: center; }
.header h1 a{ background: url('img/logo.jpg') center top no-repeat; color: #222; text-decoration:none; }
.header h1 a:visited { color: #222; text-decoration:none; }
.header h2 { border-top: 1px solid #EEE; color: #666; text-align: right; } .header h2 span { background: #222; color: #EEE; padding: 0 6px; }
Source: http://community.livejournal.com/php/507107.html
-
GD2 artefact
Date: 10/30/06
Keywords: no keywords
This code is supposed to draw arcs, but I keep getting that line at the bottom. Can anyone tell me what that is and how to get rid of it?
Here's the buggy code:
1)
{
$iwborder = $arcwidth - $border;
$ihborder = $archeight - $border;
// The border
imagefilledarc($crv, $arcdata[0], $arcdata[1], $arcwidth, $archeight,
$arcdata[2], $arcdata[3], $arc_color, IMG_ARC_PIE);
// The filled arc
imagefilledarc($crv, $arcdata[0], $arcdata[1], $iwborder, $ihborder,
$arcdata[2], $arcdata[3], $foreground_color, IMG_ARC_PIE);
}
// The 'border' arc if the width is just 1
else
{
// The filled arc
imagefilledarc($crv, $arcdata[0], $arcdata[1], $arcwidth, $archeight,
$arcdata[2], $arcdata[3], $foreground_color, IMG_ARC_PIE);
// The border
imagearc($crv, $arcdata[0], $arcdata[1], $arcwidth, $archeight,
$arcdata[2], $arcdata[3], $arc_color);
}
}
// Displays the image based $imagetype
switch ($imagetype)
{
// Displays the image as a JPEG
case 1:
header("Content-type: image/jpeg");
imagejpeg($crv);
break;
// Displays the image as a PNG
case 2:
header("Content-type: image/png");
imagepng($crv);
break;
// Displays the image as a GIF
case 3:
header("Content-type: image/gif");
imagegif($crv);
break;
}
// Destroys the image
imagedestroy($crv);
// Ends the program
exit;
// ---------- Functions ----------
// Given $corner, $bwidth, and $bheight this returns an array with values
// to draw an arc
function create_arc($corner, $w, $h)
{
$arc_ret = array();
switch ($corner)
{
// top, left
case "tl":
$arc_ret = array($w, $h, 180, 270);
break;
// top, right
case "tr":
$arc_ret = array(0, $h, 270, 360);
break;
// bottom, left
case "bl":
$arc_ret = array($w, 0, 90, 180);
break;
// bottom, right
case "br":
$arc_ret = array(0, 0, 0, 90);
break;
}
return($arc_ret);
}
// Error out
function error_out($message)
{
if (@$message != "")
{
echo($message);
exit;
}
else
{
error_out("Your error message needs a message.");
}
}
?>
Source: http://community.livejournal.com/php/506796.html
-
PHP script being run twice...
Date: 10/30/06
Keywords: database
So, my problem is that my script seems to be running twice for no apparent reason. I'm not sure what the problem is in the slightest, so here's an over kill explanation about my script;
Firstly, the script is for a game I'm making - it's basically a map for user to move around on. Obviously I've not added any of the fun stuff to it yet because I want to get the basics of "walking" out of the way first. The map is a grid consisting of 100 squares (10x10), made up by images of rocks, grass, etc. The user needs to be able to move north, east, south and west, and their position is shown by a little avatar in the centre of the map (unless they get too close to the edge, in which case the map stops "scrolling" though the user can still walk up to the edge of the map. If you followed that, well done.
Secondly, what's in database `game_map`. `user_map` is where information regarding the user is kept. Whilst I'm testing scripts the test user_id is 9. "curr_x_co" is the current user's position of "x" and "curr_y_co" is the same, but for "y".
Thirdly, here's the script.
Okay so here's what happens when I run the script. Stats first:
Previous Location: x 4, y 11
Current Location: x 4, y 11
At the moment, they're the same since I've not attempted to move anywhere. If I chose to go right, I would expect the database to be updated with "y" being 11 still but "x" increasing by one to 5. So I press right.
Previous Location: x 4, y 11
Current Location: x 5, y 11
Looking good. Nothing wrong so far. If I press right again, "y" should stay the same, though "x" should become 6. So I press right again.
Previous Location: x 6, y 11
Current Location: x 7, y 11
Huh? It's just jumped two place right, when it should have only added one to "x". But the "Previous location" tells us that it did indeed go to 6, like it was supposed to at some point. This means that the script must have run twice. If I press right once more, it should become 8.
Previous Location: x 8, y 11
Current Location: x 9, y 11
Nope, somehow the script has run twice again, and skipped showing "x=8". Anyone have any idea why it would be doing this?
Thanks enormously for your time, even if you don't have a clue what I've just said, or what the problem is.
Source: http://community.livejournal.com/php/506241.html
-
brain fart..
Date: 10/28/06
Keywords: no keywords
What function returns a string based on a regex match? I looked at my documentation and it's not jumping out at me..
Source: http://community.livejournal.com/php/505999.html
-
discovering event dates
Date: 10/26/06
Keywords: no keywords
we have events that occur every tuesday and the first wednesday of every month. is there a way i can determine what the dates for these events will be? this is two independent problems:
determine the date for the next tuesday that will occur. determine the date of the next 1st wednesday (current or next month) that will occur.
i've been messing around with various date related functions, but i guess i'm having trouble figuring the math involved?
Source: http://community.livejournal.com/php/505672.html
-
Web Developement Blog Launch
Date: 10/24/06
Keywords: php, css, html, java, web
I'm not sure if I'm allowed to do this or not, but the company I work for (Sitecrafting) has launched a new website, and part of that is a blog on all things Internet. Our expertise is XHTML, CSS, PHP, and Javascript. This is shameless self-promotion, but check us out. Maybe you'll learn something. (Maybe. Maybe you can teach me something.)
Sitecrafting Blog
(Cross post to css_forum, php, and webdev. I can't remember how to link to communities)
Source: http://community.livejournal.com/php/505569.html
-
Apache2 + PHP server problems
Date: 10/23/06
Keywords: php, html, apache
I'm having a weird problem with my Windows Apache 2 server. (Apache 2.0.56) I'm running PHP 5.1.6. As of a couple days ago, it suddenly started taking about 20-30 seconds to execute a PHP script (even just phpinfo();) Plain HTML documents on the server run just fine, and the CLI version runs fine too. It's not giving off any errors, either, it seems.
Does anyone know what might be wrong? I reinstalled both Apache and PHP and can't think of any changes to my system that occoured between when it was running fine and now. Thanks.
Source: http://community.livejournal.com/php/505215.html
-
Weird GoDaddy Problem
Date: 10/20/06
Keywords: php, java
I'm having a really weird problem with GoDaddy. I just did the site http://www.drsketchy.com, and the big picture with the quote on it is supposed to be a randomly loading/rotating image. On the staging version I had up on my server (http://www.malloreigh.com/drsketchy) the image rotation script works perfectly. It pulls images out of a directory and randomly displays one on page load.
However, as soon as I ported the site over to their server (which is hosted on GoDaddy) the script didn't work. I have tried five different script, PHP and JavaScript, to accomplish this, and all have not worked on the GoDaddy server.
Any ideas why this would be? I can't imagine it being a PHP support problem, because the site is written in PHP, and it works just fine... also, the JS scripts aren't working either.
Cross-posted.
Source: http://community.livejournal.com/php/504583.html
-
help with function
Date: 10/20/06
Keywords: no keywords
this functions supposed to take an array (similar users) which tends to look like Array
(
[3] => Array
(
[64] => Jetzxia
[959] => Yanami Prower
[1206] => tell me im hot
)
)
and update it, now it does all of that, is able to add new users etc, however the problem i have it that i can't get it update anything below the top below. so once in the above array Array
(
[4] => Array
(
[64] => Jetzxia
[959] => Yanami Prower
)
[3] => Array
(
[1206] => tell me im hot
)
) once it gets there, i seem unable to update "tell me im hot" and move the user up an array. can someone tell me where i'm going wrong please?
Code:
just to reconfirm: $similarusers = array. $users = string (12,15,7495,7435,374,374,23,79,9,19).
any help would be greatly appreciated.
Source: http://community.livejournal.com/php/504468.html
-
Get video length?
Date: 10/15/06
Keywords: google
Is there a way to obtain the length of a video file, such as *.wmv?
I have Googled and looked in the manual but couldn't find anything useful, so thought I should ask directly here. I'm thinking the answer's "no", but it doesn't hurt to ask.
Source: http://community.livejournal.com/php/504073.html
-
Error reporting
Date: 10/15/06
Keywords: php
is this a normal error, or is the error reporting too sensitive. My dev server is suddenly reportimg errors all over the place and I dont understand why.
Notice: Use of undefined constant TableName - assumed 'TableName' in /var/www/hca_v2/tools/viewallUL.php on line 38
Are we supposed to pre-define our variables?
Source: http://community.livejournal.com/php/503893.html
-
Call Recording mp3 playback
Date: 10/13/06
Keywords: no keywords
I have a page that lists call recordings and allows you to download them. Stupid people at work have trouble opening them in xmms so I was wondering if there was a simple way to add an mp3 player to the actual page? Right now it prints a table full of recording info, it would be great if I could just slap a play button in each row.
Source: http://community.livejournal.com/php/503395.html
-
YouTube PHP Library
Date: 10/13/06
Keywords: php, rss
Hi everyone,
I created a PHP5 library to handle requests to the YouTube API. It was basically to create an RSS feed for people's favorite videos, but I decided to generalize to to all the API methods. Check it out at my blog.
Source: http://community.livejournal.com/php/502812.html
|