Re: [PHP] Convert deprecated POSIX functions into wrappers forequivalent PCRE functions

2009-11-09 Thread Tony Marston

"Paul M Foster"  wrote in message 
news:20091109030235.gh3...@quillandmouse.com...
> On Sun, Nov 08, 2009 at 06:30:37PM -0500, Robert Cummings wrote:
>
>> Also, why support
>> two libraries for which one is obviously inferior in speed and
>> functionality?
>>
>
> Because Tony's Radicore framework has a bunch of ereg* calls in it. ;-}

Just like a lot of other people's work.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

> Paul
>
> -- 
> Paul M. Foster 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Tony Marston

"Robert Cummings"  wrote in message 
news:4af76e1f.2050...@interjinn.com...
> Tony Marston wrote:
>> "Robert Cummings"  wrote in message
> Then you've got several options:
> 1) Don't upgrade PHP.
 Not an acceptable option.

> 2) Pick a different hosting provider.
 Not an acceptable optional.

> 3) Fix your scripts.
 The scripts aren't broken. It's PHP 6 that's going to be broken.
>>> I think you're missing the point of a full version increase. This is not 
>>> a minor or micro version change... script breakage is *expected*.
>>
>> But breakage should be kept to an absolute minimum, and developer 
>> laziness or incompetence is not an acceptable excuse.
>
> Not quite true... major version moves are an opportunity to make a break 
> for freedom. All there needs to be is an upgrade path... and that is 
> clearly in play right now with the warning indicating that POSIX regex 
> functions are being deprecated.

But a lot of people won't see those warnings until they run 5.3.0 for the 
first time. It is common practice, at least in all the other languages that 
I have used, that is something is going to be removed that it is marked as 
deprecated at the start of the previous release, not at the end. So marking 
the POIX functions as deprecated should have happened in 5.0, not 5.3.

>>> You don't think PHP should support legacy cruft in the core forever do 
>>> you?
>>
>> Widely use regex functions are not "legacy cruft". Besides, who decides 
>> what is "cruft" and should be removed from the language?
>
> They most certainly are cruft.

That is just your opinion. Other people think that PHP should be rewritten 
so that it appears more like their favourite language. Among the suggestions 
I have seen are:
- make all variables statically typed instead of dynamically typed.
- remove all procedural functions and make the language "pure" OO.

Who decides if they are right?

>.. hence the reason they are being removed. The people who decide what is, 
>and is not, cruft are the very same people who are writing the code. If you 
>are not happy with this then there's the age old saying in open source... 
>"put up or shut up".

I can't because I don't program in C. So I shall do the nextbest thing - 
complain at every opporunity.

>>> If unicode support is slopped onto the current POSIX regex functions 
>>> won't that then make them non-POSIX? Food for thought. Also, why support 
>>> two libraries for which one is obviously inferior in speed and 
>>> functionality?
>>
>> That is why I suggested that instead of dropping the POSIX functions 
>> entirely and seriously annoying lots of users, that they should simply be 
>> rewritten as wrappers for the PCRE functions. In that way all the calls 
>> to ereg_* would still work, but all they would do is immediately call the 
>> relevant preg_* function. The small amount of effort that tghis would 
>> take would kill two birds with one stone:
>>
>> (1) There would be only one regex engine to support, which would be PCRE.
>> (2) Lots of developers would be spared the hassle of modifying their code 
>> as all the calls to POSIX functions would still work as expected because 
>> the language would redirect to the PCRE function automatically.
>
> This would probably be worse than removing the POSIX functions.
> POSIX and PCRE I daresay are not completely compatible.

"probably" and "daresay" mean that you are just guessing. According to some 
people who know what they are talking about there is a one-for-one 
comparison between each POSIX and each PCRE function.

> At least when you remove the POSIX functions then the problem space is 
> well defined.

And lots of sers will be pissed off because they won'tbe able to upgrade to 
PHP 6 without major programmer intervention.

> Suddenly having POSIX regex functions that are really wrappers around PCRE 
> functions may introduce subtle differences in output for the same horde of 
> users but without the same explicability.

"may introduce"? There you go, guessng again. Can you point out *any* POSIX 
function that cannot be converted into PCRE?

>> I am not suggesting that the POSIX functions be rewritten to deal with 
>> unicode as that would require a huge amount of effort, but by redirecting 
>> al POSIX calls to the equivalent PCRE function would have the same effect 
>> for far less effort.
>>
>> The choice is simple - either a small amount of effort from a small 
>> number of developers, or a large amount of effort from a large number of 
>> seriously pissed-off users. Do the maths. It's not rocket science.
>
> This isn't a mathematical problem. It's a question of correctness.

Lot's of PHP users, myself included, do not think that it is "correct" to 
remove widely used functionality just beause the developers are too lazy to 
do a proper job.

> I wasn't happy to hear POSIX regex functions were going either, but when I 
> heard the reasoning I did the best thing I could... I fixed my code to 
> p

Re: [PHP] Multilingual website, texts in external JavaScript problem

2009-11-09 Thread Ashley Sheridan
On Sun, 2009-11-08 at 22:04 -0800, leledumbo wrote:

> I need to create a multilingual website and my framework already gives me
> that facility. However, I also use JavaScript quite extensively and since
> XHTML 1.0 Strict doesn't allow inline script, I must use external .js file.
> The problem is in these scripts, there are strings that needs to be
> translated as well. How can I make PHP parse these scripts as well? Or are
> there alternative approaches?
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Multilingual-website%2C-texts-in-external-JavaScript-problem-tp26261666p26261666.html
> Sent from the PHP - General mailing list archive at Nabble.com.
> 
> 


You could either use several different Javascript files to hold the
language translations and just those as variables, and then in the main
Javascript use the variables rather than the actual words. Or you could
store all the translations into a Javascript array and refer to the
specific array element you need to output

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Ashley Sheridan
On Mon, 2009-11-09 at 00:23 +, Tony Marston wrote:

> developer laziness 
> or incompetence is not an acceptable excuse.


Exactly, so fix your scripts!

I do wonder though, what hosting company you use that would just upgrade
to PHP6 without warning on you and 'break' your scripts, yet at the same
time would not allow you to install what you call an 'amateur fudge'. I
can't think of any hosting company that would care so little about their
customers.

Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] Hash function

2009-11-09 Thread Ali Asghar Toraby Parizy
hi friends
I need a hash function to build a Unique serial number by mixing a request
code and a user name
request codes are strings like this: They are literally HEX codes of MAC mac
addresses.
"002314EFD000544AB05345300045675609782123C3254B312123D12312EE13123F123D123123EEE000E000E000EE"
i want to create a function that mix together this request code with user
name that user entered and create new serial number.
What implications i have to satisfy to create such hash function in php?
Thanks for any suggestion


[PHP] Paypal transaction

2009-11-09 Thread Ali Asghar Toraby Parizy
Hi friends
I have an application I want to sell it in my website
How can i use PayPal to marketing? i understand php so i am eager to write
some php code, myself.
How can i implement a php code to use PayPal gateway
Thanks for any help


Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Tony Marston

"Ashley Sheridan"  wrote in message 
news:1257764339.1076.56.ca...@localhost...
> On Mon, 2009-11-09 at 00:23 +, Tony Marston wrote:
>
>> developer laziness
>> or incompetence is not an acceptable excuse.
>
>
> Exactly, so fix your scripts!

