php-general Digest 17 Aug 2008 19:05:10 -0000 Issue 5629

Topics (messages 278239 through 278249):

Re: If Column Exists
        278239 by: Luke

Re: SOAP - return a list of items
        278240 by: Luke

FCKEditor, TinyMCE, ... I need a light weight WYSIWYG HTML Editor
        278241 by: AmirBehzad Eslami
        278242 by: Ashley Sheridan
        278246 by: Eric Butera
        278249 by: mike

Re: Licensing
        278243 by: tedd
        278245 by: Richard Heyes

Re: How to submit form via PHP
        278244 by: tedd

Re: On one of my computers, php can't see an external javascript I included
        278247 by: googling1000
        278248 by: Ashley Sheridan

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
There is IF EXISTS for tables, is there the same thing for columns in the
table
like

IF EXISTS column IN TABLE table

? Just an idea

2008/8/13 VamVan <[EMAIL PROTECTED]>

> Interesting. Thanks guys!!
>
> On Wed, Aug 13, 2008 at 1:32 AM, Robin Vickery <[EMAIL PROTECTED]> wrote:
>
> > 2008/8/12 VamVan <[EMAIL PROTECTED]>:
> > > Hello,
> > >
> > > I am working on data migration for one mysql db to another using PHP.
> How
> > do
> > > I check if a particular table has a particular column. If not alter...
> > >
> > > Thanks
> > >
> >
> > Use the information_schema:
> >
> > SELECT COUNT(*) AS column_exists FROM information_schema.COLUMNS WHERE
> > TABLE_SCHEMA='db_name' AND TABLE_NAME='table_name' AND
> > COLUMN_NAME='column_name';
> >
> > -robin
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>



-- 
Luke Slater

--- End Message ---
--- Begin Message ---
why use soap for this? I just use a javascript array for this kind of
thing...

2008/8/13 Dan Joseph <[EMAIL PROTECTED]>

> Maybe more info will help:
>
> Here is what I have so far for the WSDL...
>
>    <xsd:complexType name="getQuoteHistory">
>        <xsd:all>
>            <xsd:element name="id" type="xsd:string"/>
>            <xsd:element name="key" type="xsd:string"/>
>            <xsd:element name="username" type="xsd:string"/>
>            <xsd:element name="password" type="xsd:string"/>
>        </xsd:all>
>    </xsd:complexType>
>
>    <xsd:complexType name="getQuoteHistoryResponse">
>        <xsd:sequence>
>            <xsd:element minOccurs="0" maxOccurs="1" name="getQuoteResult"
> type="tns:ArrayOfgetQuoteHistoryResult" />
>        </xsd:sequence>
>    </xsd:complexType>
>
>    <xsd:complexType name="ArrayOfgetQuoteHistoryResult">
>        <xsd:sequence>
>            <xsd:element minOccurs="0" maxOccurs="unbounded"
> name="getQuoteHistoryResult" nillable="true"
> type="tns:getQuoteHistoryResult" />
>        </xsd:sequence>
>    </xsd:complexType>
>
>    <xsd:complexType name="getQuoteHistoryResult">
>        <xsd:sequence>
>            <xsd:element name="success" type="xsd:boolean"/>
>            <xsd:element name="message" type="xsd:string"/>
>            <xsd:element name="quoteid" type="xsd:string"/>
>            <xsd:element name="dateentered" type="xsd:string"/>
>            <xsd:element name="expirationdate" type="xsd:string"/>
>            <xsd:element name="origin" type="xsd:string"/>
>            <xsd:element name="destination" type="xsd:string"/>
>            <xsd:element name="vehicle_type" type="xsd:string"/>
>            <xsd:element name="price" type="xsd:string"/>
>        </xsd:sequence>
>    </xsd:complexType>
>
> This validates fine in soapUI, and seems to work fine when the client
> connects to it.
>
> The piece from PHP:
>
>            $count = 0;
>
>            while ( $data = $this->dbconn->fetchrow( $res ) )
>            {
>                foreach ( $data as $key => $value )
>                {
>                    $quotes[$count][$key] = $value;
>                }
>
>                $count++;
>            }
>
> return $quotes;
>
> This is the soap response:
>
> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/"; xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="urn:ursquoteservice"
> xmlns:ns2="urn:ursquote" xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:SOAP-ENC="
> http://schemas.xmlsoap.org/soap/encoding/";>
>   <SOAP-ENV:Body>
>      <ns1:getQuoteHistoryResponse>
>         <getquotehistoryresponse xsi:type="ns2:getQuoteHistoryResponse"/>
>      </ns1:getQuoteHistoryResponse>
>   </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> It seems like I am just missing something somewhere.
>
> Anyone able to help?
>
> --
> -Dan Joseph
>
> www.canishosting.com - Plans start @ $1.99/month.
>
> "Build a man a fire, and he will be warm for the rest of the day.
> Light a man on fire, and will be warm for the rest of his life."
>



