Topic RSS
9:13 pm
Hey all
I love this plugin and have it appearing on several pages in my site.
My problem however is that I need to know which URL the form is sent from each time I receive a message.
Is there some PHP hidden fields code that will include the URL that the message is sent from in my email?
Thanks
Andy
9:35 pm
March 6, 2005
OfflineThis works -to an extent- already. Take a look at the email head, that's sent out:
A new submission (form: "Subscription Form")
======================================
Submitted on: April 11, 2007 @ 10:26 pm
Via: /test-custom-cform
By 84.153.92.228 (visitor IP)
This information is also saved in the tracking db (if tracking per DB is enabled). To work properly, this requires WP to use permalinks.
Oliver
1:41 pm
I see that it does track via that format but my site relies on using the default permalink structure: http://www.mysite.com/?p=123
Therefore all my results say they come from /
Is there a way around this to show me the number of the post from which the form was sent from?
9:11 pm
March 6, 2005
OfflineAs a permament fix, you can try to replace
$page = substr( $_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'],'?')-1);
$page = (trim($page)=='')?'/':trim($page);
with
$page = "Post: #".get_the_id();
in cforms.php (line ~351 & ~815).
Let me know if this did the trick.
11:02 pm
Hey Oliver
No unfortunately that didn't work.
It simply showed the # but not the number of the post afterwards.
Any other ideas?
Thanks for your help so far!
Is there a way I can extract the post title from my mysql database and put it in that position?
12:41 am
March 6, 2005
OfflineHere is what I tested for the non-ajax form submission:
This line:
$page .= '('.get_the_id().')';
I added right after line 814 (rel. 3.4), disabled ajax support for the form and it produced the desired output in the email:
===============================================
Submitted on: April 15, 2007 @ 1:29 am
Via: /2007/03/20/new/(5)
By 84.153.100.4 (visitor IP)
The post context is maintained when sending, hence it only works without ajax.
To make it work with ajax, one would need to add another hidden form field including the posts' ID/Title and deliver it to the backend send mechanism. Quite a bit of work involved here.
Most Users Ever Online: 959
Currently Online:
66 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
tracedef: 43
mores: 21
Gyrus: 20
frozenwaste: 18
asuffredini: 15
photoworks: 14
Member Stats:
Guest Posters: 3552
Members: 1464
Moderators: 3
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 5159
Posts: 18392
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6398)
FAQs
Home
Add Reply
Add Topic
Quote