But my scripts aren't broken! It's PHP 6 that is broken.

> I do wonder though, what hosting company you use that would just upgrade
> to PHP6 without warning on you and 'break' your scripts,

How many hosting companies write to all their account holders to ask 
permission before upgrading PHP, not just from 4 to 5, but all the releases 
in between? Very few of them, if any, in my experience.

> yet at the same
> time would not allow you to install what you call an 'amateur fudge'. I
> can't think of any hosting company that would care so little about their
> customers.

Some hosting companies won't allow you to use htaccess files, refuse to 
install any optional extension, let alone one from the PECL or PEAR 
repositories. Some of them won't give you more than one MySQL database. 
Different companies provide different levels of service. The only thing that 
the DO have in common is that they charge you for it.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread David Otton
2009/11/9 Tony Marston :

> So you wouldn't trust the PHP developers to write simple code which takes
> each POSIX function and redirects it to a PCRE function? I have more faith
> in their ability than I do yours.

If it's as simple as you claim, why don't you mock-up your solution in
PHP, rather than C? You'll get taken more seriously if you have
working code that someone can write unit tests against.

If your solution doesn't get any traction with the core team, you'll
still be able to offer it to the community as a simple download, just
"include this at the top of your script to fix "ereg*() not found"
problems". That would be really useful to all those people whose cause
you are championing.

(BTW, the reference implementation for PHP is... PHP. There isn't an
ISO standard or anything here. How PHP6 behaves is correct, because
it's PHP6).

(BTW^2 - you're on the wrong list for this. If you want to influence
the guys who make the decisions you need to take this to
php-internals, where the heavyweights hang out).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hash function

2009-11-09 Thread John Black

Ali Asghar Toraby Parizy wrote:

hi friends
I need a hash function to build a Unique serial number by mixing a request
code and a user name
request codes are strings like this: They are literally HEX codes of MAC mac
addresses.
"002314EFD000544AB05345300045675609782123C3254B312123D12312EE13123F123D123123EEE000E000E000EE"
i want to create a function that mix together this request code with user
name that user entered and create new serial number.
What implications i have to satisfy to create such hash function in php?
Thanks for any suggestion


How about using sha1 to hash your string. If the data is unique then the 
hash will be unique as well.


$string = $request_code.$user_name;
$hash = sha1($string);

--
John
Jeder hat soviel Recht, wie er Macht hat.
[Spinoza]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Paypal transaction

2009-11-09 Thread John Black

Ali Asghar Toraby Parizy wrote:

Hi friends
I have an application I want to sell it in my website
How can i use PayPal to marketing? i understand php so i am eager to write
some php code, myself.
How can i implement a php code to use PayPal gateway
Thanks for any help


Create a PayPal developer account here https://developer.paypal.com/
They will provide you with sample code and access to the sandbox so you 
can test your payment scripts without risking real money.


--
John
No Victim, No Crime

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hash function

2009-11-09 Thread Ashley Sheridan
On Mon, 2009-11-09 at 12:39 +0100, John Black wrote:

> Ali Asghar Toraby Parizy wrote:
> > hi friends
> > I need a hash function to build a Unique serial number by mixing a request
> > code and a user name
> > request codes are strings like this: They are literally HEX codes of MAC mac
> > addresses.
> > "002314EFD000544AB05345300045675609782123C3254B312123D12312EE13123F123D123123EEE000E000E000EE"
> > i want to create a function that mix together this request code with user
> > name that user entered and create new serial number.
> > What implications i have to satisfy to create such hash function in php?
> > Thanks for any suggestion
> 
> How about using sha1 to hash your string. If the data is unique then the 
> hash will be unique as well.
> 
> $string = $request_code.$user_name;
> $hash = sha1($string);
> 
> -- 
> John
> Jeder hat soviel Recht, wie er Macht hat.
> [Spinoza]
> 
> 


I'm not sure you can guarantee uniqueness, but you can say with a high
degree of certainty that it's extremely unlikely to not be unique! 

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Multilingual website, texts in external JavaScript problem

2009-11-09 Thread Peter Ford
leledumbo wrote:
> I need to create a multilingual website and my framework already gives me
> that facility. However, I also use JavaScript quite extensively and since
> XHTML 1.0 Strict doesn't allow inline script, I must use external .js file.
> The problem is in these scripts, there are strings that needs to be
> translated as well. How can I make PHP parse these scripts as well? Or are
> there alternative approaches?
> 

I don't see why you can't use inline script in XHTML 1.0 Strict: just put the
script in CDATA sections, like


/**/


That seems to validate fine in XHTML 1.0 Strict for me...


-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hash function

2009-11-09 Thread Ali Asghar Toraby Parizy
Ok, thanks
but how can i create serial number that nobody can guess it. for example
when i use sha1() every body can examine it too! and so they can create it
themselves!
what strategy is useful to protect license?
I think it is better to add a specific hidden string to request code,
instead of user name that is known for a probable jobber user.
what do you think about it?

On Mon, Nov 9, 2009 at 3:09 PM, John Black wrote:

> Ali Asghar Toraby Parizy wrote:
>
>> hi friends
>> I need a hash function to build a Unique serial number by mixing a request
>> code and a user name
>> request codes are strings like this: They are literally HEX codes of MAC
>> mac
>> addresses.
>>
>> "002314EFD000544AB05345300045675609782123C3254B312123D12312EE13123F123D123123EEE000E000E000EE"
>> i want to create a function that mix together this request code with user
>> name that user entered and create new serial number.
>> What implications i have to satisfy to create such hash function in php?
>> Thanks for any suggestion
>>
>
> How about using sha1 to hash your string. If the data is unique then the
> hash will be unique as well.
>
> $string = $request_code.$user_name;
> $hash = sha1($string);
>
> --
> John
> Jeder hat soviel Recht, wie er Macht hat.
> [Spinoza]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Hash function

2009-11-09 Thread Ashley Sheridan
On Mon, 2009-11-09 at 15:35 +0330, Ali Asghar Toraby Parizy wrote:

> Ok, thanks
> but how can i create serial number that nobody can guess it. for example
> when i use sha1() every body can examine it too! and so they can create it
> themselves!
> what strategy is useful to protect license?
> I think it is better to add a specific hidden string to request code,
> instead of user name that is known for a probable jobber user.
> what do you think about it?
> 
> On Mon, Nov 9, 2009 at 3:09 PM, John Black 
> wrote:
> 
> > Ali Asghar Toraby Parizy wrote:
> >
> >> hi friends
> >> I need a hash function to build a Unique serial number by mixing a request
> >> code and a user name
> >> request codes are strings like this: They are literally HEX codes of MAC
> >> mac
> >> addresses.
> >>
> >> "002314EFD000544AB05345300045675609782123C3254B312123D12312EE13123F123D123123EEE000E000E000EE"
> >> i want to create a function that mix together this request code with user
> >> name that user entered and create new serial number.
> >> What implications i have to satisfy to create such hash function in php?
> >> Thanks for any suggestion
> >>
> >
> > How about using sha1 to hash your string. If the data is unique then the
> > hash will be unique as well.
> >
> > $string = $request_code.$user_name;
> > $hash = sha1($string);
> >
> > --
> > John
> > Jeder hat soviel Recht, wie er Macht hat.
> > [Spinoza]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >


The crypt() function in PHP offers a one-way encryption, so
theoretically, it would be too difficult to work out backwards (not
impossible, but would need a fair bit of computing power to figure it
out!)

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Tim Thorburn

Tony Marston wrote:
How many hosting companies write to all their account holders to ask 
permission before upgrading PHP, not just from 4 to 5, but all the releases 
in between? Very few of them, if any, in my experience.
  
I've no idea what horrible hosting companies you've had experiences 
with, however all of the companies I've used in the last few years have 
had an option to move back and forth between PHP4 and PHP5 in the event 
that certain scrips/frameworks/apps/whatever required one version over 
the other.  What makes you think these companies won't do the same thing 
when they finally decide to add PHP6 to their servers?  I doubt very 
many reputable hosting companies would simply upgrade to the latest 
flavor of PHP/Apache/MySQL/anything simply because it was released this 
morning without doing ample internal testing; if you or your clients are 
using one that does this - I'd advise you look elsewhere.


Whenever PHP6 reaches a stable release build, it will still be quite 
some time before its offered as an option to any mainstream shared 
hosting service - this should leave you ample time to adapt to incoming 
changes.  Failing that, you always have the option of purchasing your 
own server or VPS from any number of hosts to configure as you see fit.  
Or you can explain your moral outrage to potential clients detailing 
your refusal to work because you disagree with a proposed change that 
won't see the light of day for years to come; your call.


Incessant whining under the guise of expressing your own opinion isn't 
going to make everything better.  Sorry.


Re: [PHP] Multilingual website, texts in external JavaScript problem

2009-11-09 Thread Phpster



On Nov 9, 2009, at 1:04 AM, leledumbo   
wrote:




I need to create a multilingual website and my framework already  
gives me
that facility. However, I also use JavaScript quite extensively and  
since
XHTML 1.0 Strict doesn't allow inline script, I must use  
external .js file.

The problem is in these scripts, there are strings that needs to be
translated as well. How can I make PHP parse these scripts as well?  
Or are

there alternative approaches?

--
View this message in context: 
http://old.nabble.com/Multilingual-website%2C-texts-in-external-JavaScript-problem-tp26261666p26261666.html
Sent from the PHP - General mailing list archive at Nabble.com.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



I use a standard error code ( error.2510 ) treating it as the js array  
key, and then call the correct language file with translated value


Bastien

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hash function

2009-11-09 Thread John Black

Ali Asghar Toraby Parizy wrote:

Ok, thanks
but how can i create serial number that nobody can guess it. for example
when i use sha1() every body can examine it too! and so they can create it
themselves!
what strategy is useful to protect license?


Ahh, so you are trying to protect your PHP code with a license key?

If so, then here are my thoughts on it.
- Don't bother encrypting the license key too much. Your code will be 
available as source code so it will be possible to circumvent any 
protection/limitation.
- Even file validation like creating md5suma of files is nothing but 
headache because some FTP servers and clients will modify the source by 
adjusting the end of line characters (binary upload prevents this).
- I have noticed that most customers will not mess with the scripts 
since they want support from you. Remove all comments from the source 
and the end of line characters to prevent the hobby tinkerer from 
causing problems.
- The problem with people messing with the code is that they usually 
don't start a support request with "I changed something and now feature 
X does not work..." but rather with "All the sudden feature X stopped 
working".
- People who have the goal to circumvent your license code will do so 
regardless of protection and will see sophisticated protection as a 
challenge. So I don't bother with encryption of the information since 
implementing something secure will usually mean that it will get in the 
way of honest customers. Look at computer games, it is a prime example 
of copy protection interfering with honest customers by causing problems.


All I do is generate a license code which contains a string (name or 
customer id) and configuration values. The license code can be decoded 
via a function and validated.

So I turn the string
AsgharToraby100C into this=> 0B50B-50B54-MSDD2-OMPDD-OMI33
Here 100C is the license value, the customer has a 100 client access 
license. The key has built in , very basic, validation bits to validate 
the key as a whole.
The script can decode the license key via a function to retrieve the max 
authenticated user (100) before allowing new logins.

The string part can be decoded as well but capitalization is lost.


Here are a few license code functions I wrote many years ago. Maybe 
something like this will work/is what you are looking for.


... well actually ... I just looked at the code, I wrote it about 6 
years, and I am bit embarrassed of how I handled a few things :)
But the code is solid, it has been in use since then and I have not 
noticed any problems :)


So let me know if this sounds like something you are looking for and 
would like to see and I will cleanup the code for you.



--
John
Intelligent Life
http://xkcd.com/638/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Tony Marston

"David Otton"  wrote in message 
news:193d27170911090331k7ecbe69cl1dd30651273e7...@mail.gmail.com...
> 2009/11/9 Tony Marston :
>
>> So you wouldn't trust the PHP developers to write simple code which takes
>> each POSIX function and redirects it to a PCRE function? I have more 
>> faith
>> in their ability than I do yours.
>
> If it's as simple as you claim, why don't you mock-up your solution in
> PHP, rather than C?

Because I can't do that until I install PHP 6, but as I never play with beta 
software waiting for it to go live will be too late.

> You'll get taken more seriously if you have
> working code that someone can write unit tests against.
>
> If your solution doesn't get any traction with the core team, you'll
> still be able to offer it to the community as a simple download, just
> "include this at the top of your script to fix "ereg*() not found"
> problems". That would be really useful to all those people whose cause
> you are championing.
>
> (BTW, the reference implementation for PHP is... PHP. There isn't an
> ISO standard or anything here. How PHP6 behaves is correct, because
> it's PHP6).
>
> (BTW^2 - you're on the wrong list for this. If you want to influence
> the guys who make the decisions you need to take this to
> php-internals, where the heavyweights hang out).

I have tried subscribing to the internals list, but none of my postings ever 
appears. I've tried looking at the PHP wiki, but I cannot see any method of 
creating an RFC.

I have, however, created a request in php_compat in the PEAR system at 
http://pear.php.net/bugs/bug.php?id=16769

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Anyone using Aptana and Xdebug? Or other debugger recommendations besides Zend?

2009-11-09 Thread Dave M G
PHP List,

I won't go into a big rant about Zend, and instead simply say that while
I was using Zend Studio to debug PHP pages since version 5.0. I was
never really all that happy with it. It seemed to be the most complete
debugging environment for PHP, so I put up with it. I will say that the
Studio installation procedure has got better, but setting up a reliable
debugging server has not.

Now, the current version of Zend Studio (7.0) is based on Eclipse (I
think since v6.0), and so I'm just not sure what I'm paying for anymore.
Aptana Studio, also based on Eclipse has pretty much the exact same
interface and can even connect to a Zend server.

Since one of those is free, I can't see why I wouldn't switch. The issue
for me is that paying for Zend hasn't really saved me much hassle, so
even if Aptana has difficulties, at least they are free difficulties.

The main failing point, so far as I can see, of Aptana/Xdebug, is a lack
of good, clear, documentation (also note that Zend doesn't have great
documentation either). Especially on how to set it up.

I was wondering if anyone has used it and could provide a link or
instructions on how to get the debugging environment up and running.

Or, equally as valuable, would be recommendations on other debugging
environments. The key is finding one that has a clear set of
instructions for how to set it up (On Ubuntu/Debian Linux with a local
LAMP server.)

Thanks for any advice.

-- 
Dave M G

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Paul Fierro
On 11/9/09 8:56 AM, Tony Marston  wrote:

> I have tried subscribing to the internals list, but none of my postings ever
> appears.

That's unfortunate as you missed this thread:

http://marc.info/?t=12553625831&r=1&w=2

Paul



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread David Otton
2009/11/9 Tony Marston :

> Because I can't do that until I install PHP 6, but as I never play with beta
> software waiting for it to go live will be too late.

Not sure why not. If it's just the name collision, call them
alt_ereg*() until ereg*() goes away. In fact, it's much easier to
write unit tests against your new functions if the old functions are
still hanging around.

> I've tried looking at the PHP wiki, but I cannot see any method of
> creating an RFC.

Well, the RFCs are here, but you probably already found them:
http://wiki.php.net/rfc (register is in the bottom-right corner).

Can't help you with your php-internals problem, I'm afraid. Tried
emailing the list manager?

> I have, however, created a request in php_compat in the PEAR system at
> http://pear.php.net/bugs/bug.php?id=16769

Fair enough. Good luck.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Ashley Sheridan
On Mon, 2009-11-09 at 15:49 +, David Otton wrote:

> 2009/11/9 Tony Marston :
> 
> > Because I can't do that until I install PHP 6, but as I never play with beta
> > software waiting for it to go live will be too late.
> 
> Not sure why not. If it's just the name collision, call them
> alt_ereg*() until ereg*() goes away. In fact, it's much easier to
> write unit tests against your new functions if the old functions are
> still hanging around.
> 
> > I've tried looking at the PHP wiki, but I cannot see any method of
> > creating an RFC.
> 
> Well, the RFCs are here, but you probably already found them:
> http://wiki.php.net/rfc (register is in the bottom-right corner).
> 
> Can't help you with your php-internals problem, I'm afraid. Tried
> emailing the list manager?
> 
> > I have, however, created a request in php_compat in the PEAR system at
> > http://pear.php.net/bugs/bug.php?id=16769
> 
> Fair enough. Good luck.
> 


And what about something like this as an internal wrapper:

if(!function_exists('ereg_*'))
{
function ereg_*()
{

}
}

And you should at least try to test the code you write for your clients
on PHP6 if that is where it is going to be hosted before servers are
upgraded, even if it's just to find out if it will break and give you
time to fix it. Hell, you could probably charge for that if the client
absolutely has to be on a PHP6 server, as something like that would fall
outside the scope of future maintenance, unless of course you wrote your
code in full knowledge of the change that would happen in PHP6.

Thanks,
Ash
http://www.ashleysheridan.co.uk




RE: [PHP] Anyone using Aptana and Xdebug? Or other debugger recommendations besides Zend?

2009-11-09 Thread Arno Kuhl
-Original Message-
From: Dave M G [mailto:mar...@autotelic.com] 
Sent: 09 November 2009 05:36 PM
To: php-general@lists.php.net
Subject: [PHP] Anyone using Aptana and Xdebug? Or other debugger
recommendations besides Zend?

PHP List,

I won't go into a big rant about Zend, and instead simply say that while I
was using Zend Studio to debug PHP pages since version 5.0. I was never
really all that happy with it. It seemed to be the most complete debugging
environment for PHP, so I put up with it. I will say that the Studio
installation procedure has got better, but setting up a reliable debugging
server has not.

Now, the current version of Zend Studio (7.0) is based on Eclipse (I think
since v6.0), and so I'm just not sure what I'm paying for anymore.
Aptana Studio, also based on Eclipse has pretty much the exact same
interface and can even connect to a Zend server.

Since one of those is free, I can't see why I wouldn't switch. The issue for
me is that paying for Zend hasn't really saved me much hassle, so even if
Aptana has difficulties, at least they are free difficulties.

The main failing point, so far as I can see, of Aptana/Xdebug, is a lack of
good, clear, documentation (also note that Zend doesn't have great
documentation either). Especially on how to set it up.

I was wondering if anyone has used it and could provide a link or
instructions on how to get the debugging environment up and running.

Or, equally as valuable, would be recommendations on other debugging
environments. The key is finding one that has a clear set of instructions
for how to set it up (On Ubuntu/Debian Linux with a local LAMP server.)

Thanks for any advice.

Dave M G
--

Dave, take a look at PhpED from Nusphere. I've used the Windows version very
happily for the last 6 years. There is a Linux version but I haven't tried
it so can't comment - from the forum I gather that most users use the
Windows version. Debugging in PhpED is brilliant, but so is the rest of the
IDE. I also looked at Zend Studio every now and then over the last few years
to see how it was progressing, but wasn't that impressed.

Cheers
Arno




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Anyone using Aptana and Xdebug? Or other debugger recommendations besides Zend?

2009-11-09 Thread Martin Scotta
On Mon, Nov 9, 2009 at 1:04 PM, Arno Kuhl  wrote:

> -Original Message-
> From: Dave M G [mailto:mar...@autotelic.com]
> Sent: 09 November 2009 05:36 PM
> To: php-general@lists.php.net
> Subject: [PHP] Anyone using Aptana and Xdebug? Or other debugger
> recommendations besides Zend?
>
> PHP List,
>
> I won't go into a big rant about Zend, and instead simply say that while I
> was using Zend Studio to debug PHP pages since version 5.0. I was never
> really all that happy with it. It seemed to be the most complete debugging
> environment for PHP, so I put up with it. I will say that the Studio
> installation procedure has got better, but setting up a reliable debugging
> server has not.
>
> Now, the current version of Zend Studio (7.0) is based on Eclipse (I think
> since v6.0), and so I'm just not sure what I'm paying for anymore.
> Aptana Studio, also based on Eclipse has pretty much the exact same
> interface and can even connect to a Zend server.
>
> Since one of those is free, I can't see why I wouldn't switch. The issue
> for
> me is that paying for Zend hasn't really saved me much hassle, so even if
> Aptana has difficulties, at least they are free difficulties.
>
> The main failing point, so far as I can see, of Aptana/Xdebug, is a lack of
> good, clear, documentation (also note that Zend doesn't have great
> documentation either). Especially on how to set it up.
>
> I was wondering if anyone has used it and could provide a link or
> instructions on how to get the debugging environment up and running.
>
> Or, equally as valuable, would be recommendations on other debugging
> environments. The key is finding one that has a clear set of instructions
> for how to set it up (On Ubuntu/Debian Linux with a local LAMP server.)
>
> Thanks for any advice.
>
> Dave M G
> --
>
> Dave, take a look at PhpED from Nusphere. I've used the Windows version
> very
> happily for the last 6 years. There is a Linux version but I haven't tried
> it so can't comment - from the forum I gather that most users use the
> Windows version. Debugging in PhpED is brilliant, but so is the rest of the
> IDE. I also looked at Zend Studio every now and then over the last few
> years
> to see how it was progressing, but wasn't that impressed.
>
> Cheers
> Arno
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Why anyone needs to buy a IDE for develop PHP code?

You can use any text editor.

I use SciTE. It is free and open source.
It does not provide any tool of any kind. It just allow me to write code,
and that's all I need.

Also there are a lot of tools for development.
And IDE is just a fat text editor with lot of tools on it, and in some cases
it can make your development slower.

You can improve your development with a set of lightweight tools, this is
the linux style.

-- 
Martin Scotta


Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread tedd

At 12:23 AM + 11/9/09, Tony Marston wrote:

Do the maths. It's not rocket science.

Tony Marston


Damn, I was hoping for some rocket science. But traveling the update 
route isn't rocket science either.


I can tell you from experience that everything changes. Nothing 
remains static -- so, get used to it.


I've had entire languages stop overnight and all the developers had 
to go on to other things -- not a good experience.


The deprecation of POSIX functions is minor as compared to other 
things. Be happy that's all you have to be concerned about.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hash function

2009-11-09 Thread tedd

At 2:38 PM +0330 11/9/09, Ali Asghar Toraby Parizy wrote:

hi friends
I need a hash function to build a Unique serial number ...


Try:

http://php.net/manual/en/function.dbplus-getunique.php

But use at your own risk.

If you want a unique number try using a time stamp (i.e., time() ) in 
concert with a database.


For example, grab a time, look for it in a database, if it's not 
there then use it. If it is there then repeat until you have that 
isn't. That way it's a unique number guaranteed.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hash function

2009-11-09 Thread tedd

At 2:38 PM +0330 11/9/09, Ali Asghar Toraby Parizy wrote:

hi friends
I need a hash function to build a Unique serial number ...


Try:

http://php.net/manual/en/function.dbplus-getunique.php

But use at your own risk.

If you want a unique number try using a time stamp (i.e., time() ) 
in concert with a database.


For example, grab a time, look for it in a database, if it's not 
there then use it. If it is there then repeat until you have that 
isn't. That way it's a unique number guaranteed.


Cheers,

tedd


Addition to that.

When you find an unique number, use it AND store that in the database.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Robert Cummings

Tony Marston wrote:
"Robert Cummings"  wrote in message 
news:4af76e1f.2050...@interjinn.com...

Tony Marston wrote:

"Robert Cummings"  wrote in message

Then you've got several options:
1) Don't upgrade PHP.

Not an acceptable option.


2) Pick a different hosting provider.

Not an acceptable optional.


3) Fix your scripts.

The scripts aren't broken. It's PHP 6 that's going to be broken.
I think you're missing the point of a full version increase. This is not 
a minor or micro version change... script breakage is *expected*.
But breakage should be kept to an absolute minimum, and developer 
laziness or incompetence is not an acceptable excuse.
Not quite true... major version moves are an opportunity to make a break 
for freedom. All there needs to be is an upgrade path... and that is 
clearly in play right now with the warning indicating that POSIX regex 
functions are being deprecated.


But a lot of people won't see those warnings until they run 5.3.0 for the 
first time. It is common practice, at least in all the other languages that 
I have used, that is something is going to be removed that it is marked as 
deprecated at the start of the previous release, not at the end. So marking 
the POIX functions as deprecated should have happened in 5.0, not 5.3.


This is PHP, it is not all the other languages you have used. That said, 
it will probably be at leats a year before PHP6 even thinks about being 
released.


You don't think PHP should support legacy cruft in the core forever do 
you?
Widely use regex functions are not "legacy cruft". Besides, who decides 
what is "cruft" and should be removed from the language?

They most certainly are cruft.


That is just your opinion.


And the opposing opinion is your... all just opinions right?!

Other people think that PHP should be rewritten 
so that it appears more like their favourite language. Among the suggestions 
I have seen are:

- make all variables statically typed instead of dynamically typed.
- remove all procedural functions and make the language "pure" OO.

Who decides if they are right?


The PHP team... primarily those who contribute to the PHP cod itself. 
Those people have earned the privilege of making final decisions.


.. hence the reason they are being removed. The people who decide what is, 
and is not, cruft are the very same people who are writing the code. If you 
are not happy with this then there's the age old saying in open source... 
"put up or shut up".


I can't because I don't program in C. So I shall do the nextbest thing - 
complain at every opporunity.


Then learn C... I see later in this email you whine and moan about 
laziness... there is nothing stopping you from learning C but your own 
laziness. If you lack the time to contribute... then perhaps you should 
keep your mouth in check before calling the core developers lazy when 
they probably have similar time constraints.


If unicode support is slopped onto the current POSIX regex functions 
won't that then make them non-POSIX? Food for thought. Also, why support 
two libraries for which one is obviously inferior in speed and 
functionality?
That is why I suggested that instead of dropping the POSIX functions 
entirely and seriously annoying lots of users, that they should simply be 
rewritten as wrappers for the PCRE functions. In that way all the calls 
to ereg_* would still work, but all they would do is immediately call the 
relevant preg_* function. The small amount of effort that tghis would 
take would kill two birds with one stone:


(1) There would be only one regex engine to support, which would be PCRE.
(2) Lots of developers would be spared the hassle of modifying their code 
as all the calls to POSIX functions would still work as expected because 
the language would redirect to the PCRE function automatically.

This would probably be worse than removing the POSIX functions.
POSIX and PCRE I daresay are not completely compatible.


"probably" and "daresay" mean that you are just guessing. According to some 
people who know what they are talking about there is a one-for-one 
comparison between each POSIX and each PCRE function.


And you are certainly guessing also. The thing about the future is that 
it hasn't happened yet and so one can only provide opinion to predict 
the unfolding of events.


At least when you remove the POSIX functions then the problem space is 
well defined.


And lots of sers will be pissed off because they won'tbe able to upgrade to 
PHP 6 without major programmer intervention.


This is opinion.

Suddenly having POSIX regex functions that are really wrappers around PCRE 
functions may introduce subtle differences in output for the same horde of 
users but without the same explicability.


"may introduce"? There you go, guessng again. Can you point out *any* POSIX 
function that cannot be converted into PCRE?


No... I leave it to you to prove the reverse since YOU want the PHP team 
to provide the wrappers. Don't be lazy... do

Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Robert Cummings

Tony Marston wrote:
"Ashley Sheridan"  wrote in message 
news:1257764339.1076.56.ca...@localhost...

On Mon, 2009-11-09 at 00:23 +, Tony Marston wrote:


developer laziness
or incompetence is not an acceptable excuse.


Exactly, so fix your scripts!


But my scripts aren't broken! It's PHP 6 that is broken.


Actually when PHP 6 comes out... it will be your scripts that are 
broken. The language doesn't adapt to you for every version change. YOU 
adapt to the language, otherwise YOUR scripts ARE broken.


Some hosting companies won't allow you to use htaccess files, refuse to 
install any optional extension, let alone one from the PECL or PEAR 
repositories. Some of them won't give you more than one MySQL database. 
Different companies provide different levels of service. The only thing that 
the DO have in common is that they charge you for it.


Then switch hosting company. Or pony up the extra $5 or $10 per month or 
so for a VPS that gives you root access and all the configurability you 
could want. Lack of choice is NOT the fault of PHP.


Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Robert Cummings

Tony Marston wrote:
"David Otton"  wrote in message 
news:193d27170911090331k7ecbe69cl1dd30651273e7...@mail.gmail.com...

2009/11/9 Tony Marston :


So you wouldn't trust the PHP developers to write simple code which takes
each POSIX function and redirects it to a PCRE function? I have more 
faith

in their ability than I do yours.

If it's as simple as you claim, why don't you mock-up your solution in
PHP, rather than C?


Because I can't do that until I install PHP 6, but as I never play with beta 
software waiting for it to go live will be too late.


Don't be lazy Tony, install beta software... make sure your software is 
ready before the beta becomes release software. This is part of being 
"professional".


Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Robert Cummings

Paul Fierro wrote:

On 11/9/09 8:56 AM, Tony Marston  wrote:


I have tried subscribing to the internals list, but none of my postings ever
appears.


That's unfortunate as you missed this thread:

http://marc.info/?t=12553625831&r=1&w=2


I didn't :)

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Anyone using Aptana and Xdebug? Or other debugger recommendations besides Zend?

2009-11-09 Thread Ali Asghar Toraby Parizy
On Mon, Nov 9, 2009 at 7:58 PM, Martin Scotta wrote:

> On Mon, Nov 9, 2009 at 1:04 PM, Arno Kuhl  wrote:
>
> > -Original Message-
> > From: Dave M G [mailto:mar...@autotelic.com]
> > Sent: 09 November 2009 05:36 PM
> > To: php-general@lists.php.net
> > Subject: [PHP] Anyone using Aptana and Xdebug? Or other debugger
> > recommendations besides Zend?
> >
> > PHP List,
> >
> > I won't go into a big rant about Zend, and instead simply say that while
> I
> > was using Zend Studio to debug PHP pages since version 5.0. I was never
> > really all that happy with it. It seemed to be the most complete
> debugging
> > environment for PHP, so I put up with it. I will say that the Studio
> > installation procedure has got better, but setting up a reliable
> debugging
> > server has not.
> >
> > Now, the current version of Zend Studio (7.0) is based on Eclipse (I
> think
> > since v6.0), and so I'm just not sure what I'm paying for anymore.
> > Aptana Studio, also based on Eclipse has pretty much the exact same
> > interface and can even connect to a Zend server.
> >
> > Since one of those is free, I can't see why I wouldn't switch. The issue
> > for
> > me is that paying for Zend hasn't really saved me much hassle, so even if
> > Aptana has difficulties, at least they are free difficulties.
> >
> > The main failing point, so far as I can see, of Aptana/Xdebug, is a lack
> of
> > good, clear, documentation (also note that Zend doesn't have great
> > documentation either). Especially on how to set it up.
> >
> > I was wondering if anyone has used it and could provide a link or
> > instructions on how to get the debugging environment up and running.
> >
> > Or, equally as valuable, would be recommendations on other debugging
> > environments. The key is finding one that has a clear set of instructions
> > for how to set it up (On Ubuntu/Debian Linux with a local LAMP server.)
> >
> > Thanks for any advice.
> >
> > Dave M G
> > --
> >
> > Dave, take a look at PhpED from Nusphere. I've used the Windows version
> > very
> > happily for the last 6 years. There is a Linux version but I haven't
> tried
> > it so can't comment - from the forum I gather that most users use the
> > Windows version. Debugging in PhpED is brilliant, but so is the rest of
> the
> > IDE. I also looked at Zend Studio every now and then over the last few
> > years
> > to see how it was progressing, but wasn't that impressed.
> >
> > Cheers
> > Arno
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> Why anyone needs to buy a IDE for develop PHP code?
>
> You can use any text editor.
>
> I use SciTE. It is free and open source.
> It does not provide any tool of any kind. It just allow me to write code,
> and that's all I need.
>
> Also there are a lot of tools for development.
> And IDE is just a fat text editor with lot of tools on it, and in some
> cases
> it can make your development slower.
>
> You can improve your development with a set of lightweight tools, this is
> the linux style.
>
> --
> Martin Scotta
>
What do you think IDE is?
Do you think you can build a real commercial application without debugging
and project management tools?


Re: [PHP] Anyone using Aptana and Xdebug? Or other debugger recommendations besides Zend?

2009-11-09 Thread Bipin Upadhyay

On 11/9/2009 11:42 PM, Ali Asghar Toraby Parizy wrote:

On Mon, Nov 9, 2009 at 7:58 PM, Martin Scottawrote:

   

On Mon, Nov 9, 2009 at 1:04 PM, Arno Kuhl  wrote:

 

-Original Message-
From: Dave M G [mailto:mar...@autotelic.com]
Sent: 09 November 2009 05:36 PM
To: php-general@lists.php.net
Subject: [PHP] Anyone using Aptana and Xdebug? Or other debugger
recommendations besides Zend?

PHP List,

I won't go into a big rant about Zend, and instead simply say that while
   

I
 

was using Zend Studio to debug PHP pages since version 5.0. I was never
really all that happy with it. It seemed to be the most complete
   

debugging
 

environment for PHP, so I put up with it. I will say that the Studio
installation procedure has got better, but setting up a reliable
   

debugging
 

server has not.

Now, the current version of Zend Studio (7.0) is based on Eclipse (I
   

think
 

since v6.0), and so I'm just not sure what I'm paying for anymore.
Aptana Studio, also based on Eclipse has pretty much the exact same
interface and can even connect to a Zend server.

Since one of those is free, I can't see why I wouldn't switch. The issue
for
me is that paying for Zend hasn't really saved me much hassle, so even if
Aptana has difficulties, at least they are free difficulties.

The main failing point, so far as I can see, of Aptana/Xdebug, is a lack
   

of
 

good, clear, documentation (also note that Zend doesn't have great
documentation either). Especially on how to set it up.

I was wondering if anyone has used it and could provide a link or
instructions on how to get the debugging environment up and running.

Or, equally as valuable, would be recommendations on other debugging
environments. The key is finding one that has a clear set of instructions
for how to set it up (On Ubuntu/Debian Linux with a local LAMP server.)

Thanks for any advice.

Dave M G
--

Dave, take a look at PhpED from Nusphere. I've used the Windows version
very
happily for the last 6 years. There is a Linux version but I haven't
   

tried
 

it so can't comment - from the forum I gather that most users use the
Windows version. Debugging in PhpED is brilliant, but so is the rest of
   

the
 

IDE. I also looked at Zend Studio every now and then over the last few
years
to see how it was progressing, but wasn't that impressed.

Cheers
Arno




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


   

Why anyone needs to buy a IDE for develop PHP code?

You can use any text editor.

I use SciTE. It is free and open source.
It does not provide any tool of any kind. It just allow me to write code,
and that's all I need.

Also there are a lot of tools for development.
And IDE is just a fat text editor with lot of tools on it, and in some
cases
it can make your development slower.

You can improve your development with a set of lightweight tools, this is
the linux style.

--
Martin Scotta

 

What do you think IDE is?
Do you think you can build a real commercial application without debugging
and project management tools?

   
Okay, before the answers deviate from the topic, a few quick personal 
pointers.

--> Zend IDE's good, but as you mention not _worth_ the price.
--> I use a number of editors based on which system I am using at the 
time, and they range from vim to NetBeans to EclipsePDT (and sometimes 
an unregistered demo version of Zend 7).
--> I prefer NetBeans-PHP and have it configured with XDebug. The 
configuration's fairly simple and documentation can help you do in 
several steps. Please search on NetBeans portal for the same.

IMHO, the same steps can be replicated for even an Eclipse based IDE.

--Bipin Upadhyay.
http://projectbee.org/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Suppress Right-Click and Hide hover URL

2009-11-09 Thread Don Wieland

Hi gang,

Is there a javascript to Suppress Right-Click and Hide hover URL?  I  
as trying to get this to work with no luck:


onMouseOver=\"javascript:window.status=''; return true;\" onClick= 
\"javascript:return confirm('Are you sure you want to REMOVE the  
assoication of this Area with this Inlet?')\"\">Remove


Please let me know if this can be tweaked to work...

Thanks!

Don Wieland
D W   D a t a   C o n c e p t s
~
d...@dwdataconcepts.com
Direct Line - (949) 305-2771

Integrated data solutions to fit your business needs.

Need assistance in dialing in your FileMaker solution? Check out our  
Developer Support Plan at:

http://www.dwdataconcepts.com/DevSup.html

Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro  
9 or higher

http://www.appointment10.com

For a quick overview -
http://www.appointment10.com/Appt10_Promo/Overview.html


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Suppress Right-Click and Hide hover URL

2009-11-09 Thread Shawn McKenzie
Don Wieland wrote:
> Hi gang,
> 
> Is there a javascript to Suppress Right-Click and Hide hover URL?  I as
> trying to get this to work with no luck:
> 
>  onMouseOver=\"javascript:window.status=''; return true;\"
> onClick=\"javascript:return confirm('Are you sure you want to REMOVE the
> assoication of this Area with this Inlet?')\"\">Remove
> 
> Please let me know if this can be tweaked to work...
> 
> Thanks!
> 

You are missing PHP tags 


-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Suppress Right-Click and Hide hover URL

2009-11-09 Thread Ashley Sheridan
On Mon, 2009-11-09 at 11:33 -0800, Don Wieland wrote:

> Hi gang,
> 
> Is there a javascript to Suppress Right-Click and Hide hover URL?  I  
> as trying to get this to work with no luck:
> 
>  onMouseOver=\"javascript:window.status=''; return true;\" onClick= 
> \"javascript:return confirm('Are you sure you want to REMOVE the  
> assoication of this Area with this Inlet?')\"\">Remove
> 
> Please let me know if this can be tweaked to work...
> 
> Thanks!
> 
> Don Wieland
> D W   D a t a   C o n c e p t s
> ~
> d...@dwdataconcepts.com
> Direct Line - (949) 305-2771
> 
> Integrated data solutions to fit your business needs.
> 
> Need assistance in dialing in your FileMaker solution? Check out our  
> Developer Support Plan at:
> http://www.dwdataconcepts.com/DevSup.html
> 
> Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro  
> 9 or higher
> http://www.appointment10.com
> 
> For a quick overview -
> http://www.appointment10.com/Appt10_Promo/Overview.html
> 
> 


There's no absolute way to stop the right click menu other than develop
completely in Flash, but I find this works quite well:



The way you are hiding the actual link URL will work for people who
navigate solely with their mouse, but you might want to add an onfocus()
handler in there as well for people who tab between links.

At the end of the day though, none of this will stop someone from
viewing your source code for the link, or using a browser plugin like
Firebug to determine what it is.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Suppress Right-Click and Hide hover URL

2009-11-09 Thread Martin Scotta
On Mon, Nov 9, 2009 at 4:37 PM, Ashley Sheridan 
wrote:

> On Mon, 2009-11-09 at 11:33 -0800, Don Wieland wrote:
>
> > Hi gang,
> >
> > Is there a javascript to Suppress Right-Click and Hide hover URL?  I
> > as trying to get this to work with no luck:
> >
> >  > onMouseOver=\"javascript:window.status=''; return true;\" onClick=
> > \"javascript:return confirm('Are you sure you want to REMOVE the
> > assoication of this Area with this Inlet?')\"\">Remove
> >
> > Please let me know if this can be tweaked to work...
> >
> > Thanks!
> >
> > Don Wieland
> > D W   D a t a   C o n c e p t s
> > ~
> > d...@dwdataconcepts.com
> > Direct Line - (949) 305-2771
> >
> > Integrated data solutions to fit your business needs.
> >
> > Need assistance in dialing in your FileMaker solution? Check out our
> > Developer Support Plan at:
> > http://www.dwdataconcepts.com/DevSup.html
> >
> > Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro
> > 9 or higher
> > http://www.appointment10.com
> >
> > For a quick overview -
> > http://www.appointment10.com/Appt10_Promo/Overview.html
> >
> >
>
>
> There's no absolute way to stop the right click menu other than develop
> completely in Flash, but I find this works quite well:
>
> 
>
> The way you are hiding the actual link URL will work for people who
> navigate solely with their mouse, but you might want to add an onfocus()
> handler in there as well for people who tab between links.
>
> At the end of the day though, none of this will stop someone from
> viewing your source code for the link, or using a browser plugin like
> Firebug to determine what it is.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
Why I will let you to hide things on my browser?
The browser is mine...

-- 
Martin Scotta


Re: [PHP] Suppress Right-Click and Hide hover URL

2009-11-09 Thread Ashley Sheridan
On Mon, 2009-11-09 at 17:01 -0300, Martin Scotta wrote:

> On Mon, Nov 9, 2009 at 4:37 PM, Ashley Sheridan 
> wrote:
> 
> > On Mon, 2009-11-09 at 11:33 -0800, Don Wieland wrote:
> >
> > > Hi gang,
> > >
> > > Is there a javascript to Suppress Right-Click and Hide hover URL?  I
> > > as trying to get this to work with no luck:
> > >
> > >  > > onMouseOver=\"javascript:window.status=''; return true;\" onClick=
> > > \"javascript:return confirm('Are you sure you want to REMOVE the
> > > assoication of this Area with this Inlet?')\"\">Remove
> > >
> > > Please let me know if this can be tweaked to work...
> > >
> > > Thanks!
> > >
> > > Don Wieland
> > > D W   D a t a   C o n c e p t s
> > > ~
> > > d...@dwdataconcepts.com
> > > Direct Line - (949) 305-2771
> > >
> > > Integrated data solutions to fit your business needs.
> > >
> > > Need assistance in dialing in your FileMaker solution? Check out our
> > > Developer Support Plan at:
> > > http://www.dwdataconcepts.com/DevSup.html
> > >
> > > Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro
> > > 9 or higher
> > > http://www.appointment10.com
> > >
> > > For a quick overview -
> > > http://www.appointment10.com/Appt10_Promo/Overview.html
> > >
> > >
> >
> >
> > There's no absolute way to stop the right click menu other than develop
> > completely in Flash, but I find this works quite well:
> >
> > 
> >
> > The way you are hiding the actual link URL will work for people who
> > navigate solely with their mouse, but you might want to add an onfocus()
> > handler in there as well for people who tab between links.
> >
> > At the end of the day though, none of this will stop someone from
> > viewing your source code for the link, or using a browser plugin like
> > Firebug to determine what it is.
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> Why I will let you to hide things on my browser?
> The browser is mine...
> 


I can think of one perfectly good reason. Perhaps this is a simple
attempt at forcing an app to work all within a single window, and
prevent it from breaking by the end user opening new windows and tabs
from the link.

