Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum https://www.tinywebgallery.com/forum/ |
|
pass parameter to page {userid} https://www.tinywebgallery.com/forum/viewtopic.php?f=21&t=4063 |
Page 1 of 1 |
Author: | sulrich [ 1. Apr 2016, 01:07 ] |
Post subject: | pass parameter to page {userid} |
Apologies for my ignorance- I can't seem to pass the current WP userid to the page. What am I doing wrong? [advanced_iframe securitykey="xxxxxxxx url_forward_parameter="ALL" src="http://website/webpagee.php?user_id="{userid} width="100%" height="1000"] Thanks for any help, appreciated |
Author: | TinyWebGallery [ 1. Apr 2016, 22:19 ] |
Post subject: | Re: pass parameter to page {userid} |
You put the userid outsite the parameter: [advanced_iframe securitykey="xxxxxxxx" src="http://website/webpagee.php?user_id={userid}" width="100%" height="1000"] should work fine. Best, Michael |
Author: | sulrich [ 2. Apr 2016, 02:37 ] |
Post subject: | Re: pass parameter to page {userid} |
thanks for this - however looking at the source html returned it doesn't seem to be passing userid. ie. the source html has "user_id={userid}" in the URL as opposed to "user_id=2". Apologies for my ignorance The code concerned is: [advanced_iframe securitykey="my keys here" src="http://website/display_distance.php?user_id={userid}" width="100%" height="1000"] |
Author: | TinyWebGallery [ 2. Apr 2016, 12:32 ] |
Post subject: | Re: pass parameter to page {userid} |
Are you sure you use the pro version? Best, Michael |
Author: | sulrich [ 3. Apr 2016, 11:32 ] |
Post subject: | Re: pass parameter to page {userid} |
TinyWebGallery wrote: Are you sure you use the pro version? Best, Michael OK you are correct sir. I failed to install it properly. Thank you again for assisting, great plug in. |
Author: | brightestlight [ 8. Apr 2016, 18:53 ] |
Post subject: | Re: pass parameter to page {userid} |
I'm having an odd problem - could swear it was working just fine earlier: When a user is logged in, the parameter is passed on just fine, but when displaying a page to a guest... see attachment. The page in question: http://beta.chat27.co.za/test-chat-page/ Code used: Code: [advanced_iframe securitykey="xxxxxx" src="http://xxx:7778/chat27/irc.xxx.org:+6697?nick={usermeta-first_name}&#Chat27Beta" width="100%" ] Attachment: usermeta.jpg [ 44.96 KiB | Viewed 3119 times ] Any suggestions? |
Author: | TinyWebGallery [ 8. Apr 2016, 22:51 ] |
Post subject: | Re: pass parameter to page {userid} |
This is because only if the element exists it is replaced. But are you sure the normal replace does work? What was the result before? Best, Michael |
Author: | brightestlight [ 9. Apr 2016, 00:55 ] |
Post subject: | Re: pass parameter to page {userid} |
As far as I could tell, it left the parameter empty/blank if a person wasn't signed in. Must have been my imagination. Played around with so many settings today! Lol |
Author: | TinyWebGallery [ 9. Apr 2016, 07:47 ] |
Post subject: | Re: pass parameter to page {userid} |
I checked the code. If you are not logged in these settings are not replaced at all. Maybe a good idea would be to introduce a default. So if the element is not found the default is used. Best, Michael |
Author: | brightestlight [ 9. Apr 2016, 08:12 ] |
Post subject: | Re: pass parameter to page {userid} |
That would be perfect! That sounds way beyond my skills though. I'm sure google will assist! Lol |
Author: | brightestlight [ 9. Apr 2016, 22:56 ] |
Post subject: | Re: pass parameter to page {userid} |
By jove I've got it!! Using a plugin called User Shortcodes (https://wordpress.org/plugins/user-shortcodes/) that allows for a [currentuser_firstname] shortcode, I passed on the shortcode with the {{currentuser_firstname}} replacement to look like the code below, and now the parameter is passed on when a user is logged in, and left blank when logged out/not registered!! Code: [advanced_iframe securitykey="xxxxxx" src="http://xxx:7778/chat27/irc.xxx.org:+6697?nick={{currentuser_firstname}}&#Chat27Beta" width="100%" ]
|
Author: | TinyWebGallery [ 10. Apr 2016, 00:26 ] |
Post subject: | Re: pass parameter to page {userid} |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |