wp5le
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form DB] filelinks=”img” doesn’t work anymoreThank you for all your help!!!
Forum: Plugins
In reply to: [Contact Form DB] filelinks=”img” doesn’t work anymoresorry .. i probably found the reason .. it is with the Author rule ..
Sorry for your time!!Forum: Plugins
In reply to: [Contact Form DB] filelinks=”img” doesn’t work anymoreThat is interesting.. is it the same witch “Fast Secure Contact Form”??
but how could i roll back to the previous version?Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterso so sorry … no it still doesn’t works..
i use this:
require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBPermittedFunctions.php'); function getLastPathSegment($url) { $path = parse_url($url, PHP_URL_PATH); $pathTrimmed = trim($path, '/'); $pathTokens = explode('/', $pathTrimmed); if (substr($path, -1) !== '/') { array_pop($pathTokens); } return end($pathTokens); } cfdb_register_function('getLastPathSegment');
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
and inside the website i use:
[cfdb-html form="test" filter="field1=getLastPathSegment()"]${Submitted}[/cfdb-html]
static is working
[cfdb-html form="test" filter="field1=ball"]${Submitted}[/cfdb-html]
.. what am i doing wrong? .. i’m sorry
Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterand as filter: filter=”field=getLastPathSegment” ?
That doesn’t works ..
Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterHi Michael,
did i pointed out, that i’m not a developer? It takes much time for me to test or do what you tell me ??Still it is not working..
But with the following code i can do an echo, that gives me the filter value, that i need from the url.
function getLastPathSegment($url) {
$path = parse_url($url, PHP_URL_PATH);
$pathTrimmed = trim($path, ‘/’);
$pathTokens = explode(‘/’, $pathTrimmed);
if (substr($path, -1) !== ‘/’) {
array_pop($pathTokens);
}
return end($pathTokens);
}echo getLastPathSegment($_SERVER[‘REQUEST_URI’]);
The Echo is result is perfect!
How can i get the result into the filter?
I tried it this way.. but i does’nt works: cfdb_register_function(‘getLastPathSegment();Can you please help me to create now the correct function – code?
Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterHi Michael,
i did the steps above.
For my understanding won’t be the filter like this syntax:
filter=”field=cfdb_url()”
?Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterBut i have to say many thanks for your support!!
Maybe there will be a chance to do that one day.
Thank you Michael
Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterThe part behind the slash is always the same with the pagename oder permalink.. or %postname%.
I can’t find a way to use this information for a filter..
Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterahh okay. no the url is always static..
something likehttps://example.com/car
https://example.com/bike
https://example.com/busand i want to do the lookup with a filter like “car” “bike” “bus” .. but as variable.
Is there a chance to do this?
Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterI’m sorry.
Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filterSorry .. still not working ..
The site url is: e.g.: https://example.com/carthis is working:
[cfdb-html form=”TEST” filter=”Field1=car” filelinks=”img”]${car}[/cfdb-html]this is not working:
[cfdb-html form=”TEST” filter=”Field1=$_GET(ID)” filelinks=”img”]${car}[/cfdb-html]Forum: Plugins
In reply to: [Contact Form DB] [CFDB plugin] Part of URL as filter@michael: Many thanks .. i read it before.. but i’m sorry i can’t understand what i have to do. Sorry.
Let me please explain: this is what i’m doing with your $_GET:
[cfdb-html form=”TEST” filter=”Field1=$_GET($ID)” filelinks=”img”]${IMAGE}[/cfdb-html]
I want to filter with the ID in the DB with the form test. I want to display the image from the field IMAGE.
But it doesn’t works..
Sorry .. can you help me out?
What am i doing wrong???