473,320 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

WordPress question....

hi expert php'ers.....;)

is it ok to ask WordPress questions here? I mean if you don't get a
response to your quetion in WP forums where else can you go??
I have WP 2.3 installed on my own hosting server..
I'm tying to do something that should be quite simple yet I can't get it
to work...

I want to do my own form, w/o having to use a plugin.. I tried a contact
plugin, but you can't specify what address to send email to, which
renders the plugin pretty useless.. in readme file for the plugin is
url to a forum for plugin (www.linksback.org/forums) in this forum I
found question on how to change 'to' email address, this is the answer:
"It is set to go to the default wordpress email. [oh really? what
address exactly???] I will include an option to change that in the next
version" (a joke, if you ask me..) I found a variable for "to" email
address among the code, and changed it there, but it still didn't work..

I have my own php-code for sending email, that works fine if the form
submitting is OUTSIDE WP-installation; but if the form is INSIDE the
installation, no info gets passed to my ThankYou.php page, which I have
put outside WP-installation and in 'action' attr inside form tag put an
absolute link to it..

this is my email code, which, again, works fine if form is outside
WP-installation:

$sendername = $_POST['name'];
// echo "name of sender: $sendername<br>";
$email = $_POST['email'];
// echo "email of sender: $email<br>";
$headers = "From: $sendername <$email>" . "\r\n";
$msg = $_POST['msg'];
$msg = wordwrap($msg, 70);
// echo "msg: $msg";
$subj = "feedback from blog";
$to = "<my address>";
mail($to,$subj,$msg,$headers);

I have used this code on numerous occasions, with two different
php-hostings.. does anybody know WHY it doesn't it work with Word Press
(i.e., if form/info comes from inside WP-installation)?? folks in
WP-formus keep pointing me to this and that other plug-in, but I'd
rather use my own code than having to go to an interface to configure
someone else's code... I mean look at all the stuff you have to do for
this one, for example, http://green-beast.com/blog/?page_id=136.. it's
just crazy.. why won't 'normal' php code ;) work with a form that's
inside WP-installation?? I mean if I can't use my own code for stuff
for something simple like this then what is the point of open-source???? ;)

I hope it's ok to ask this here, this is getting a bit frustrating at
this point (reason I want to use form rather than use 'mailto' link is
that I don't want my email address on the site, as one way spammers
gather email addresses is they harvest them to 'mailto' links, AND: and
I really need to specify 'to' address, since this is an address that is
not even in blog-domain (i.e., email address is something like
"me@mydomain.com, mydomain not being domain for the blog (I don't want
to have to check more addresses than necessary, and this is just a
personal blog, I will probably get very little email..)

thank you very much..

Oct 23 '07 #1
7 2663
maya wrote:
hi expert php'ers.....;)

is it ok to ask WordPress questions here? I mean if you don't get a
response to your quetion in WP forums where else can you go??
I have WP 2.3 installed on my own hosting server..
I'm tying to do something that should be quite simple yet I can't get it
to work...
You can ask. But you probably won't get any answers here. The
WordPress forums are still your best best for help.

Very few here have used WordPress, whereas everyone on their forum uses it.

And there must be a reason why they recommend plug-ins. You might ask
them why.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 23 '07 #2
Jerry Stuckle wrote:
maya wrote:
>hi expert php'ers.....;)

is it ok to ask WordPress questions here? I mean if you don't get a
response to your quetion in WP forums where else can you go??
I have WP 2.3 installed on my own hosting server..
I'm tying to do something that should be quite simple yet I can't get
it to work...

You can ask. But you probably won't get any answers here. The
WordPress forums are still your best best for help.

Very few here have used WordPress, whereas everyone on their forum uses it.

And there must be a reason why they recommend plug-ins. You might ask
them why.
oh brother.. ok, if I can't do my thing like I want to w/my own code
but only w/a "plugin", then it means this thing is not REALLY open
source.. ok, I tried.. thank you for your response...

Oct 23 '07 #3
maya wrote:
>
oh brother.. ok, if I can't do my thing like I want to w/my own code
but only w/a "plugin", then it means this thing is not REALLY open
source.. ok, I tried.. thank you for your response...
Huh???? You are free to modify the the WordPress code any way you want.
That's open source. There are good ways and bad to do things; doing
something the bad way has nothing to do with open source.

I have email forms that I wrote and they work just fine. I don't even
think they work via a plugin, but it's been so long that I don't remember.

Don't bitch about it, just do it.
Oct 23 '07 #4
maya wrote:
Jerry Stuckle wrote:
>maya wrote:

And there must be a reason why they recommend plug-ins. You might ask
them why.

oh brother.. ok, if I can't do my thing like I want to w/my own code
but only w/a "plugin", then it means this thing is not REALLY open
source.. ok, I tried.. thank you for your response...

That's not what open source means. Open source means you have full
access to their source code. You still must abide by any restrictions
placed by their system.

So - find out why it takes a plugin - and see what you need to do to
make your code compatible.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 24 '07 #5
NC
On Oct 23, 8:16 am, maya <maya778...@yahoo.comwrote:
>
I want to do my own form, w/o having to use a plugin..
There is a reason plugins are used in WordPress. If you modify
WordPress codebase, the results will impact every page and/or post
generated by WordPress. If you want your form to appear only on
certain page(s), you need to implement it within a plugin.
I tried a contact plugin, but you can't specify what
address to send email to, which renders the plugin
pretty useless..
So try another one... This one seems to be OK:

http://wordpress.org/extend/plugins/cforms/
It is set to go to the default wordpress email. [oh really?
what address exactly???]
The one that's associated with the user whose name is "admin" and
whose ID number is 1.
I have my own php-code for sending email, that works fine
if the form submitting is OUTSIDE WP-installation;
So wrap it into a plugin, and your problem is solved...
I have used this code on numerous occasions, with two
different php-hostings.. does anybody know WHY it doesn't
it work with Word Press
Because you are putting it in the wrong place, perhaps? :)
I mean if I can't use my own code for stuff for something
simple like this then what is the point of open-source???? ;)
Open source or not, you need to understand the inner workings of the
system you are trying to extend...

Cheers,
NC

Oct 24 '07 #6

thank you all for your responses.. all points well taken..

I guess I will have no choice but to try the plugin, but I still don't
understand why I can't use my own code to send email.. there are other
things I don't understand about this WordPress installation, like if I
add one php file where all other files are for my blog (I mean where
main index.php is) I get a 404 on that php file if I try to load it on
the browser.. this doesn't make too much sense.. call it 'open
source', call it whatever you want, it should be more flexible than that..

thank you very much..
NC wrote:
On Oct 23, 8:16 am, maya <maya778...@yahoo.comwrote:
>I want to do my own form, w/o having to use a plugin..

There is a reason plugins are used in WordPress. If you modify
WordPress codebase, the results will impact every page and/or post
generated by WordPress. If you want your form to appear only on
certain page(s), you need to implement it within a plugin.
>I tried a contact plugin, but you can't specify what
address to send email to, which renders the plugin
pretty useless..

So try another one... This one seems to be OK:

http://wordpress.org/extend/plugins/cforms/
>It is set to go to the default wordpress email. [oh really?
what address exactly???]

The one that's associated with the user whose name is "admin" and
whose ID number is 1.
>I have my own php-code for sending email, that works fine
if the form submitting is OUTSIDE WP-installation;

So wrap it into a plugin, and your problem is solved...
>I have used this code on numerous occasions, with two
different php-hostings.. does anybody know WHY it doesn't
it work with Word Press

Because you are putting it in the wrong place, perhaps? :)
>I mean if I can't use my own code for stuff for something
simple like this then what is the point of open-source???? ;)

Open source or not, you need to understand the inner workings of the
system you are trying to extend...

Cheers,
NC
Oct 26 '07 #7
NC
On Oct 26, 6:21 am, maya <maya778...@yahoo.comwrote:
>
I guess I will have no choice but to try the plugin,
but I still don't understand why I can't use my own
code to send email..
You can; you just need to organize it into a plugin.
if I add one php file where all other files are for my
blog (I mean where main index.php is) I get a 404 on
that php file if I try to load it on the browser..
This, in all likelihood, has nothing to do with WordPress; I often add
a simple phpinfo() file to WordPress' main directory to test system
environment during development or deployment, and I am yet to see the
error you describe.

For starters, check the program you used to upload your files. Some
have a "convert file names to lower case" setting, so your
ThankYou.php might have been inadvertently uploaded as thankyou.php.
this doesn't make too much sense.. call it 'open
source', call it whatever you want, it should be more
flexible than that..
No. YOU should be more flexible than that. Extending an existing
system requires an understanding of how it works and what extension
mechanisms it provides.

Let's say you were an automotive engineer and designed some
performance parts for BMW M3. You wouldn't insist that those parts
should fit into Porsche Carrera or Mercedes SL550 or Audi TT without
any modification, would you? Same logic applies to software;
extensions must fit with the rest of the system.

Cheers,
NC

Oct 26 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Michele Ferretti | last post by:
http://www.blackbirdblog.it/programmazione/progetti/28 -- Michele Ferretti ICQ#: 14491159 Skype: m.ferretti79 black DOT bird AT tiscali DOT it www.blackbirdblog.it
0
by: surfivor | last post by:
I am doing some preliminary research as we are slated to do a project with wordpress. I looked at the wordpress code and realized why I like MVC so much (Rails) because the code mixed in with the...
0
by: Hasin Hayder | last post by:
Today I developed this tool to import wordpress blog rolls as XML document. You know when you export data from wordpress.com that doesn't include the blog rolls data. So if you want to keep a...
9
by: Nooze Goy | last post by:
I'm trying to use a blog client to write messages with "attached" .pdf content to WordPress blogs. WIth the "Direct Upload" mechanism, the attached files work for some types (like .txt) but fails...
1
by: jasonh1982 | last post by:
I am looking to add wordpress as a blogging platform to my website -- but I don't know php and want it to seamlessly integrate with my existing web design at www.jherrington.com. just wondering...
4
by: sleepy1038 | last post by:
Hello, I'm developing a site that makes use of wordpress. The homepage is outside of wordpress and I am pulling the latest 3 blog posts from the wordpress database to display on the homepage....
3
by: Bhavesh | last post by:
hi everyone, i want to use wordpress in my C#.net website ,,so is it possible to use ? b'coz wordpress requires Php, mysql & apache... If not then which DOTNET blog tool is best which can...
4
by: Neil Jones | last post by:
Hello, I would like to create my own theme(s) for a couple of my own blog sites. I am hoping a few better themes could bring lot more readers. So far, I have stayed with the default wordpress...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.