-- 
Luke Slater

--- End Message ---
--- Begin Message ---
Dear list,

I'm looking for a light weight WYSIWYG HTML Editor to allow
users to send private messages to each other in a forum application.

FCKEditor is too complex and very huge for my purposes. I want a
simple editor. What do you recommend?

Thanks in advance
-- 
Kind regards,
-behzad

--- End Message ---
--- Begin Message ---
I've always found FCKEditor to be pretty handy. There is an option to
set it to a simple mode, giving only the bold, italic, underlined and
link buttons, and this is extendable to include only the buttons you
need. It's an absolute doddle to implement in a web app as well; I've
used it for several projects at work. What sort of functionality were
you looking for?


Ash
www.ashleysheridan.co.uk
--- Begin Message ---
Dear list,

I'm looking for a light weight WYSIWYG HTML Editor to allow
users to send private messages to each other in a forum application.

FCKEditor is too complex and very huge for my purposes. I want a
simple editor. What do you recommend?

Thanks in advance
-- 
Kind regards,
-behzad

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


--- End Message ---

--- End Message ---
--- Begin Message ---
On Sun, Aug 17, 2008 at 8:33 AM, AmirBehzad Eslami
<[EMAIL PROTECTED]> wrote:
> Dear list,
>
> I'm looking for a light weight WYSIWYG HTML Editor to allow
> users to send private messages to each other in a forum application.
>
> FCKEditor is too complex and very huge for my purposes. I want a
> simple editor. What do you recommend?
>
> Thanks in advance
> --
> Kind regards,
> -behzad
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Look into the YUI editor for something light weight.  You can serve up
all the JS straight from their cdn.

http://developer.yahoo.com/yui/editor/


In all of my projects I always use FCKEditor.  It is easy to have it
in one spot and symlink that to each individual project.  But that is
very specific to the way I deploy my apps.

--- End Message ---
--- Begin Message ---
On 8/17/08, AmirBehzad Eslami <[EMAIL PROTECTED]> wrote:
> Dear list,
>
> I'm looking for a light weight WYSIWYG HTML Editor to allow
> users to send private messages to each other in a forum application.
>
> FCKEditor is too complex and very huge for my purposes. I want a
> simple editor. What do you recommend?

WordPress has tweaked tinymce a lot to maintain <p> spacing and code
snippets and embedded objects. We've tried both at my job with various
configurations, both have had issues - but we've had the most success
and our users have been happy with WordPress's configuration (which
uses a couple custom javascript things + specific tinymce
configuration)

I've been trying to examine the differences so I can create a reusable
standalone component we can use in all our various apps... but WP has
hooked in a lot of custom code and it's been a bit annoying trying to
split it out into a single reusable javascript file and stuff. Almost
done though. I went overboard and tried to make it more generic by
renaming and cleaning up the functions to not need any WordPress
callbacks and stuff and wound up messing it up, so I have to go back
again and probably re-create it from scratch.. Doh :)

Honestly in a forum setting you can just give them a bbcode howto/link
on the side and let them put in their own bbcode (which can be a
strict subset of HTML) - or even just allow HTML tags and limit what
they can do. Loading up a javascript-based thing even if it's pretty
lightweight is still annoying and I could see that being overkill for
a forum.

--- End Message ---
--- Begin Message ---
At 3:34 PM +0100 8/16/08, Richard Heyes wrote:
Hi,

Don't think me a money grabbing bast (well, I guess I am...) but I'd
just like to know if you've got any input on trying to get people to
cough up some readies in return for the mounds of free code I give
away. I've updated my licensing page just now, and hopefully this will
convince more people to buy one:
http://www.phpguru.org/static/license.html

Thanks for any pointers.

--
Richard Heyes

Richard:

No offense, but you asked for pointers.

