Short Code within Short code
-
First, great plugin. Suggest you show two variables in your help so one can know the variables in the shortcode are seperated by a space, not a commoa.
Second, I appeal to your genius.
I use formidablePro forms plugin.I coded a Post Snippet, encryptme.
$qstring ="{fn}|{ln}|{em}|{pid}|{oid}|{rid}"; //echo $qstring."<br/>"; $password="mysecretpassword"; $salt = substr(md5(mt_rand(), true), 8); $key = md5($password . $salt, true); $iv = md5($key . $password . $salt, true); $ct = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $qstring, MCRYPT_MODE_CBC, $iv); echo urlencode(base64_encode('Salted__' . $salt . $ct));
The short code:
[encryptme fn="John' ln="Doe" em="[email protected]" pid="PWA" oid="87" rid="WSC1034"]
If I place the short code in a formidable field, it returns the encrypted string just fine…wonderful.
However, if I use a formidable short code, i.e., a shortcode representing the contents of another field on the form, [Field#] in place of the literals for the variables in the Post Snippets shortcode, it get lost in its underwear.
I’ve used [85], ‘[85]’, “[85]” flavors, where 85 is field number. No go.
Short code in a short code. Can you do a ‘do_shortcode’?
- The topic ‘Short Code within Short code’ is closed to new replies.