Before rushing to defend your castle, it might be helpful to consider if
it really is an invading army at your gates.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Suppress Right-Click and Hide hover URL

2009-11-09 Thread richardh
Hi,

> Why I will let you to hide things on my browser?
> The browser is mine...

No no, all your browser are belong to me.

-- 
Richard Heyes
HTML5 graphing: RGraph - www.rgraph.net (updated 8th November)
Lots of PHP and Javascript code - http://www.phpguru.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Suppress Right-Click and Hide hover URL

2009-11-09 Thread Shawn McKenzie
I see... I guess I fail at being a smart ass!

Don Wieland wrote:
> Nope this was just a snippet of my code - they are between the PHP tags.
>
> On Nov 9, 2009, at 11:38 AM, Shawn McKenzie wrote:
>
>> You are missing PHP tags 
>
> Don Wieland
> D W   D a t a   C o n c e p t s
> ~
> d...@dwdataconcepts.com
> Direct Line - (949) 305-2771
>
> Integrated data solutions to fit your business needs.
>
> Need assistance in dialing in your FileMaker solution? Check out our
> Developer Support Plan at:
> http://www.dwdataconcepts.com/DevSup.html
>
> Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro
> 9 or higher
> http://www.appointment10.com
>
> For a quick overview -
> http://www.appointment10.com/Appt10_Promo/Overview.html
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Build Categories based on an static Array

2009-11-09 Thread Don Wieland
I am trying to build a SELECT MENU (with categories). I cant seem to  
get the syntax correct. Little help:


// Get Areas values for MENU
$AreasList = "";

$queryR = array(0 => 'Domestic','International','Special');
while($rowR = $queryR->fetch_assoc()) {

$AreasList .= "";
$Area_Type = $rowR['Area_Type'];


	$query2 = "SELECT Area_id,Area FROM Areas WHERE  
`Area_Type`='$Area_Type' ORDER BY Area";

$results2 = $db->query($query2) or die("No Area found.");

while($row2 = $results2->fetch_assoc()) {
		$AreasList .= "value='{$row2['Area_id']}'>{$row2['Area']}";

}
$AreasList .= "";
}

$AreasList .= "";



Don Wieland
D W   D a t a   C o n c e p t s
~
d...@dwdataconcepts.com
Direct Line - (949) 305-2771

Integrated data solutions to fit your business needs.

Need assistance in dialing in your FileMaker solution? Check out our  
Developer Support Plan at:

http://www.dwdataconcepts.com/DevSup.html

Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro  
9 or higher

http://www.appointment10.com

For a quick overview -
http://www.appointment10.com/Appt10_Promo/Overview.html


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Build Categories based on an static Array

2009-11-09 Thread Daevid Vincent
Perhaps my function may help you...

Use it like this:

Problem Category:


Or with the double_up_uh_uh() function to save redundant array key/values:

Unit opened for
investigation:



/**
* Dynamically generates a select box from a $key => $value array.
*
* the array can be generated on the fly or stored.
* the key is the OPTION value and the $value is the name shown in the box.
* if there is only a key, then that is used as the value too.
* very useful for boolean type listboxes too.
* also useful to save DB queries for supporting tables.
*
* Tooltips do NOT work in IE6. sorry. blame Microsoft for not following W3
standards...
*
* @access   public
* @return   mixed  integer # of elements in select box or string of
actual select box if $echo == true.
* @paraminteger $size usually 1, but the select box can be any
height.
* @paramstring $name the NAME='$name' parameter of a SELECT tag.
* @paramarray $listArray The actual key => value formatted array.
* @paramboolean $blank add the extra 'empty' .
* @paramboolean $auto onChange will cause a form submit if true.
* @paramstring $MatchToThis sometimes it is useful to match $name to
something like $_GET['name'] instead. it is array safe too!
* @paramstring $extratags Any extra CLASS='' or MULTIPLE or whatever
to put in the  tag.
* @param   boolean $indent When using an array of arrays, the sub arrays
will be grouped using . If you want to disable the indent when
$size is greater than 1, change this to false.
* @paramboolean $echo Output the selectbox in place (true) or return
it as a string
* @see  select_box_sql()
* @author   Daevid Vincent [dae...@]
*/
function select_box_array($size=1, $name, $listArray, $blank = false, $auto
= false, $MatchToThis = false, $extratags = false, $indent = true, $echo =
true)
{
global $$name;
$items = 0;
if (intval($size) < 1) $size = 1;
if ($MatchToThis === false) $MatchToThis = $$name;
$out = '';

$out .= "\n 1) $out .= ' onmouseover="selectBoxTitle(this);"';
$out .= ">\n";

if (count($listArray) > 0)
{
if( ! is_bool( $indent ) || ( ! $indent && ( $size == 1 ) )
) $indent = true;
if ($blank && is_bool($blank) ) { $out .= "\n\n"; }
elseif ($blank && is_string($blank)) { $out .= "\n".$blank."\n"; }
foreach($listArray as $key => $val)
{
// Check for selectbox sub-headings.
if( is_array($val) )
{
$out .= ( $indent ?
"\t\n" :
"\t--- " . trim(
preg_replace( '/^-*(.*?)-*$/', '\\1', stripslashes( $key ) ) ) . "
---\n");
foreach( $val as $subkey => $subval )
{
$out .= "\t\t 1) $out .= '
onmouseover="this.title = this.text;"';
$out .= '>';
$out .= stripslashes( $subval ?
$subval : $subkey );
$out .= "\n";
}
$out .= (($indent) ? "\t\n" :
'');
}
elseif( 0 == strncmp( $val, "---", 3 ) )
{
$out .= "".stripslashes($val)."\n";
}
else
{
$out .= "\t 1) $out .= "
title=\"".stripslashes($val)."\"";
if ($size > 1) $out .= '
onmouseover="this.title = this.text;"';
$out .= '>';
$out .= stripslashes( $val ? $val : $key );
$out .= "\n";
}
} //foreach
} //if count(listArray)

$out .= "\n";

if ($echo)
{
echo $out;
return count($listArray);
}
else return $out;
}

/**
* @return   mixed 'selected' or false
* @paramarray $haystack the array that contains the selected items
* @paramstring $needle the item in the $haystack we're looking for.
* @author   Daevid Vincent [dae...@]
*/
function selected_if_in_array(&$haystack, $needle)
{
if ( !is_array($haystack) ) return false;
return ( in_array($needle, $haystack) ) ? 'selected' : false;
}

/**
* Take an array of unique values and make the keys the same as the value.
* Useful for select boxes for example.
*
* @access   public
* @return   mixed
* @paramarray $myArray
* @author   Daevid Vincent [dae...@]
*/
function double_up_uh_uh($myArray)
{
foreach($myArray as $k => $v)
$tmp[$v] = $v;
 

Re: [PHP] Multilingual website, texts in external JavaScript problem

2009-11-09 Thread leledumbo

> I don't see why you can't use inline script in XHTML 1.0 Strict

Because I don't know about CDATA, thanks.
-- 
View this message in context: 
http://old.nabble.com/Multilingual-website%2C-texts-in-external-JavaScript-problem-tp26261666p26278740.html
Sent from the PHP - General mailing list archive at Nabble.com.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php