I can tell you're a programmer and not a marketer.

While your license makes sense to you, the typical person will come away with "Okay, if I see something I want, I'm not sure what to do. I guess that I'll have to read the license again."

Instead, use a two or three tiered licensing scheme, something like this.

General Purpose
Unlimited
Commercial

And briefly describe what each one will Do for your customer -- IOW, don't dwell on what it doesn't cover and be specific and enthused on what it does.

You see, in your current description you jump back and forth between what's covered and what's not. After reading your write-up I'm still not sure I could use your "multiple select Javascript / CSS plugin" if I bought a commercial license or not. That's not good.

You want it to be easy for customers to understand and purchase your licenses -- remember half the population is below average intelligence. Considering you're trying to sell to programmers, then figure may even be a bit higher. So keep it simple.

Also, if I do decide to buy a license -- what's £49 is US dollars? How do I pay you? Do you accept PayPal, Credit Cards or do I send you a goat and two chickens? If you want people to pay you, then give them the opportunity and make it obvious.

Oh, I just looked at your page again and on my *third* read, I finally see that you do offer PayPal. Why didn't I catch that the first time? Well, I'm a programmer, but the major reason is that I expect to see a PayPal logo on a site that accepts PayPal. So, use the PayPal logo somewhere on your page!

Also, place a few "Buy Now" links here and there -- they work. There's been several books written on this subject -- the best one I've read is "Submit Now" by Andrew Chak -- if you want to pick up one and read the specifics of why these things work.

One other note, what's with the "richard at php dot net"? Instead make it easier for users to contact you -- use Enkoder to mask your email address -- here's the link:

http://hivelogic.com/enkoder/form

And finally:

http://validator.w3.org/check?uri=http://www.phpguru.org/static/license.html

Many people say it don't matter, but I'm not one of them.  :-)

Cheers,

tedd

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

--- End Message ---
--- Begin Message ---
> No offense, but you asked for pointers.

None taken. I may know how to code a reasonable webpage, but selling
it when it's done is something else... :-)

> I can tell you're a programmer and not a marketer.

Exactly. :-)

> While your license makes sense to you, the typical person will come away
> with "Okay, if I see something I want, I'm not sure what to do. I guess that
> I'll have to read the license again."

I've tried to simplify the first FAQ.

> remember half the population is below average intelligence.

I think I may have met a lot of them... :-)

> And finally:
>
> http://validator.w3.org/check?uri=http://www.phpguru.org/static/license.html
>
> Many people say it don't matter, but I'm not one of them.  :-)

10 Errors, 19 warning(s) - eesh, I'll put it "on the backburner..." :-)

Okay, I've taken your points on board and come up with this:
http://www.phpguru.org/static/license.html Better?

-- 
Richard Heyes
http://www.phpguru.org

--- End Message ---
--- Begin Message ---
At 2:39 PM -0400 8/15/08, Robert Cummings wrote:
On Fri, 2008-08-15 at 13:30 -0500, Jay Blanchard wrote:
 > Your form tag needs an action statement

No it doesn't... without an action statement it will submit to the same
URL in which it was presented.

Cheers,
Rob.

Rob:

There you go again -- I've been submitting forms for over a decade and didn't know that.

There's nothing more annoying than someone who's always teaching you something. :-)

Cheers,

tedd

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

--- End Message ---
--- Begin Message ---
After I took Chris's advice and go to the .js file directly like
http://locahost/myfunctions.js,
I see the machine that is giving me a hard time says that there's a error in
the javascript code.
But, I took a look and the code seems fine to me.



-- 
View this message in context: 
http://www.nabble.com/On-one-of-my-computers%2C-php-can%27t-see-an-external-javascript-I-included-tp18975937p19022011.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
Any chance of putting a link to this .js file online so that we can have
a look at it? Without that, there's very little anyone can do for you.


Ash
www.ashleysheridan.co.uk
--- Begin Message ---
After I took Chris's advice and go to the .js file directly like
http://locahost/myfunctions.js,
I see the machine that is giving me a hard time says that there's a error in
the javascript code.
But, I took a look and the code seems fine to me.



-- 
View this message in context: 
http://www.nabble.com/On-one-of-my-computers%2C-php-can%27t-see-an-external-javascript-I-included-tp18975937p19022011.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


--- End Message ---

--- End Message ---

Reply via email to