Meanwhile, you can have yourself a client-side session (until browser developers realise that 2MB+ is just way too big for a placeholder and lets face it this is a massive security risk which I'm sure is already well exploited by those who know about it).
| [ 0 trackbacks ] | permalink | related link |




( 2.9 / 61 )This is actually all I really wanted. To be able to use DBG in my IDE (PhpEd) and then have access to Xdebug in my command line scripts. Why? Because DBG is a great debugger and PhpEd is a great IDE, but Symfony requires Xdebug to do code coverage checks in its Lime testing framework. If you use PHPUnit you will find the same thing.
So I have apache configured to use DBG so I can debug from a browser and back.
Then I have a separate PHP.ini file that the command line accesses by specifying it in my windows PATH environment variable.
Now I have the best of both worlds and, if I ever really need to change, it's a matter of changing 2 lines in httpd.conf and restarting apache for those rare occasions. Not the holy grail, but it'll do for now.
| [ 0 trackbacks ] | permalink | related link |




( 3 / 62 )You may have tried this before and, like me, failed. But today I tried again, being a sucker for punishment, and . . . it worked! So don't believe everything you read on the internet (especially in forum posts from 2006!).
:)
2 days later....
After intermittent crashes in apache I decided that the harmony was not quite complete... so I came up with another solution which I'll put in my next post!
| [ 0 trackbacks ] | permalink | related link |




( 2.9 / 53 )If you need to pass an email address or use any URL with dots init, Symfony may get confused. This is actually a problem with the .htaccess setup and can be resolved simply by adding the following rule:
RewriteCond %{REQUEST_URI} !\..*/.*$
Thanks to the Symfony Google group for this one!
| [ 0 trackbacks ] | permalink | related link |




( 3 / 51 )I was experiencing problems with the blur handler not firing inside iframes so this is my new and improved version of the code below:
function grow_select(){
if (document.all){
$('product').style.width='auto';
$('product').style.position='absolute';
$('product').style.zIndex=100;
}
}
function shrink_select(){
$('product').style.position='relative';
$('product').style.width='150px';
}
function checkLocation(e)
{
if (e.srcElement) {
el = (e.srcElement);
}
else if (e.target) {
el = (e.target);
}
if (el != \$('product')){
shrink_select();
}
}
Event.observe(document, 'mousemove', checkLocation);
| [ 0 trackbacks ] | permalink | related link |




( 3 / 54 )Ever had a drop down list that you needed to set the width for? Then you probably noticed that options that are longer than the desired width are cropped in IE (of course firefox handles this problem nicely - the select list is the correct width).
Well under duress from a client I came up with a simple solution - set the width dynamically on rollover and reset it on the obblur event.
Here's a simplified version of the javascript:
function grow_select(el){
el.style.width='auto';
el.style.position='absolute';
el.style.zIndex=100;
}
function shrink_select(el){
el.style.width='50px';
}
And an example select list
<select name="amount" style="width: 50px;" onfocus="grow_select(this)" onblur="shrink_select(this)">
<option value="1">One</option>
<option value="1000000">A Million</option>
<option value="1000000000000">A Million Million!</option>
Of course some improvements would be:
* Store the old width in a variable
* Use a window timeout to auto-reset the element if a mouseover check fails
| [ 0 trackbacks ] | permalink | related link |




( 2.9 / 50 )There's always some DHTML positioning that just doesn't work in all browsers... here's a nice little workaround for IE6, IE7, Safari and Firefox:
#products_menu{
margin-left: -90px; /* IE7 */
_margin-left: 410px; /* IE6 */
}
*:lang(en) #products_menu{
margin-left: 410px !important /* FF */
}
#item:products_menu {
margin-left: 410px !important /* SAFARI */
}
| [ 0 trackbacks ] | permalink | related link |




( 2.9 / 48 )Having trouble using floatbox AND prototype? Well I was until I found the offending code in floatbox and patched it. Basically, floatbox was trying to run prototype's onload handler by assuming it was a simple function...
Change this:
fb_prevOnload = window.onload;
window.onload = function() {
if (typeof fb_prevOnload === 'function') fb_prevOnload();
initfb();
};To this:
Event.observe(window,'load',function(){initfb();});There, much better :)
| [ 0 trackbacks ] | permalink | related link |




( 3 / 52 )There are lots of scattered bits of information about how to do this, so I thought I'd write a quick all-in-one guide...
1. Install sfPropelAlternativeSchemaPlugin from the command line php symfony plugin-install http://plugins.symfony-project.org/sfPr ... hemaPlugin
2. Update the plugin from the repository (no, the PEAR 'stable' version doesn't work in Windows) http://svn.symfony-project.com/plugins/ ... emaPlugin/ (copy the three files in the lib folder to your plugin lib folder)
3. Create a sfGuardPlugin_schema.custom.yml in your config folder
4. Enter your new sfGardUser fields:
propel:
sf_guard_user:
_attributes: { phpName: sfGuardUser }
firstname:
type: VARCHAR
size: 255
lastname:
type: VARCHAR
size: 255
email:
type: VARCHAR
size: 255
5. Run symfony-propel-build-all
6. Create a sfGuardUser module in your app
7. Copy the generator.yml file from the plugins/sfGuardUser/config folder to your sfGuardUser/config folder
8. Add your new fields to the config:
display:
"NONE": [ _firstname, lastname, email, username, _password, _validate_password ]
9. You're done!
| [ 0 trackbacks ] | permalink | related link |




( 3 / 52 )I usually use a VMWare machine to test Web sites on IE6 - but that's a whole lot of resources to dedicate to a single app. I recently discovered IETester and I have to say I'm impressed - it runs IE5.5, 6, 7 and 8 all in the one app... now all I need is a FireFox tester and life will be complete!
| [ 0 trackbacks ] | permalink | related link |




( 3.1 / 58 )Back Next



Avatar



